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

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

Issue 2384713004: [downloads] Correctly plumb client ID for download file scanning. (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 void DownloadManagerImpl::OnFileExistenceChecked(uint32_t download_id, 409 void DownloadManagerImpl::OnFileExistenceChecked(uint32_t download_id,
410 bool result) { 410 bool result) {
411 DCHECK_CURRENTLY_ON(BrowserThread::UI); 411 DCHECK_CURRENTLY_ON(BrowserThread::UI);
412 if (!result) { // File does not exist. 412 if (!result) { // File does not exist.
413 if (base::ContainsKey(downloads_, download_id)) 413 if (base::ContainsKey(downloads_, download_id))
414 downloads_[download_id]->OnDownloadedFileRemoved(); 414 downloads_[download_id]->OnDownloadedFileRemoved();
415 } 415 }
416 } 416 }
417 417
418 std::string DownloadManagerImpl::GetApplicationClientIdForFileScanning() const {
419 if (delegate_)
420 return delegate_->ApplicationClientIdForFileScanning();
421 return std::string();
422 }
423
418 BrowserContext* DownloadManagerImpl::GetBrowserContext() const { 424 BrowserContext* DownloadManagerImpl::GetBrowserContext() const {
419 return browser_context_; 425 return browser_context_;
420 } 426 }
421 427
422 void DownloadManagerImpl::CreateSavePackageDownloadItem( 428 void DownloadManagerImpl::CreateSavePackageDownloadItem(
423 const base::FilePath& main_file_path, 429 const base::FilePath& main_file_path,
424 const GURL& page_url, 430 const GURL& page_url,
425 const std::string& mime_type, 431 const std::string& mime_type,
426 std::unique_ptr<DownloadRequestHandleInterface> request_handle, 432 std::unique_ptr<DownloadRequestHandleInterface> request_handle,
427 const DownloadItemImplCreated& item_created) { 433 const DownloadItemImplCreated& item_created) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 if (delegate_) 760 if (delegate_)
755 delegate_->OpenDownload(download); 761 delegate_->OpenDownload(download);
756 } 762 }
757 763
758 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 764 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
759 if (delegate_) 765 if (delegate_)
760 delegate_->ShowDownloadInShell(download); 766 delegate_->ShowDownloadInShell(download);
761 } 767 }
762 768
763 } // namespace content 769 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698