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

Unified Diff: components/search_engines/template_url_service.h

Issue 2938403002: Check for the default search engine being null before using. (Closed)
Patch Set: 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..ad23c7974e24b5a4afb4f8addcaeac2e8cb9c270 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:
Peter Kasting 2017/06/16 22:51:34 Nit: NULL -> null
Ted C 2017/06/16 22:56:49 Done.
+ // 1.) Unit test mode
+ // 2.) Default search engines are disabled by policy.
Peter Kasting 2017/06/16 22:51:34 Nit: "The default search engine is disabled by pol
Ted C 2017/06/16 22:56:49 Done.
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