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

Unified Diff: components/search_engines/template_url_service.h

Issue 2816353002: Make const versions GetTemplateURLForKeyword, GetTemplateURLForGUID, GetTemplateURLForHost (Closed)
Patch Set: Make definition and declaration order of new functions match Created 3 years, 8 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 | « components/omnibox/browser/omnibox_client.cc ('k') | components/search_engines/template_url_service.cc » ('j') | 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 4187327f06a21b14b590b8a7e0b5a6d5b9c30147..e5d7cde1d5ba0c54444c1df3a36da13ed00a03a5 100644
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -167,15 +167,19 @@ class TemplateURLService : public WebDataServiceConsumer,
// The caller should not try to delete the returned pointer; the data store
// retains ownership of it.
TemplateURL* GetTemplateURLForKeyword(const base::string16& keyword);
+ const TemplateURL* GetTemplateURLForKeyword(
+ const base::string16& keyword) const;
// Returns that TemplateURL with the specified GUID, or NULL if not found.
// The caller should not try to delete the returned pointer; the data store
// retains ownership of it.
TemplateURL* GetTemplateURLForGUID(const std::string& sync_guid);
+ const TemplateURL* GetTemplateURLForGUID(const std::string& sync_guid) const;
// Returns the first TemplateURL found with a URL using the specified |host|,
// or NULL if there are no such TemplateURLs
TemplateURL* GetTemplateURLForHost(const std::string& host);
+ const TemplateURL* GetTemplateURLForHost(const std::string& host) const;
// Adds |template_url| to this model. Returns a raw pointer to |template_url|
// if the addition succeeded, or null on failure. (Many callers need still
@@ -393,7 +397,7 @@ class TemplateURLService : public WebDataServiceConsumer,
TemplateURLServiceClient* client,
PrefService* prefs,
const SearchTermsData& search_terms_data,
- TemplateURL* existing_turl,
+ const TemplateURL* existing_turl,
const syncer::SyncData& sync_data,
syncer::SyncChangeList* change_list);
« no previous file with comments | « components/omnibox/browser/omnibox_client.cc ('k') | components/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698