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

Unified Diff: components/offline_pages/offline_page_model.cc

Issue 1965633002: [Offline Pages] Introducing StorageManagerClient interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplifying interface per suggestion. 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
Index: components/offline_pages/offline_page_model.cc
diff --git a/components/offline_pages/offline_page_model.cc b/components/offline_pages/offline_page_model.cc
index d9a7fa2c689387676369f479fea89ad3d7f88959..3472066eb9fa33f5dfd6b8b1633e85fee0041ffa 100644
--- a/components/offline_pages/offline_page_model.cc
+++ b/components/offline_pages/offline_page_model.cc
@@ -124,7 +124,6 @@ OfflinePageModel::OfflinePageModel(
is_loaded_(false),
task_runner_(task_runner),
policy_controller_(new ClientPolicyController()),
- storage_manager_(new OfflinePageStorageManager(this)),
weak_ptr_factory_(this) {
task_runner_->PostTaskAndReply(
FROM_HERE, base::Bind(EnsureArchivesDirCreated, archives_dir_),
@@ -637,6 +636,10 @@ void OfflinePageModel::OnLoadDone(
UMA_HISTOGRAM_TIMES("OfflinePages.Model.ConstructionToLoadedEventTime",
base::TimeTicks::Now() - start_time);
+ // Create Storage Manager.
+ storage_manager_.reset(
+ new OfflinePageStorageManager(this, GetPolicyController()));
+
// Run all the delayed tasks.
for (const auto& delayed_task : delayed_tasks_)
delayed_task.Run();
« no previous file with comments | « components/offline_pages/offline_page_model.h ('k') | components/offline_pages/offline_page_storage_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698