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

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

Issue 8342049: Added Protector, hooked up DSE verification with error bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved check to Protector, work with search engines via TemplateURLService Created 9 years, 2 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_service.h
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index fb98de6743c6bdd36913a2869701cc5c22b637c6..5c5218a102c9a88187b73f8284e0a13a2c9acc97 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -199,6 +199,24 @@ class TemplateURLService : public WebDataServiceConsumer,
// NOTE: At least in unittest mode, this may return NULL.
const TemplateURL* GetDefaultSearchProvider();
+ // Sets the backup and marks the default search provider as verified.
+ // |url| may be null.
+ // This will assert if the default search is managed; the UI should not be
+ // invoking this method in that situation.
+ void SetVerifiedDefaultSearchProvider(const TemplateURL* url);
+
+ // Returns the backup for the default search provider. If verification of
+ // the backup failed, returns NULL.
+ const TemplateURL* backup_default_search_provider() const {
+ return backup_default_search_provider_;
+ };
+
+ // Indicates if the default search provider was successfully verified on
+ // the last load.
+ bool is_default_search_provider_verified() const {
+ return is_default_search_provider_verified_;
+ }
+
// Returns true if the default search is managed through group policy.
bool is_default_search_managed() const { return is_default_search_managed_; }
@@ -535,6 +553,13 @@ class TemplateURLService : public WebDataServiceConsumer,
// TemplateURL owned by template_urls_.
const TemplateURL* default_search_provider_;
+ // Once loaded, the backup default search provider.
+ // This is a pointer to a TemplateURL owned by template_urls_.
+ const TemplateURL* backup_default_search_provider_;
sky 2011/10/21 17:20:30 I don't like persisting this and is_default_search
whywhat 2011/10/21 20:31:53 Done.
+
+ // Indicates if the default search provider was verified successfully.
+ bool is_default_search_provider_verified_;
+
// Used for UX testing. Gives the slot in the search engine dialog that was
// chosen as the default search engine.
int search_engine_dialog_chosen_slot_;

Powered by Google App Engine
This is Rietveld 408576698