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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 1380833003: Delete IDC_CONTENT_CONTEXT_ADDSEARCHENGINE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 12d8b73bfaac298950148f7d0035574c6a38f829..413e5a42f390c40ab062aec57b4def46c0bee9b4 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -225,7 +225,6 @@ const struct UmaEnumCommandIdPair {
{45, -1, IDC_CONTENT_CONTEXT_GOTOURL},
{46, -1, IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS},
{47, -1, IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS},
- {48, -1, IDC_CONTENT_CONTEXT_ADDSEARCHENGINE},
{52, -1, IDC_CONTENT_CONTEXT_OPENLINKWITH},
{53, -1, IDC_CHECK_SPELLING_WHILE_TYPING},
{54, -1, IDC_SPELLCHECK_MENU},
@@ -1385,9 +1384,6 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
return true;
#endif
- case IDC_CONTENT_CONTEXT_ADDSEARCHENGINE:
- return !params_.keyword_url.is_empty();
-
case IDC_SPELLCHECK_MENU:
return true;
@@ -1862,34 +1858,6 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
break;
}
- case IDC_CONTENT_CONTEXT_ADDSEARCHENGINE: {
- // Make sure the model is loaded.
- TemplateURLService* model =
- TemplateURLServiceFactory::GetForProfile(GetProfile());
- if (!model)
- return;
- model->Load();
-
- SearchEngineTabHelper* search_engine_tab_helper =
- SearchEngineTabHelper::FromWebContents(source_web_contents_);
- if (search_engine_tab_helper &&
- search_engine_tab_helper->delegate()) {
- base::string16 keyword(TemplateURL::GenerateKeyword(
- params_.page_url,
- GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages)));
- TemplateURLData data;
- data.SetShortName(keyword);
- data.SetKeyword(keyword);
- data.SetURL(params_.keyword_url.spec());
- data.favicon_url =
- TemplateURL::GenerateFaviconURL(params_.page_url.GetOrigin());
- // Takes ownership of the TemplateURL.
- search_engine_tab_helper->delegate()->ConfirmAddSearchProvider(
- new TemplateURL(data), GetProfile());
- }
- break;
- }
-
case IDC_CONTENT_CONTEXT_FORCESAVEPASSWORD:
ChromePasswordManagerClient::FromWebContents(source_web_contents_)->
ForceSavePassword();
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698