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

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

Issue 74523002: [Downloads] Update origin info after each response. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better descriptions. Created 7 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 | 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // If the download is no longer known to the DownloadManager, then it was 391 // If the download is no longer known to the DownloadManager, then it was
392 // removed after it was resumed. Ignore. If the download is cancelled 392 // removed after it was resumed. Ignore. If the download is cancelled
393 // while resuming, then also ignore the request. 393 // while resuming, then also ignore the request.
394 info->request_handle.CancelRequest(); 394 info->request_handle.CancelRequest();
395 if (!on_started.is_null()) 395 if (!on_started.is_null())
396 on_started.Run(NULL, net::ERR_ABORTED); 396 on_started.Run(NULL, net::ERR_ABORTED);
397 return; 397 return;
398 } 398 }
399 download = item_iterator->second; 399 download = item_iterator->second;
400 DCHECK_EQ(DownloadItem::INTERRUPTED, download->GetState()); 400 DCHECK_EQ(DownloadItem::INTERRUPTED, download->GetState());
401 download->MergeOriginInfoOnResume(*info);
401 } 402 }
402 403
403 base::FilePath default_download_directory; 404 base::FilePath default_download_directory;
404 if (delegate_) { 405 if (delegate_) {
405 base::FilePath website_save_directory; // Unused 406 base::FilePath website_save_directory; // Unused
406 bool skip_dir_check = false; // Unused 407 bool skip_dir_check = false; // Unused
407 delegate_->GetSaveDir(GetBrowserContext(), &website_save_directory, 408 delegate_->GetSaveDir(GetBrowserContext(), &website_save_directory,
408 &default_download_directory, &skip_dir_check); 409 &default_download_directory, &skip_dir_check);
409 } 410 }
410 411
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (delegate_) 708 if (delegate_)
708 delegate_->OpenDownload(download); 709 delegate_->OpenDownload(download);
709 } 710 }
710 711
711 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 712 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
712 if (delegate_) 713 if (delegate_)
713 delegate_->ShowDownloadInShell(download); 714 delegate_->ShowDownloadInShell(download);
714 } 715 }
715 716
716 } // namespace content 717 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698