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

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

Issue 1513413002: Enable "Hide Extension" option when "Save Link As" on the Mac Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 5 years 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // DownloadItemImplDelegate::DownloadTargetCallback and 253 // DownloadItemImplDelegate::DownloadTargetCallback and
254 // DownloadManagerDelegate::DownloadTargetCallback having the same 254 // DownloadManagerDelegate::DownloadTargetCallback having the same
255 // type. If the types ever diverge, gasket code will need to 255 // type. If the types ever diverge, gasket code will need to
256 // be written here. 256 // be written here.
257 if (!delegate_ || !delegate_->DetermineDownloadTarget(item, callback)) { 257 if (!delegate_ || !delegate_->DetermineDownloadTarget(item, callback)) {
258 base::FilePath target_path = item->GetForcedFilePath(); 258 base::FilePath target_path = item->GetForcedFilePath();
259 // TODO(asanka): Determine a useful path if |target_path| is empty. 259 // TODO(asanka): Determine a useful path if |target_path| is empty.
260 callback.Run(target_path, 260 callback.Run(target_path,
261 DownloadItem::TARGET_DISPOSITION_OVERWRITE, 261 DownloadItem::TARGET_DISPOSITION_OVERWRITE,
262 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 262 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
263 target_path); 263 target_path,
264 false);
264 } 265 }
265 } 266 }
266 267
267 bool DownloadManagerImpl::ShouldCompleteDownload( 268 bool DownloadManagerImpl::ShouldCompleteDownload(
268 DownloadItemImpl* item, const base::Closure& complete_callback) { 269 DownloadItemImpl* item, const base::Closure& complete_callback) {
269 if (!delegate_ || 270 if (!delegate_ ||
270 delegate_->ShouldCompleteDownload(item, complete_callback)) { 271 delegate_->ShouldCompleteDownload(item, complete_callback)) {
271 return true; 272 return true;
272 } 273 }
273 // Otherwise, the delegate has accepted responsibility to run the 274 // Otherwise, the delegate has accepted responsibility to run the
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 if (delegate_) 726 if (delegate_)
726 delegate_->OpenDownload(download); 727 delegate_->OpenDownload(download);
727 } 728 }
728 729
729 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 730 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
730 if (delegate_) 731 if (delegate_)
731 delegate_->ShowDownloadInShell(download); 732 delegate_->ShowDownloadInShell(download);
732 } 733 }
733 734
734 } // namespace content 735 } // 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