Index: chrome/browser/search_engines/template_url_prepopulate_data.cc |
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc |
index 235f621966a62123151a531121ec714b2b6dfccf..83e7a8132dbf28b81bd7cf0582cd04d193fadf37 100644 |
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc |
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc |
@@ -1197,6 +1197,22 @@ void GetPrepopulatedTemplateFromPrefs(Profile* profile, |
} |
} |
+void ClearPrepopulatedEnginesInPrefs(Profile* profile) { |
+ if (!profile) |
+ return; |
+ |
+ PrefService* prefs = profile->GetPrefs(); |
+ DCHECK(prefs); |
+ const PrefService::Preference* pref = |
+ prefs->FindPreference(prefs::kSearchProviderOverrides); |
+ if (pref && pref->HasUserSetting()) { |
+ ListValue empty_list; |
+ prefs->Set(prefs::kSearchProviderOverrides, empty_list); |
battre
2013/05/22 14:03:37
Should we use prefs->ClearPref here and in the fol
vasilii
2013/05/22 18:54:08
Done.
|
+ prefs->SetInteger(prefs::kSearchProviderOverridesVersion, |
+ kCurrentDataVersion); |
+ } |
+} |
+ |
// The caller owns the returned TemplateURL. |
TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine( |
Profile* profile, |