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

Unified Diff: components/offline_pages/stub_offline_page_model.cc

Issue 2016313003: Adds unit tests for Offliner SavePage implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed Fake* to Stub* and added files to proper build target Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/stub_offline_page_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/stub_offline_page_model.cc
diff --git a/components/offline_pages/stub_offline_page_model.cc b/components/offline_pages/stub_offline_page_model.cc
new file mode 100644
index 0000000000000000000000000000000000000000..956ea0be39fa7152c167379692aafc25d3dedd1e
--- /dev/null
+++ b/components/offline_pages/stub_offline_page_model.cc
@@ -0,0 +1,78 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/offline_pages/stub_offline_page_model.h"
+
+namespace offline_pages {
+
+StubOfflinePageModel::StubOfflinePageModel() {}
+StubOfflinePageModel::~StubOfflinePageModel() {}
+
+void StubOfflinePageModel::AddObserver(Observer* observer) {}
+void StubOfflinePageModel::RemoveObserver(Observer* observer) {}
+void StubOfflinePageModel::SavePage(
+ const GURL& url,
+ const ClientId& client_id,
+ std::unique_ptr<OfflinePageArchiver> archiver,
+ const SavePageCallback& callback) {}
+void StubOfflinePageModel::MarkPageAccessed(int64_t offline_id) {}
+void StubOfflinePageModel::ClearAll(const base::Closure& callback) {}
+void StubOfflinePageModel::DeletePagesByOfflineId(
+ const std::vector<int64_t>& offline_ids,
+ const DeletePageCallback& callback) {}
+void StubOfflinePageModel::DeletePagesByURLPredicate(
+ const UrlPredicate& predicate,
+ const DeletePageCallback& callback) {}
+void StubOfflinePageModel::HasPages(const std::string& name_space,
+ const HasPagesCallback& callback) {}
+void StubOfflinePageModel::CheckPagesExistOffline(
+ const std::set<GURL>& urls,
+ const CheckPagesExistOfflineCallback& callback) {}
+void StubOfflinePageModel::GetAllPages(
+ const MultipleOfflinePageItemCallback& callback) {}
+void StubOfflinePageModel::GetOfflineIdsForClientId(
+ const ClientId& client_id,
+ const MultipleOfflineIdCallback& callback) {}
+const std::vector<int64_t> StubOfflinePageModel::MaybeGetOfflineIdsForClientId(
+ const ClientId& client_id) const {
+ std::vector<int64_t> offline_ids;
+ return offline_ids;
+}
+void StubOfflinePageModel::GetPageByOfflineId(
+ int64_t offline_id,
+ const SingleOfflinePageItemCallback& callback) {}
+const OfflinePageItem* StubOfflinePageModel::MaybeGetPageByOfflineId(
+ int64_t offline_id) const {
+ return nullptr;
+}
+void StubOfflinePageModel::GetPageByOfflineURL(
+ const GURL& offline_url,
+ const SingleOfflinePageItemCallback& callback) {}
+const OfflinePageItem* StubOfflinePageModel::MaybeGetPageByOfflineURL(
+ const GURL& offline_url) const {
+ return nullptr;
+}
+void StubOfflinePageModel::GetPagesByOnlineURL(
+ const GURL& online_url,
+ const MultipleOfflinePageItemCallback& callback) {}
+void StubOfflinePageModel::GetBestPageForOnlineURL(
+ const GURL& online_url,
+ const SingleOfflinePageItemCallback callback) {}
+const OfflinePageItem* StubOfflinePageModel::MaybeGetBestPageForOnlineURL(
+ const GURL& online_url) const {
+ return nullptr;
+}
+void StubOfflinePageModel::CheckForExternalFileDeletion() {}
+void StubOfflinePageModel::ExpirePages(
+ const std::vector<int64_t>& offline_ids,
+ const base::Time& expiration_time,
+ const base::Callback<void(bool)>& callback) {}
+ClientPolicyController* StubOfflinePageModel::GetPolicyController() {
+ return nullptr;
+}
+bool StubOfflinePageModel::is_loaded() const {
+ return true;
+}
+
+} // namespace offline_pages
« 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