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

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

Issue 15572002: Implemented 'Reset Search engines' feature. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed Dominic's comments Created 7 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/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..efbb266f60d75054491325c8be38a0273f8bed8f 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -1197,6 +1197,16 @@ void GetPrepopulatedTemplateFromPrefs(Profile* profile,
}
}
+void ClearPrepopulatedEnginesInPrefs(Profile* profile) {
+ if (!profile)
+ return;
+
+ PrefService* prefs = profile->GetPrefs();
+ DCHECK(prefs);
+ prefs->ClearPref(prefs::kSearchProviderOverrides);
+ prefs->ClearPref(prefs::kSearchProviderOverridesVersion);
Peter Kasting 2013/05/22 21:22:57 These prefs are supposed to only be set by tests a
Joao da Silva 2013/05/23 08:54:10 As Peter mentioned, these prefs can only come from
Joao da Silva 2013/05/23 09:12:51 I wasn't looking at this from the malware preventi
vasilii 2013/05/23 17:03:42 The purpose of this feature is to recover Chrome a
+}
+
// The caller owns the returned TemplateURL.
TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine(
Profile* profile,

Powered by Google App Engine
This is Rietveld 408576698