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

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

Issue 6679040: [cros] Add checkbox for toggling data roaming setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: js/css cleanup Created 9 years, 9 months 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 315ced3948ac62005658653bda53ef2821440902..ab32f81d609dbea750565af7fa1cb8bf0f3c84ae 100644
--- a/chrome/browser/chromeos/user_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/user_cros_settings_provider.cc
@@ -36,7 +36,8 @@ const char kTrustedSuffix[] = "/trusted";
const char* kBooleanSettings[] = {
kAccountsPrefAllowNewUser,
kAccountsPrefAllowGuest,
- kAccountsPrefShowUserNamesOnSignIn
+ kAccountsPrefShowUserNamesOnSignIn,
+ kSignedDataRoamingEnabled,
Denis Lagno 2011/03/16 17:09:35 I think it should default to false. But in this c
Nikita (slow) 2011/03/17 10:45:57 Done.
};
const char* kStringSettings[] = {
@@ -408,6 +409,12 @@ bool UserCrosSettingsProvider::RequestTrustedShowUsersOnSignin(Task* callback) {
kAccountsPrefShowUserNamesOnSignIn, callback);
}
+bool UserCrosSettingsProvider::RequestTrustedDataRoamingEnabled(
+ Task* callback) {
+ return UserCrosSettingsTrust::GetInstance()->RequestTrustedEntity(
+ kSignedDataRoamingEnabled, callback);
+}
+
bool UserCrosSettingsProvider::RequestTrustedOwner(Task* callback) {
return UserCrosSettingsTrust::GetInstance()->RequestTrustedEntity(
kDeviceOwner, callback);
@@ -425,7 +432,15 @@ bool UserCrosSettingsProvider::cached_allow_new_user() {
// Trigger prefetching if singleton object still does not exist.
UserCrosSettingsTrust::GetInstance();
return g_browser_process->local_state()->GetBoolean(
- kAccountsPrefAllowNewUser);
+ kAccountsPrefAllowNewUser);
+}
+
+// static
+bool UserCrosSettingsProvider::cached_data_roaming_enabled() {
+ // Trigger prefetching if singleton object still does not exist.
+ UserCrosSettingsTrust::GetInstance();
+ return g_browser_process->local_state()->GetBoolean(
+ kSignedDataRoamingEnabled);
}
// static
@@ -503,7 +518,8 @@ bool UserCrosSettingsProvider::Get(const std::string& path,
}
bool UserCrosSettingsProvider::HandlesSetting(const std::string& path) {
- return ::StartsWithASCII(path, "cros.accounts.", true);
+ return ::StartsWithASCII(path, "cros.accounts.", true) ||
+ ::StartsWithASCII(path, "cros.signed.", true);
}
void UserCrosSettingsProvider::WhitelistUser(const std::string& email) {

Powered by Google App Engine
This is Rietveld 408576698