Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2459)

Unified Diff: chrome/browser/chromeos/user_cros_settings_provider.cc

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/user_cros_settings_provider.cc
diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc
index 309ca6dd0016895b2ac915f65742376a80694625..d5313babee7bea3c20a87fadba2052ece86942c5 100644
--- a/chrome/browser/chromeos/user_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/user_cros_settings_provider.cc
@@ -347,8 +347,7 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
}
virtual ~UserCrosSettingsTrust() {
- if (BrowserThread::CurrentlyOn(BrowserThread::UI) &&
- CrosLibrary::Get()->EnsureLoaded()) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
// Cancels all pending callbacks from us.
SignedSettingsHelper::Get()->CancelCallback(this);
}
@@ -357,9 +356,6 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
// Called right before boolean property is changed.
void OnBooleanPropertyChange(const std::string& path, bool new_value) {
if (path == kSignedDataRoamingEnabled) {
- if (!CrosLibrary::Get()->EnsureLoaded())
- return;
-
NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
if (cros->IsCellularAlwaysInRoaming()) {
// If operator requires roaming always enabled, ignore supplied value
@@ -379,9 +375,6 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
bool value,
UseValue use_value) {
if (path == kSignedDataRoamingEnabled) {
- if (!CrosLibrary::Get()->EnsureLoaded())
- return;
-
NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
const NetworkDevice* cellular = cros->FindCellularDevice();
if (cellular) {
@@ -430,9 +423,7 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
// Do not trust before fetching complete.
prefs->ClearPref((name + kTrustedSuffix).c_str());
prefs->ScheduleSavePersistentPrefs();
- if (CrosLibrary::Get()->EnsureLoaded()) {
- SignedSettingsHelper::Get()->StartRetrieveProperty(name, this);
- }
+ SignedSettingsHelper::Get()->StartRetrieveProperty(name, this);
}
// Implementation of SignedSettingsHelper::Callback.
« no previous file with comments | « chrome/browser/chromeos/sms_observer.cc ('k') | chrome/browser/extensions/extension_info_private_api_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698