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

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

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
« no previous file with comments | « components/offline_pages/stub_offline_page_model.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "components/offline_pages/stub_offline_page_model.h" 5 #include "components/offline_pages/stub_offline_page_model.h"
6 6
7 namespace offline_pages { 7 namespace offline_pages {
8 8
9 StubOfflinePageModel::StubOfflinePageModel() {} 9 StubOfflinePageModel::StubOfflinePageModel() {}
10 StubOfflinePageModel::~StubOfflinePageModel() {} 10 StubOfflinePageModel::~StubOfflinePageModel() {}
11 11
12 void StubOfflinePageModel::AddObserver(Observer* observer) {} 12 void StubOfflinePageModel::AddObserver(Observer* observer) {}
13 void StubOfflinePageModel::RemoveObserver(Observer* observer) {} 13 void StubOfflinePageModel::RemoveObserver(Observer* observer) {}
14 void StubOfflinePageModel::SavePage( 14 void StubOfflinePageModel::SavePage(
15 const GURL& url, 15 const GURL& url,
16 const ClientId& client_id, 16 const ClientId& client_id,
17 int64_t proposed_offline_id, 17 int64_t proposed_offline_id,
18 std::unique_ptr<OfflinePageArchiver> archiver, 18 std::unique_ptr<OfflinePageArchiver> archiver,
19 const SavePageCallback& callback) {} 19 const SavePageCallback& callback) {}
20 void StubOfflinePageModel::MarkPageAccessed(int64_t offline_id) {} 20 void StubOfflinePageModel::MarkPageAccessed(int64_t offline_id) {}
21 void StubOfflinePageModel::DeletePagesByOfflineId( 21 void StubOfflinePageModel::DeletePagesByOfflineId(
22 const std::vector<int64_t>& offline_ids, 22 const std::vector<int64_t>& offline_ids,
23 const DeletePageCallback& callback) {} 23 const DeletePageCallback& callback) {}
24 void StubOfflinePageModel::DeletePagesByClientIds(
25 const std::vector<ClientId>& client_ids,
26 const DeletePageCallback& callback) {}
27 void StubOfflinePageModel::GetPagesByClientIds(
28 const std::vector<ClientId>& client_ids,
29 const MultipleOfflinePageItemCallback& callback) {}
24 void StubOfflinePageModel::DeleteCachedPagesByURLPredicate( 30 void StubOfflinePageModel::DeleteCachedPagesByURLPredicate(
25 const UrlPredicate& predicate, 31 const UrlPredicate& predicate,
26 const DeletePageCallback& callback) {} 32 const DeletePageCallback& callback) {}
27 void StubOfflinePageModel::CheckPagesExistOffline( 33 void StubOfflinePageModel::CheckPagesExistOffline(
28 const std::set<GURL>& urls, 34 const std::set<GURL>& urls,
29 const CheckPagesExistOfflineCallback& callback) {} 35 const CheckPagesExistOfflineCallback& callback) {}
30 void StubOfflinePageModel::GetAllPages( 36 void StubOfflinePageModel::GetAllPages(
31 const MultipleOfflinePageItemCallback& callback) {} 37 const MultipleOfflinePageItemCallback& callback) {}
32 void StubOfflinePageModel::GetAllPagesWithExpired( 38 void StubOfflinePageModel::GetAllPagesWithExpired(
33 const MultipleOfflinePageItemCallback& callback) {} 39 const MultipleOfflinePageItemCallback& callback) {}
34 void StubOfflinePageModel::GetOfflineIdsForClientId( 40 void StubOfflinePageModel::GetOfflineIdsForClientId(
35 const ClientId& client_id, 41 const ClientId& client_id,
36 const MultipleOfflineIdCallback& callback) {} 42 const MultipleOfflineIdCallback& callback) {}
37 const std::vector<int64_t> StubOfflinePageModel::MaybeGetOfflineIdsForClientId(
38 const ClientId& client_id) const {
39 std::vector<int64_t> offline_ids;
40 return offline_ids;
41 }
42 void StubOfflinePageModel::GetPageByOfflineId( 43 void StubOfflinePageModel::GetPageByOfflineId(
43 int64_t offline_id, 44 int64_t offline_id,
44 const SingleOfflinePageItemCallback& callback) {} 45 const SingleOfflinePageItemCallback& callback) {}
45 const OfflinePageItem* StubOfflinePageModel::MaybeGetPageByOfflineId(
46 int64_t offline_id) const {
47 return nullptr;
48 }
49 void StubOfflinePageModel::GetPagesByOnlineURL( 46 void StubOfflinePageModel::GetPagesByOnlineURL(
50 const GURL& online_url, 47 const GURL& online_url,
51 const MultipleOfflinePageItemCallback& callback) {} 48 const MultipleOfflinePageItemCallback& callback) {}
52 const OfflinePageItem* StubOfflinePageModel::MaybeGetBestPageForOnlineURL(
53 const GURL& online_url) const {
54 return nullptr;
55 }
56 void StubOfflinePageModel::ExpirePages( 49 void StubOfflinePageModel::ExpirePages(
57 const std::vector<int64_t>& offline_ids, 50 const std::vector<int64_t>& offline_ids,
58 const base::Time& expiration_time, 51 const base::Time& expiration_time,
59 const base::Callback<void(bool)>& callback) {} 52 const base::Callback<void(bool)>& callback) {}
60 ClientPolicyController* StubOfflinePageModel::GetPolicyController() { 53 ClientPolicyController* StubOfflinePageModel::GetPolicyController() {
61 return nullptr; 54 return nullptr;
62 } 55 }
63 bool StubOfflinePageModel::is_loaded() const { 56 bool StubOfflinePageModel::is_loaded() const {
64 return true; 57 return true;
65 } 58 }
66 OfflineEventLogger* StubOfflinePageModel::GetLogger() { 59 OfflineEventLogger* StubOfflinePageModel::GetLogger() {
67 return nullptr; 60 return nullptr;
68 } 61 }
69 } // namespace offline_pages 62 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/stub_offline_page_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698