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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java

Issue 2202423004: [Offline Page]Enable share offline page from online tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newBranchOnTryout
Patch Set: Use get best page instead Created 4 years, 4 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
Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
index dbddbae2d21e8ef85c7868ec4fd677d40ca1c570..75b416fc1417af37dda813d095e61ce909c3645e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
@@ -49,4 +49,13 @@ public class ClientId {
if (id == null) return null;
return new ClientId(OfflinePageBridge.BOOKMARK_NAMESPACE, id.toString());
}
+
+ /**
+ * Create a client id for a tab with no bookmark associated with
fgorski 2016/08/08 17:59:22 nit: add a period at the end of the sentence.
Vivian 2016/08/08 21:40:36 Done.
+ * @param id The tab id to wrap.
+ * @return A {@link ClientId} that represents this TabId.
+ */
+ public static ClientId createClientIdForTabId(int id) {
+ return new ClientId(OfflinePageBridge.SHARE_NAMESPACE, Integer.toString(id));
fgorski 2016/08/08 17:59:22 could you please create a GUID instead of basing t
Vivian 2016/08/08 21:40:36 Done.
+ }
}

Powered by Google App Engine
This is Rietveld 408576698