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

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

Issue 11552020: Add search_terms_replacement_key field to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments now describe a simpler behavior for the parameter. Created 7 years, 12 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 68536d35a2dc70493c22d5eb4cd0afa9e9d97852..5587cae14c2c6582bdbdd08633edf7282a5e7b15 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -92,6 +92,9 @@ const DefaultSearchSimplePolicyHandlerEntry kDefaultSearchPolicyMap[] = {
{ key::kDefaultSearchProviderAlternateURLs,
prefs::kDefaultSearchProviderAlternateURLs,
Value::TYPE_LIST },
+ { key::kDefaultSearchProviderSearchTermsReplacementKey,
+ prefs::kDefaultSearchProviderSearchTermsReplacementKey,
+ Value::TYPE_STRING },
};
// List of entries determining which proxy policies can be specified, depending
@@ -825,6 +828,8 @@ void DefaultSearchPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
prefs->SetString(prefs::kDefaultSearchProviderInstantURL, std::string());
prefs->SetValue(prefs::kDefaultSearchProviderAlternateURLs,
new ListValue());
+ prefs->SetString(prefs::kDefaultSearchProviderSearchTermsReplacementKey,
+ std::string());
} else {
// The search URL is required. The other entries are optional. Just make
// sure that they are all specified via policy, so that the regular prefs
@@ -842,6 +847,8 @@ void DefaultSearchPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
EnsureStringPrefExists(prefs, prefs::kDefaultSearchProviderKeyword);
EnsureStringPrefExists(prefs, prefs::kDefaultSearchProviderInstantURL);
EnsureListPrefExists(prefs, prefs::kDefaultSearchProviderAlternateURLs);
+ EnsureStringPrefExists(prefs,
+ prefs::kDefaultSearchProviderSearchTermsReplacementKey);
// For the name and keyword, default to the host if not specified. If
// there is no host (file: URLs? Not sure), use "_" to guarantee that the
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698