| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo()); | 119 scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo()); |
| 120 save_info->file_path = params->file_path(); | 120 save_info->file_path = params->file_path(); |
| 121 save_info->suggested_name = params->suggested_name(); | 121 save_info->suggested_name = params->suggested_name(); |
| 122 save_info->offset = params->offset(); | 122 save_info->offset = params->offset(); |
| 123 save_info->hash_state = params->hash_state(); | 123 save_info->hash_state = params->hash_state(); |
| 124 save_info->prompt_for_save_location = params->prompt(); | 124 save_info->prompt_for_save_location = params->prompt(); |
| 125 save_info->file_stream = params->GetFileStream(); | 125 save_info->file_stream = params->GetFileStream(); |
| 126 | 126 |
| 127 params->resource_dispatcher_host()->BeginDownload( | 127 ResourceDispatcherHost::Get()->BeginDownload( |
| 128 request.Pass(), | 128 request.Pass(), |
| 129 params->content_initiated(), | 129 params->content_initiated(), |
| 130 params->resource_context(), | 130 params->resource_context(), |
| 131 params->render_process_host_id(), | 131 params->render_process_host_id(), |
| 132 params->render_view_host_routing_id(), | 132 params->render_view_host_routing_id(), |
| 133 params->prefer_cache(), | 133 params->prefer_cache(), |
| 134 save_info.Pass(), | 134 save_info.Pass(), |
| 135 download_id, | 135 download_id, |
| 136 params->callback()); | 136 params->callback()); |
| 137 } | 137 } |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 if (delegate_) | 640 if (delegate_) |
| 641 delegate_->OpenDownload(download); | 641 delegate_->OpenDownload(download); |
| 642 } | 642 } |
| 643 | 643 |
| 644 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { | 644 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { |
| 645 if (delegate_) | 645 if (delegate_) |
| 646 delegate_->ShowDownloadInShell(download); | 646 delegate_->ShowDownloadInShell(download); |
| 647 } | 647 } |
| 648 | 648 |
| 649 } // namespace content | 649 } // namespace content |
| OLD | NEW |