| OLD | NEW |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 save_info->file = params->GetFile(); | 122 save_info->file = params->GetFile(); |
| 123 | 123 |
| 124 ResourceDispatcherHost::Get()->BeginDownload( | 124 ResourceDispatcherHost::Get()->BeginDownload( |
| 125 request.Pass(), | 125 request.Pass(), |
| 126 params->referrer(), | 126 params->referrer(), |
| 127 params->content_initiated(), | 127 params->content_initiated(), |
| 128 params->resource_context(), | 128 params->resource_context(), |
| 129 params->render_process_host_id(), | 129 params->render_process_host_id(), |
| 130 params->render_view_host_routing_id(), | 130 params->render_view_host_routing_id(), |
| 131 params->prefer_cache(), | 131 params->prefer_cache(), |
| 132 params->do_not_prompt_for_login(), |
| 132 save_info.Pass(), | 133 save_info.Pass(), |
| 133 download_id, | 134 download_id, |
| 134 params->callback()); | 135 params->callback()); |
| 135 } | 136 } |
| 136 | 137 |
| 137 class MapValueIteratorAdapter { | 138 class MapValueIteratorAdapter { |
| 138 public: | 139 public: |
| 139 explicit MapValueIteratorAdapter( | 140 explicit MapValueIteratorAdapter( |
| 140 base::hash_map<int64, DownloadItem*>::const_iterator iter) | 141 base::hash_map<int64, DownloadItem*>::const_iterator iter) |
| 141 : iter_(iter) { | 142 : iter_(iter) { |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 if (delegate_) | 718 if (delegate_) |
| 718 delegate_->OpenDownload(download); | 719 delegate_->OpenDownload(download); |
| 719 } | 720 } |
| 720 | 721 |
| 721 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { | 722 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { |
| 722 if (delegate_) | 723 if (delegate_) |
| 723 delegate_->ShowDownloadInShell(download); | 724 delegate_->ShowDownloadInShell(download); |
| 724 } | 725 } |
| 725 | 726 |
| 726 } // namespace content | 727 } // namespace content |
| OLD | NEW |