Bug 1234967 - Post: Explain in which circumstances URLS can uniquely identify a bookmark r?rnewman draft
authorAndrzej Hunt <andrzej@ahunt.org>
Tue, 29 Mar 2016 14:21:33 -0700
changeset 347701 b7c2661ed29ef95ead4acb9e944ff6ad9fd247b1
parent 347700 512f9dae8a28fbc338c66d1f0448ffc7a977ca8c
child 517690 81f79d6f7df5a9c1d90ac9a94e8b50186ac18456
push id14647
push userbmo:ahunt@mozilla.com
push dateTue, 05 Apr 2016 18:15:38 +0000
reviewersrnewman
bugs1234967
milestone48.0a1
Bug 1234967 - Post: Explain in which circumstances URLS can uniquely identify a bookmark r?rnewman MozReview-Commit-ID: 4ToKmASvwmS
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -1202,16 +1202,19 @@ public class BrowserApp extends GeckoApp
                     return;
                 }
 
                 if (itemId == 0) {
                     final String extrasId = res.getResourceEntryName(R.string.contextmenu_edit_bookmark);
                     Telemetry.sendUIEvent(TelemetryContract.Event.ACTION,
                         TelemetryContract.Method.DIALOG, extrasId);
 
+                    // In this case we're allowed to use the bookmark URL (as opposed to id). We know the
+                    // URL uniquely identifies the bookmark as it's just been created (the UI only lets us create
+                    // a new bookmark if a given URL isn't bookmarked anywhere).
                     new EditBookmarkDialog(BrowserApp.this).show(tab.getURL());
                 } else if (itemId == 1) {
                     final String extrasId = res.getResourceEntryName(R.string.contextmenu_add_to_launcher);
                     Telemetry.sendUIEvent(TelemetryContract.Event.ACTION,
                         TelemetryContract.Method.DIALOG, extrasId);
 
                     final String url = tab.getURL();
                     final String title = tab.getDisplayTitle();