diff options
Diffstat (limited to 'chrome/browser/policy')
7 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc index 8b7e9a0..982ac6fe 100644 --- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc +++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc @@ -253,6 +253,9 @@ INSTANTIATE_TEST_CASE_P( kPolicyDefaultSearchProviderSuggestURL, key::kDefaultSearchProviderSuggestURL), ValueTestParams::ForStringPolicy( + kPolicyDefaultSearchProviderInstantURL, + key::kDefaultSearchProviderInstantURL), + ValueTestParams::ForStringPolicy( kPolicyDefaultSearchProviderIconURL, key::kDefaultSearchProviderIconURL), ValueTestParams::ForStringPolicy( diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc index 1f6355a..1330279 100644 --- a/chrome/browser/policy/configuration_policy_pref_store.cc +++ b/chrome/browser/policy/configuration_policy_pref_store.cc @@ -443,6 +443,7 @@ void ConfigurationPolicyPrefKeeper::FinalizeDefaultSearchPolicySettings() { prefs_.SetString(prefs::kDefaultSearchProviderIconURL, std::string()); prefs_.SetString(prefs::kDefaultSearchProviderEncodings, std::string()); prefs_.SetString(prefs::kDefaultSearchProviderKeyword, std::string()); + prefs_.SetString(prefs::kDefaultSearchProviderInstantURL, std::string()); return; } std::string search_url; @@ -459,6 +460,7 @@ void ConfigurationPolicyPrefKeeper::FinalizeDefaultSearchPolicySettings() { EnsureStringPrefExists(prefs::kDefaultSearchProviderIconURL); EnsureStringPrefExists(prefs::kDefaultSearchProviderEncodings); EnsureStringPrefExists(prefs::kDefaultSearchProviderKeyword); + EnsureStringPrefExists(prefs::kDefaultSearchProviderInstantURL); // For the name, default to the host if not specified. std::string name; @@ -702,6 +704,8 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() { key::kDefaultSearchProviderSearchURL }, { kPolicyDefaultSearchProviderSuggestURL, Value::TYPE_STRING, key::kDefaultSearchProviderSuggestURL }, + { kPolicyDefaultSearchProviderInstantURL, Value::TYPE_STRING, + key::kDefaultSearchProviderInstantURL }, { kPolicyDefaultSearchProviderIconURL, Value::TYPE_STRING, key::kDefaultSearchProviderIconURL }, { kPolicyDefaultSearchProviderEncodings, Value::TYPE_STRING, diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc index 42bfaaa..9f461c1 100644 --- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc +++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc @@ -393,6 +393,10 @@ TEST_F(ConfigurationPolicyPrefStoreDefaultSearchTest, MinimallyDefined) { EXPECT_EQ(PrefStore::READ_OK, store.GetValue(prefs::kDefaultSearchProviderEncodings, &value)); EXPECT_TRUE(StringValue(std::string()).Equals(value)); + + EXPECT_EQ(PrefStore::READ_OK, + store.GetValue(prefs::kDefaultSearchProviderInstantURL, &value)); + EXPECT_TRUE(StringValue(std::string()).Equals(value)); } // Checks that for a fully defined search policy, all elements have been diff --git a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc index 345a3f6..4203fb0 100644 --- a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc +++ b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc @@ -227,6 +227,9 @@ INSTANTIATE_TEST_CASE_P( kPolicyDefaultSearchProviderSuggestURL, key::kDefaultSearchProviderSuggestURL), PolicyTestParams::ForStringPolicy( + kPolicyDefaultSearchProviderInstantURL, + key::kDefaultSearchProviderInstantURL), + PolicyTestParams::ForStringPolicy( kPolicyDefaultSearchProviderIconURL, key::kDefaultSearchProviderIconURL), PolicyTestParams::ForStringPolicy( diff --git a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc index beed450..6085192 100644 --- a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc +++ b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc @@ -385,6 +385,9 @@ INSTANTIATE_TEST_CASE_P( kPolicyDefaultSearchProviderSuggestURL, key::kDefaultSearchProviderSuggestURL), PolicyTestParams::ForStringPolicy( + kPolicyDefaultSearchProviderInstantURL, + key::kDefaultSearchProviderInstantURL), + PolicyTestParams::ForStringPolicy( kPolicyDefaultSearchProviderIconURL, key::kDefaultSearchProviderIconURL), PolicyTestParams::ForStringPolicy( diff --git a/chrome/browser/policy/configuration_policy_store_interface.h b/chrome/browser/policy/configuration_policy_store_interface.h index b6d1f3b..e690242 100644 --- a/chrome/browser/policy/configuration_policy_store_interface.h +++ b/chrome/browser/policy/configuration_policy_store_interface.h @@ -23,6 +23,7 @@ enum ConfigurationPolicyType { kPolicyDefaultSearchProviderSearchURL, kPolicyDefaultSearchProviderSuggestURL, kPolicyDefaultSearchProviderIconURL, + kPolicyDefaultSearchProviderInstantURL, kPolicyDefaultSearchProviderEncodings, kPolicyDisableSpdy, kPolicyProxyMode, diff --git a/chrome/browser/policy/managed_prefs_banner_base.cc b/chrome/browser/policy/managed_prefs_banner_base.cc index 7c20a09..826f453 100644 --- a/chrome/browser/policy/managed_prefs_banner_base.cc +++ b/chrome/browser/policy/managed_prefs_banner_base.cc @@ -62,6 +62,7 @@ void ManagedPrefsBannerBase::Init(PrefService* local_state, AddUserPref(prefs::kDefaultSearchProviderEnabled); AddUserPref(prefs::kDefaultSearchProviderName); AddUserPref(prefs::kDefaultSearchProviderKeyword); + AddUserPref(prefs::kDefaultSearchProviderInstantURL); AddUserPref(prefs::kDefaultSearchProviderSearchURL); AddUserPref(prefs::kDefaultSearchProviderSuggestURL); AddUserPref(prefs::kDefaultSearchProviderIconURL); |
