From 3613347db32e0112c044854949072cd3e7d6e213 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Fri, 27 Apr 2012 20:27:37 +0000 Subject: Remove const qualifiers on "TemplateURL*" in many TemplateURLService APIs. This has followon effects in many other places, most noticeably ConfirmAddSearchProvider(), which seems to be declared in like 20 files :P This removes most const_cast<>()s and makes the TemplateURLService APIs a lot more accurate about when the URLs they take or return can be modified. Note that because most of TemplateURL is now immutable except to friends, this doesn't actually give callers dangerous latitude in mucking with TemplateURLs. This does add a few const_cast<>()s related to keyword autogeneration. Keyword autogeneration will die soon so I didn't care about finding ways around these. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10209018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134337 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc | 2 +- chrome/browser/ui/webui/options2/search_engine_manager_handler2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/browser/ui/webui') diff --git a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc index d30b03a..38f03a3 100644 --- a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc +++ b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc @@ -249,7 +249,7 @@ void SearchEngineManagerHandler::EditSearchEngine(const ListValue* args) { } void SearchEngineManagerHandler::OnEditedKeyword( - const TemplateURL* template_url, + TemplateURL* template_url, const string16& title, const string16& keyword, const std::string& url) { diff --git a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.h b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.h index 42984a4..95af05ed 100644 --- a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.h +++ b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.h @@ -34,7 +34,7 @@ class SearchEngineManagerHandler : public OptionsPageUIHandler, virtual void OnItemsRemoved(int start, int length) OVERRIDE; // EditSearchEngineControllerDelegate implementation. - virtual void OnEditedKeyword(const TemplateURL* template_url, + virtual void OnEditedKeyword(TemplateURL* template_url, const string16& title, const string16& keyword, const std::string& url) OVERRIDE; -- cgit v1.1