Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } |
| OLD | NEW |