summaryrefslogtreecommitdiffstats
path: root/components/offline_pages/offline_page_model.h
diff options
context:
space:
mode:
authorfgorski <fgorski@chromium.org>2015-08-12 07:16:26 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-12 14:17:03 +0000
commit9999eca916c9cf7a97eed3e5538e8bd10bcda5ca (patch)
tree940a4a9026a38f38feb13a932a298c60b430bbc5 /components/offline_pages/offline_page_model.h
parentc8009fb7962f870a2dd28aa552151b9dc7f09375 (diff)
downloadchromium_src-9999eca916c9cf7a97eed3e5538e8bd10bcda5ca.zip
chromium_src-9999eca916c9cf7a97eed3e5538e8bd10bcda5ca.tar.gz
chromium_src-9999eca916c9cf7a97eed3e5538e8bd10bcda5ca.tar.bz2
[Offline pages] Adding capability to get page by bookmark Id
Adding capability to get page by bookmark Id in offline page model, Exposing that capability in offline page bridge, Adding tests to the offline page model and bridge. BUG=491352 R=jianli@chromium.org,mariakhomenko@chromium.org Review URL: https://codereview.chromium.org/1275633005 Cr-Commit-Position: refs/heads/master@{#343014}
Diffstat (limited to 'components/offline_pages/offline_page_model.h')
-rw-r--r--components/offline_pages/offline_page_model.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h
index dd39bb7..d477372 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -118,6 +118,12 @@ class OfflinePageModel : public KeyedService {
// Gets all available offline pages. Requires that the model is loaded.
const std::vector<OfflinePageItem>& GetAllPages() const;
+ // Gets an offline page associated with a specified |bookmark_id|. Returns
+ // true if a matching offline page exists, and |offline_page| will be updated
+ // with corresponding value, or false, if no offline page was found.
+ bool GetPageByBookmarkId(int64 bookmark_id,
+ OfflinePageItem* offline_page) const;
+
// Methods for testing only:
OfflinePageMetadataStore* GetStoreForTesting();