Commit 1e9dc390 authored by thestig's avatar thestig Committed by Commit bot

Remove CHECKs used for debugging bug 425785.

BUG=425785

Review-Url: https://codereview.chromium.org/2138593002
Cr-Commit-Position: refs/heads/master@{#404915}
parent 29c2239b
......@@ -429,9 +429,7 @@ void PrepareFactory(
if (supervised_user_settings) {
scoped_refptr<PrefStore> supervised_user_prefs = make_scoped_refptr(
new SupervisedUserPrefStore(supervised_user_settings));
// TODO(bauerb): Temporary CHECK while investigating
// https://crbug.com/425785. Remove when that bug is fixed.
CHECK(async || supervised_user_prefs->IsInitializationComplete());
DCHECK(async || supervised_user_prefs->IsInitializationComplete());
factory->set_supervised_user_prefs(supervised_user_prefs);
}
#endif
......
......@@ -76,7 +76,7 @@ SupervisedUserPrefStore::SupervisedUserPrefStore(
// TODO(peconn): Remove this once SupervisedUserPrefStore is (partially at
// least) a KeyedService. The user_settings_subscription_ must be reset or
// destroyed before the SupervisedUserSettingsService is.
if (supervised_user_settings_service->GetProfile() != nullptr){
if (supervised_user_settings_service->GetProfile()) {
unsubscriber_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(
supervised_user_settings_service->GetProfile()));
......@@ -85,10 +85,6 @@ SupervisedUserPrefStore::SupervisedUserPrefStore(
bool SupervisedUserPrefStore::GetValue(const std::string& key,
const base::Value** value) const {
// TODO(bauerb): Temporary CHECK to force a clean crash while investigating
// https://crbug.com/425785. Remove (or change back to DCHECK) once the bug
// is fixed.
CHECK(prefs_);
return prefs_->GetValue(key, value);
}
......
......@@ -75,9 +75,8 @@ void SupervisedUserSettingsService::Init(
Init(store);
if (load_synchronously) {
store_->ReadPrefs();
// TODO(bauerb): Temporary CHECK while investigating
// https://crbug.com/425785. Remove (or change to DCHECK) once the bug
// is fixed.
// This should be a DCHECK, but it is triggering in the wild.
// https://crbug.com/627031
CHECK(store_->IsInitializationComplete());
} else {
store_->ReadPrefsAsync(nullptr);
......@@ -102,7 +101,7 @@ SupervisedUserSettingsService::Subscribe(const SettingsCallback& callback) {
return callback_list_.Add(callback);
}
Profile* SupervisedUserSettingsService::GetProfile(){
Profile* SupervisedUserSettingsService::GetProfile() {
return profile_;
}
......@@ -111,7 +110,7 @@ void SupervisedUserSettingsService::SetActive(bool active) {
InformSubscribers();
}
bool SupervisedUserSettingsService::IsReady() {
bool SupervisedUserSettingsService::IsReady() const {
// Initialization cannot be complete but have failed at the same time.
DCHECK(!(store_->IsInitializationComplete() && initialization_failed_));
return initialization_failed_ || store_->IsInitializationComplete();
......@@ -404,9 +403,7 @@ void SupervisedUserSettingsService::OnInitializationCompleted(bool success) {
initialization_failed_ = true;
}
// TODO(bauerb): Temporary CHECK while investigating https://crbug.com/425785.
// Remove (or change back to DCHECK) once the bug is fixed.
CHECK(IsReady());
DCHECK(IsReady());
InformSubscribers();
}
......
......@@ -95,7 +95,7 @@ class SupervisedUserSettingsService : public KeyedService,
void SetActive(bool active);
// Whether supervised user settings are available.
bool IsReady();
bool IsReady() const;
// Clears all supervised user settings and items.
void Clear();
......@@ -172,7 +172,7 @@ class SupervisedUserSettingsService : public KeyedService,
// directly hooked up to the PrefService.
scoped_refptr<PersistentPrefStore> store_;
Profile* profile_;
Profile* const profile_;
bool active_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment