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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java

Issue 398893006: Context menu should not shows data: in heading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/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..826a925b1839f20df6caa360739231dce5b75cd0 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
@@ -38,8 +38,13 @@ 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());
+ if (params.isImage() && !TextUtils.isEmpty(params.getSrcUrl())) {
+ if (!params.getSrcUrl().startsWith("data:")) {
Bernhard Bauer 2014/07/21 10:19:28 Hm, we probably shouldn't give the source URL prec
Jitu( very slow this week) 2014/07/21 11:11:35 Yes you are right... this will solve the problem.
Bernhard Bauer 2014/07/21 13:53:39 Wait, are you sure you are not confusing the link
Jitu( very slow this week) 2014/07/23 08:21:46 Yes you are right.. Link URL is "javascript:" Th
+ menu.setHeaderTitle(params.getSrcUrl());
+ } else {
+ menu.setHeaderTitle(params.getLinkUrl());
+ }
+ }
else if (!TextUtils.isEmpty(params.getLinkUrl()) )
menu.setHeaderTitle(params.getLinkUrl());
« 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