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

Unified Diff: chrome/browser/policy/configuration_policy_pref_store.cc

Issue 7647026: base: Add three helper functions to Values API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a typo Ceate -> Create Created 9 years, 4 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/policy/configuration_policy_pref_store.cc
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 7c52f5a6a9dd0260063923a82900eb9d0c0bf1d7..4b78534f10e135fc60292f36f7bbb14506bf9e24 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -443,8 +443,7 @@ bool ConfigurationPolicyPrefKeeper::ApplyAutofillPolicy(
if (policy == kPolicyAutoFillEnabled) {
bool auto_fill_enabled;
if (value->GetAsBoolean(&auto_fill_enabled) && !auto_fill_enabled)
- prefs_.SetValue(prefs::kAutofillEnabled,
- Value::CreateBooleanValue(false));
+ prefs_.SetValue(prefs::kAutofillEnabled, base::FalseValue());
delete value;
return true;
}
@@ -467,8 +466,7 @@ bool ConfigurationPolicyPrefKeeper::ApplyDownloadDirPolicy(
policy::path_parser::ExpandPathVariables(string_value);
prefs_.SetValue(prefs::kDownloadDefaultDirectory,
Value::CreateStringValue(expanded_value));
- prefs_.SetValue(prefs::kPromptForDownload,
- Value::CreateBooleanValue(false));
+ prefs_.SetValue(prefs::kPromptForDownload, base::FalseValue());
#endif // !defined(OS_CHROMEOS)
delete value;
return true;
@@ -509,8 +507,7 @@ bool ConfigurationPolicyPrefKeeper::ApplyFileSelectionDialogsPolicy(
bool result = value->GetAsBoolean(&allow_file_selection_dialogs);
DCHECK(result);
if (!allow_file_selection_dialogs) {
- prefs_.SetValue(prefs::kPromptForDownload,
- Value::CreateBooleanValue(false));
+ prefs_.SetValue(prefs::kPromptForDownload, base::FalseValue());
}
return true;
}
@@ -602,7 +599,7 @@ bool ConfigurationPolicyPrefKeeper::ApplyBookmarksPolicy(
// kEnableBookmarkBar is managed, kShowBookmarkBar should be false so that
// the bookmarks bar either is completely disabled or only shows on the NTP.
// This also disables the checkbox for this preference in the prefs UI.
- prefs_.SetValue(prefs::kShowBookmarkBar, Value::CreateBooleanValue(false));
+ prefs_.SetValue(prefs::kShowBookmarkBar, base::FalseValue());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698