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

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

Issue 2273373003: [Offline pages] Refactor createClientIdForTabSharing and ClientId/UUID creation (Closed)
Patch Set: Include Guid in name to prevent possible confusion 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 72f8380eaa94047f9d56cf3174aacd14ed8c6b7a..6549f246d08ed53e3bf2a61847ea02f5380938c8 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
@@ -53,12 +53,12 @@ public class ClientId {
}
/**
- * Create a client id for a tab when its contents need to be saved for sharing purposes.
- * @param id The tab id to wrap.
- * @return A {@link ClientId} that represents this TabId.
+ * Create a client id for a namespace.
+ * @param namespace The namespace for the client id.
+ * @return A {@link ClientId} for this namespace with generated UUID.
*/
- public static ClientId createClientIdForTabSharing() {
+ public static ClientId createGuidClientIdForNamespace(String namespace) {
String uuid = UUID.randomUUID().toString();
- return new ClientId(OfflinePageBridge.SHARE_NAMESPACE, uuid);
+ return new ClientId(namespace, uuid);
}
}

Powered by Google App Engine
This is Rietveld 408576698