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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.offlinepages; 5 package org.chromium.chrome.browser.offlinepages;
6 6
7 import org.chromium.components.bookmarks.BookmarkId; 7 import org.chromium.components.bookmarks.BookmarkId;
8 8
9 /** 9 /**
10 * Object to hold a client identifier for an offline page. 10 * Object to hold a client identifier for an offline page.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 /** 43 /**
44 * Create a client id for a bookmark 44 * Create a client id for a bookmark
45 * @param id The bookmark id to wrap. 45 * @param id The bookmark id to wrap.
46 * @return A {@link ClientId} that represents this BookmarkId. 46 * @return A {@link ClientId} that represents this BookmarkId.
47 */ 47 */
48 public static ClientId createClientIdForBookmarkId(BookmarkId id) { 48 public static ClientId createClientIdForBookmarkId(BookmarkId id) {
49 if (id == null) return null; 49 if (id == null) return null;
50 return new ClientId(OfflinePageBridge.BOOKMARK_NAMESPACE, id.toString()) ; 50 return new ClientId(OfflinePageBridge.BOOKMARK_NAMESPACE, id.toString()) ;
51 } 51 }
52
53 /**
54 * 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.
55 * @param id The tab id to wrap.
56 * @return A {@link ClientId} that represents this TabId.
57 */
58 public static ClientId createClientIdForTabId(int id) {
59 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.
60 }
52 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698