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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 2880933002: Download driver for components/download. (Closed)
Patch Set: Polish comment. Created 3 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 | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/download_request_core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 44ac7f581afaafa94fd42f39bbb25a546d2f11fb..ecd6d88ca03e663cce57053be28a5cb822deef2f 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -181,6 +181,7 @@ DownloadManagerImpl::DownloadManagerImpl(net::NetLog* net_log,
: item_factory_(new DownloadItemFactoryImpl()),
file_factory_(new DownloadFileFactory()),
shutdown_needed_(true),
+ initialized_(false),
browser_context_(browser_context),
delegate_(nullptr),
net_log_(net_log),
@@ -674,6 +675,17 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
return item;
}
+void DownloadManagerImpl::PostInitialization() {
+ DCHECK(!initialized_);
+ initialized_ = true;
+ for (auto& observer : observers_)
+ observer.OnManagerInitialized();
+}
+
+bool DownloadManagerImpl::IsManagerInitialized() const {
+ return initialized_;
+}
+
int DownloadManagerImpl::InProgressCount() const {
int count = 0;
for (const auto& it : downloads_) {
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/download_request_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698