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

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

Issue 10536108: When the user highlights all or part of a link, don't show "Go to <URL>" if that would navigate to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 141606)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -917,8 +917,9 @@
printable_selection_text.insert(i, 1, '&');
if (match.transition == content::PAGE_TRANSITION_TYPED) {
- if (ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
- selection_navigation_url_.scheme())) {
+ if ((selection_navigation_url_ != params_.link_url) &&
tfarina 2012/06/12 17:13:58 I verified this works.
+ ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
+ selection_navigation_url_.scheme())) {
menu_model_.AddItem(
IDC_CONTENT_CONTEXT_GOTOURL,
l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_GOTOURL,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698