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

Unified Diff: components/offline_pages/offline_page_model_impl.cc

Issue 2180973002: [Offline pages] Adapting OfflinePageDownloadBridge to DownloadUIAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui-adapter
Patch Set: Hooking up download ui adapter to offline page model and bridge Created 4 years, 5 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_impl.cc
diff --git a/components/offline_pages/offline_page_model_impl.cc b/components/offline_pages/offline_page_model_impl.cc
index f08f1feefb1e2accacc8d5f76395a994a43ffd2f..58f86a36f6418c223c82ac20bb5d6cff5bbf38ba 100644
--- a/components/offline_pages/offline_page_model_impl.cc
+++ b/components/offline_pages/offline_page_model_impl.cc
@@ -20,6 +20,7 @@
#include "components/offline_pages/archive_manager.h"
#include "components/offline_pages/client_namespace_constants.h"
#include "components/offline_pages/client_policy_controller.h"
+#include "components/offline_pages/downloads/download_ui_adapter.h"
#include "components/offline_pages/offline_page_item.h"
#include "components/offline_pages/offline_page_storage_manager.h"
#include "url/gurl.h"
@@ -256,6 +257,7 @@ OfflinePageModelImpl::OfflinePageModelImpl(
policy_controller_(new ClientPolicyController()),
archive_manager_(new ArchiveManager(archives_dir, task_runner)),
weak_ptr_factory_(this) {
+ download_ui_adapter_.reset(new DownloadUIAdapter(this));
archive_manager_->EnsureArchivesDirCreated(
base::Bind(&OfflinePageModelImpl::OnEnsureArchivesDirCreatedDone,
weak_ptr_factory_.GetWeakPtr(), base::TimeTicks::Now()));
@@ -683,6 +685,10 @@ ClientPolicyController* OfflinePageModelImpl::GetPolicyController() {
return policy_controller_.get();
}
+DownloadUIAdapter* OfflinePageModelImpl::GetDownloadUIAdapter() {
+ return download_ui_adapter_.get();
+}
+
OfflinePageMetadataStore* OfflinePageModelImpl::GetStoreForTesting() {
return store_.get();
}

Powered by Google App Engine
This is Rietveld 408576698