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

Unified Diff: components/search_engines/template_url_service.h

Issue 2938403002: Check for the default search engine being null before using. (Closed)
Patch Set: Update comments Created 3 years, 6 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 | « chrome/browser/search_engines/template_url_service_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url_service.h
diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h
index 058b0a0d50bc6ae0df017d0588175712514ce0d3..884c582eb7065c58800a15da67c6bc5dd88c4c94 100644
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -257,7 +257,9 @@ class TemplateURLService : public WebDataServiceConsumer,
// Returns the default search provider. If the TemplateURLService hasn't been
// loaded, the default search provider is pulled from preferences.
//
- // NOTE: At least in unittest mode, this may return NULL.
+ // NOTE: This may return null in certain circumstances such as:
+ // 1.) Unit test mode
+ // 2.) The default search engine is disabled by policy.
const TemplateURL* GetDefaultSearchProvider() const;
// Returns true if the |url| is a search results page from the default search
« no previous file with comments | « chrome/browser/search_engines/template_url_service_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698