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

Unified Diff: chrome/browser/search_engines/template_url_model.h

Issue 7051003: Fix duplicate insertions of default search providers into the Web Data database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_model.h
diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h
index 7f130063aec2b0506f07352b3668e3597fcaa01a..d25e57ab947ee278a0ef1fb881178a18d3d22b8d 100644
--- a/chrome/browser/search_engines/template_url_model.h
+++ b/chrome/browser/search_engines/template_url_model.h
@@ -370,6 +370,15 @@ class TemplateURLModel : public WebDataServiceConsumer,
// model is loaded.
void NotifyObservers();
+ // Removes from the vector any template URL that was created because of
+ // policy. These TemplateURLs are freed and removed from the database.
+ // Sets default_search_provider to NULL if it was one of them, unless it is
+ // the same as the current default from preferences and it is managed.
+ void RemoveProvidersCreatedByPolicy(
+ std::vector<TemplateURL*>* template_urls,
+ const TemplateURL** default_search_provider,
+ const TemplateURL* default_from_prefs);
+
NotificationRegistrar registrar_;
// Mapping from keyword to the TemplateURL.
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698