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

Side by Side Diff: components/offline_pages/stub_offline_page_model.h

Issue 2429943002: Remove all synchronous methods from OfflinePageBridge. (Closed)
Patch Set: Fix a test and address nits. Created 4 years, 2 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 #ifndef COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_
6 #define COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 void AddObserver(Observer* observer) override; 25 void AddObserver(Observer* observer) override;
26 void RemoveObserver(Observer* observer) override; 26 void RemoveObserver(Observer* observer) override;
27 void SavePage(const GURL& url, 27 void SavePage(const GURL& url,
28 const ClientId& client_id, 28 const ClientId& client_id,
29 int64_t proposed_offline_id, 29 int64_t proposed_offline_id,
30 std::unique_ptr<OfflinePageArchiver> archiver, 30 std::unique_ptr<OfflinePageArchiver> archiver,
31 const SavePageCallback& callback) override; 31 const SavePageCallback& callback) override;
32 void MarkPageAccessed(int64_t offline_id) override; 32 void MarkPageAccessed(int64_t offline_id) override;
33 void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, 33 void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
34 const DeletePageCallback& callback) override; 34 const DeletePageCallback& callback) override;
35 void DeletePagesByClientIds(const std::vector<ClientId>& client_ids,
36 const DeletePageCallback& callback) override;
37 void GetPagesByClientIds(
38 const std::vector<ClientId>& client_ids,
39 const MultipleOfflinePageItemCallback& callback) override;
35 void DeleteCachedPagesByURLPredicate( 40 void DeleteCachedPagesByURLPredicate(
36 const UrlPredicate& predicate, 41 const UrlPredicate& predicate,
37 const DeletePageCallback& callback) override; 42 const DeletePageCallback& callback) override;
38 void CheckPagesExistOffline( 43 void CheckPagesExistOffline(
39 const std::set<GURL>& urls, 44 const std::set<GURL>& urls,
40 const CheckPagesExistOfflineCallback& callback) override; 45 const CheckPagesExistOfflineCallback& callback) override;
41 void GetAllPages(const MultipleOfflinePageItemCallback& callback) override; 46 void GetAllPages(const MultipleOfflinePageItemCallback& callback) override;
42 void GetAllPagesWithExpired( 47 void GetAllPagesWithExpired(
43 const MultipleOfflinePageItemCallback& callback) override; 48 const MultipleOfflinePageItemCallback& callback) override;
44 void GetOfflineIdsForClientId( 49 void GetOfflineIdsForClientId(
45 const ClientId& client_id, 50 const ClientId& client_id,
46 const MultipleOfflineIdCallback& callback) override; 51 const MultipleOfflineIdCallback& callback) override;
47 const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
48 const ClientId& client_id) const override;
49 void GetPageByOfflineId( 52 void GetPageByOfflineId(
50 int64_t offline_id, 53 int64_t offline_id,
51 const SingleOfflinePageItemCallback& callback) override; 54 const SingleOfflinePageItemCallback& callback) override;
52 const OfflinePageItem* MaybeGetPageByOfflineId(
53 int64_t offline_id) const override;
54 void GetPagesByOnlineURL( 55 void GetPagesByOnlineURL(
55 const GURL& online_url, 56 const GURL& online_url,
56 const MultipleOfflinePageItemCallback& callback) override; 57 const MultipleOfflinePageItemCallback& callback) override;
57 const OfflinePageItem* MaybeGetBestPageForOnlineURL(
58 const GURL& online_url) const override;
59 void ExpirePages(const std::vector<int64_t>& offline_ids, 58 void ExpirePages(const std::vector<int64_t>& offline_ids,
60 const base::Time& expiration_time, 59 const base::Time& expiration_time,
61 const base::Callback<void(bool)>& callback) override; 60 const base::Callback<void(bool)>& callback) override;
62 ClientPolicyController* GetPolicyController() override; 61 ClientPolicyController* GetPolicyController() override;
63 bool is_loaded() const override; 62 bool is_loaded() const override;
64 OfflineEventLogger* GetLogger() override; 63 OfflineEventLogger* GetLogger() override;
65 64
66 private: 65 private:
67 std::vector<int64_t> offline_ids_; 66 std::vector<int64_t> offline_ids_;
68 }; 67 };
69 68
70 } // namespace offline_pages 69 } // namespace offline_pages
71 70
72 #endif // COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_ 71 #endif // COMPONENTS_OFFLINE_PAGES_STUB_OFFLINE_PAGE_MODEL_H_
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_model_impl_unittest.cc ('k') | components/offline_pages/stub_offline_page_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698