| 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..72f8380eaa94047f9d56cf3174aacd14ed8c6b7a 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
|
| @@ -6,6 +6,8 @@ package org.chromium.chrome.browser.offlinepages;
|
|
|
| import org.chromium.components.bookmarks.BookmarkId;
|
|
|
| +import java.util.UUID;
|
| +
|
| /**
|
| * Object to hold a client identifier for an offline page.
|
| */
|
| @@ -49,4 +51,14 @@ public class ClientId {
|
| if (id == null) return null;
|
| return new ClientId(OfflinePageBridge.BOOKMARK_NAMESPACE, id.toString());
|
| }
|
| +
|
| + /**
|
| + * 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.
|
| + */
|
| + public static ClientId createClientIdForTabSharing() {
|
| + String uuid = UUID.randomUUID().toString();
|
| + return new ClientId(OfflinePageBridge.SHARE_NAMESPACE, uuid);
|
| + }
|
| }
|
|
|