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

Side by Side Diff: content/browser/download/download_manager_impl.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 private: 158 private:
159 base::hash_map<int64, DownloadItem*>::const_iterator iter_; 159 base::hash_map<int64, DownloadItem*>::const_iterator iter_;
160 // Allow copy and assign. 160 // Allow copy and assign.
161 }; 161 };
162 162
163 void EnsureNoPendingDownloadJobsOnFile(bool* result) { 163 void EnsureNoPendingDownloadJobsOnFile(bool* result) {
164 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 164 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
165 *result = (DownloadFile::GetNumberOfDownloadFiles() == 0); 165 *result = (DownloadFile::GetNumberOfDownloadFiles() == 0);
166 BrowserThread::PostTask( 166 BrowserThread::PostTask(
167 BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure()); 167 BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
168 } 168 }
169 169
170 class DownloadItemFactoryImpl : public DownloadItemFactory { 170 class DownloadItemFactoryImpl : public DownloadItemFactory {
171 public: 171 public:
172 DownloadItemFactoryImpl() {} 172 DownloadItemFactoryImpl() {}
173 virtual ~DownloadItemFactoryImpl() {} 173 virtual ~DownloadItemFactoryImpl() {}
174 174
175 virtual DownloadItemImpl* CreatePersistedItem( 175 virtual DownloadItemImpl* CreatePersistedItem(
176 DownloadItemImplDelegate* delegate, 176 DownloadItemImplDelegate* delegate,
177 DownloadId download_id, 177 DownloadId download_id,
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 if (delegate_) 655 if (delegate_)
656 delegate_->OpenDownload(download); 656 delegate_->OpenDownload(download);
657 } 657 }
658 658
659 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 659 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
660 if (delegate_) 660 if (delegate_)
661 delegate_->ShowDownloadInShell(download); 661 delegate_->ShowDownloadInShell(download);
662 } 662 }
663 663
664 } // namespace content 664 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698