Index: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
index 6ef4fcdda74e24240866b4ff7f80b046ff20765b..32f318bcdd63bd9b306c6431da4a8a5eee66005b 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
@@ -20,6 +20,7 @@ import org.chromium.chrome.browser.search_engines.TemplateUrlService; |
public class ChromeContextMenuPopulator implements ContextMenuPopulator { |
private final ChromeContextMenuItemDelegate mDelegate; |
private MenuInflater mMenuInflater; |
+ private final String BLANK_URL = "about:blank"; |
/** |
* Builds a {@link ChromeContextMenuPopulator}. |
@@ -38,10 +39,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { |
@Override |
public void buildContextMenu(ContextMenu menu, Context context, ContextMenuParams params) { |
- if (params.isImage() && !TextUtils.isEmpty(params.getSrcUrl())) |
- menu.setHeaderTitle(params.getSrcUrl()); |
- else if (!TextUtils.isEmpty(params.getLinkUrl()) ) |
- menu.setHeaderTitle(params.getLinkUrl()); |
+ if (!TextUtils.isEmpty(params.getLinkUrl()) && !params.getLinkUrl().equals(BLANK_URL)) |
+ menu.setHeaderTitle(params.getLinkUrl()); |
if (mMenuInflater == null) mMenuInflater = new MenuInflater(context); |