mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 16:57:36 +00:00
bug 1454941 - revert CP wait fix from bug 1451150 r=valentin
... but keep the logic that avoids re-initialization. MozReview-Commit-ID: 2XQCRaM6U4B --HG-- extra : rebase_source : e7291b3c7b26d39dcfde445212dd4f10b63ec98d
This commit is contained in:
parent
4121e64310
commit
8d35551b70
@ -286,31 +286,31 @@ TRRService::Observe(nsISupports *aSubject,
|
||||
} else if (!strcmp(aTopic, NS_CAPTIVE_PORTAL_CONNECTIVITY)) {
|
||||
nsAutoCString data = NS_ConvertUTF16toUTF8(aData);
|
||||
LOG(("TRRservice captive portal was %s\n", data.get()));
|
||||
if (data.Equals("clear")) {
|
||||
if (!mTRRBLStorage) {
|
||||
mTRRBLStorage = DataStorage::Get(DataStorageClass::TRRBlacklist);
|
||||
if (mTRRBLStorage) {
|
||||
bool storageWillPersist = true;
|
||||
if (NS_FAILED(mTRRBLStorage->Init(storageWillPersist))) {
|
||||
mTRRBLStorage = nullptr;
|
||||
}
|
||||
if (mClearTRRBLStorage) {
|
||||
if (mTRRBLStorage) {
|
||||
mTRRBLStorage->Clear();
|
||||
}
|
||||
mClearTRRBLStorage = false;
|
||||
if (!mTRRBLStorage) {
|
||||
mTRRBLStorage = DataStorage::Get(DataStorageClass::TRRBlacklist);
|
||||
if (mTRRBLStorage) {
|
||||
bool storageWillPersist = true;
|
||||
if (NS_FAILED(mTRRBLStorage->Init(storageWillPersist))) {
|
||||
mTRRBLStorage = nullptr;
|
||||
}
|
||||
if (mClearTRRBLStorage) {
|
||||
if (mTRRBLStorage) {
|
||||
mTRRBLStorage->Clear();
|
||||
}
|
||||
mClearTRRBLStorage = false;
|
||||
}
|
||||
}
|
||||
if (mConfirmationState != CONFIRM_OK) {
|
||||
mConfirmationState = CONFIRM_TRYING;
|
||||
MaybeConfirm();
|
||||
} else {
|
||||
LOG(("TRRservice CP clear when already up!\n"));
|
||||
}
|
||||
mCaptiveIsPassed = true;
|
||||
}
|
||||
|
||||
if (mConfirmationState != CONFIRM_OK) {
|
||||
mConfirmationState = CONFIRM_TRYING;
|
||||
MaybeConfirm();
|
||||
} else {
|
||||
LOG(("TRRservice CP clear when already up!\n"));
|
||||
}
|
||||
|
||||
mCaptiveIsPassed = true;
|
||||
|
||||
} else if (!strcmp(aTopic, kClearPrivateData) ||
|
||||
!strcmp(aTopic, kPurge)) {
|
||||
// flush the TRR blacklist, both in-memory and on-disk
|
||||
|
Loading…
x
Reference in New Issue
Block a user