Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 // to do a re-POST without user consent, and currently don't have a good | 88 // to do a re-POST without user consent, and currently don't have a good |
| 89 // plan on how to display the UI for that. | 89 // plan on how to display the UI for that. |
| 90 DCHECK(url_params.prefer_cache_); | 90 DCHECK(url_params.prefer_cache_); |
| 91 request->set_method("POST"); | 91 request->set_method("POST"); |
| 92 scoped_refptr<net::UploadData> upload_data = new net::UploadData(); | 92 scoped_refptr<net::UploadData> upload_data = new net::UploadData(); |
| 93 upload_data->set_identifier(url_params.post_id_); | 93 upload_data->set_identifier(url_params.post_id_); |
| 94 request->set_upload(upload_data); | 94 request->set_upload(upload_data); |
| 95 } | 95 } |
| 96 resource_dispatcher_host->BeginDownload( | 96 resource_dispatcher_host->BeginDownload( |
| 97 request.Pass(), | 97 request.Pass(), |
| 98 false /* from_web */, | |
|
darin (slow to review)
2012/05/12 18:23:08
nit: use C++ style comment
Randy Smith (Not in Mondays)
2012/05/12 19:56:37
Done.
| |
| 98 context, | 99 context, |
| 99 render_params.render_process_id_, | 100 render_params.render_process_id_, |
| 100 render_params.render_view_id_, | 101 render_params.render_view_id_, |
| 101 url_params.prefer_cache_, | 102 url_params.prefer_cache_, |
| 102 save_info, | 103 save_info, |
| 103 callback); | 104 callback); |
| 104 } | 105 } |
| 105 | 106 |
| 106 class MapValueIteratorAdapter { | 107 class MapValueIteratorAdapter { |
| 107 public: | 108 public: |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1208 if (it->second->IsComplete() && !it->second->GetOpened()) | 1209 if (it->second->IsComplete() && !it->second->GetOpened()) |
| 1209 ++num_unopened; | 1210 ++num_unopened; |
| 1210 } | 1211 } |
| 1211 download_stats::RecordOpensOutstanding(num_unopened); | 1212 download_stats::RecordOpensOutstanding(num_unopened); |
| 1212 } | 1213 } |
| 1213 | 1214 |
| 1214 void DownloadManagerImpl::SetFileManagerForTesting( | 1215 void DownloadManagerImpl::SetFileManagerForTesting( |
| 1215 DownloadFileManager* file_manager) { | 1216 DownloadFileManager* file_manager) { |
| 1216 file_manager_ = file_manager; | 1217 file_manager_ = file_manager; |
| 1217 } | 1218 } |
| OLD | NEW |