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

Unified Diff: components/offline_pages/offline_page_test_store.cc

Issue 1521193002: [Offline pages] Refactor URL conversions from TabAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With proper test implementation Created 5 years 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
Index: components/offline_pages/offline_page_test_store.cc
diff --git a/components/offline_pages/offline_page_test_store.cc b/components/offline_pages/offline_page_test_store.cc
index 755191ce2b70565b5c773cdc999454b0e5833b36..c9deb863b2495fcff03f34e09cf90ce9dabc683c 100644
--- a/components/offline_pages/offline_page_test_store.cc
+++ b/components/offline_pages/offline_page_test_store.cc
@@ -30,6 +30,7 @@ void OfflinePageTestStore::Load(const LoadCallback& callback) {
} else {
load_status = OfflinePageMetadataStore::LOAD_SUCCEEDED;
}
+ DVLOG(1) << "Size of offline pages in store: " << offline_pages_.size();
task_runner_->PostTask(FROM_HERE,
base::Bind(callback, load_status, GetAllPages()));
}
@@ -83,4 +84,12 @@ std::vector<OfflinePageItem> OfflinePageTestStore::GetAllPages() const {
return offline_pages;
}
+void OfflinePageTestStore::SetStoreState(
jianli 2015/12/15 01:45:25 I am not sure we need this. Why not just calling A
fgorski 2015/12/15 16:33:02 Done.
+ const std::vector<OfflinePageItem>& offline_pages) {
+ offline_pages_.clear();
+ for (const auto& offline_page : offline_pages) {
+ offline_pages_[offline_page.bookmark_id] = offline_page;
+ }
+}
+
} // namespace offline_pages
« chrome/browser/android/tab_android.cc ('K') | « components/offline_pages/offline_page_test_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698