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

Unified Diff: chrome/browser/search_engines/search_provider_install_data_unittest.cc

Issue 268643002: Use the DefaultSearchManager as the exclusive authority on DSE, ignoring Web Data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: D'oh. Created 6 years, 8 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/search_engines/search_provider_install_data_unittest.cc
diff --git a/chrome/browser/search_engines/search_provider_install_data_unittest.cc b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
index ebc6616dfe43072194dff0566ca1a36a1023a71d..a1afe1129a3d65ca3b2cc6fec081ea8bbb9de737 100644
--- a/chrome/browser/search_engines/search_provider_install_data_unittest.cc
+++ b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
@@ -177,22 +177,15 @@ void SearchProviderInstallDataTest::SimulateDefaultSearchIsManaged(
ASSERT_FALSE(url.empty());
TestingPrefServiceSyncable* service =
util_.profile()->GetTestingPrefService();
- service->SetManagedPref(prefs::kDefaultSearchProviderEnabled,
- base::Value::CreateBooleanValue(true));
- service->SetManagedPref(prefs::kDefaultSearchProviderSearchURL,
- base::Value::CreateStringValue(url));
- service->SetManagedPref(prefs::kDefaultSearchProviderName,
- base::Value::CreateStringValue("managed"));
- service->SetManagedPref(prefs::kDefaultSearchProviderKeyword,
- new base::StringValue("managed"));
- // Clear the IDs that are not specified via policy.
- service->SetManagedPref(prefs::kDefaultSearchProviderID,
- new base::StringValue(std::string()));
- service->SetManagedPref(prefs::kDefaultSearchProviderPrepopulateID,
- new base::StringValue(std::string()));
- util_.model()->Observe(chrome::NOTIFICATION_DEFAULT_SEARCH_POLICY_CHANGED,
- content::NotificationService::AllSources(),
- content::NotificationService::NoDetails());
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue);
+ value->Set(DefaultSearchManager::kShortName,
+ base::Value::CreateStringValue("managed"));
+ value->Set(DefaultSearchManager::kKeyword,
+ base::Value::CreateStringValue("managed"));
+ value->Set(DefaultSearchManager::kURL, base::Value::CreateStringValue(url));
+ service->SetManagedPref(
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName,
+ value.release());
}
TemplateURL* SearchProviderInstallDataTest::AddNewTemplateURL(

Powered by Google App Engine
This is Rietveld 408576698