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

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

Issue 10417032: Disable sync promo when RestoreOnStartupURLs policy is used (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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_handler.cc
diff --git a/chrome/browser/policy/configuration_policy_handler.cc b/chrome/browser/policy/configuration_policy_handler.cc
index 023cb1d596fa5159c2ae394b623e5a05af8fdb1b..889a7c670557e4df3b4bf0b9909a03b5280f8ae2 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -1152,4 +1152,24 @@ bool RestoreOnStartupPolicyHandler::CheckPolicySettings(
return true;
}
+// RestoreOnStartupURLsPolicyHandler implementation ----------------------------
+
+RestoreOnStartupURLsPolicyHandler::RestoreOnStartupURLsPolicyHandler()
+ : TypeCheckingPolicyHandler(key::kRestoreOnStartupURLs, Value::TYPE_LIST) {
+}
+
+RestoreOnStartupURLsPolicyHandler::~RestoreOnStartupURLsPolicyHandler() {
+}
+
+void RestoreOnStartupURLsPolicyHandler::ApplyPolicySettings(
+ const PolicyMap& policies,
+ PrefValueMap* prefs) {
+ const Value* urls = policies.GetValue(key::kRestoreOnStartupURLs);
+ if (urls) {
+ prefs->SetValue(prefs::kURLsToRestoreOnStartup, urls->DeepCopy());
+ prefs->SetValue(prefs::kSyncPromoShowOnFirstRunAllowed,
+ Value::CreateBooleanValue(false));
+ }
+}
+
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698