| 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_file_impl.h" | 5 #include "content/browser/download/download_file_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 BrowserThread::PostTask( | 250 BrowserThread::PostTask( |
| 251 BrowserThread::UI, FROM_HERE, | 251 BrowserThread::UI, FROM_HERE, |
| 252 base::Bind(&DownloadManager::OnResponseCompleted, | 252 base::Bind(&DownloadManager::OnResponseCompleted, |
| 253 download_manager_, id_.local(), | 253 download_manager_, id_.local(), |
| 254 BytesSoFar(), hash)); | 254 BytesSoFar(), hash)); |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 if (bound_net_log_.IsLoggingAllEvents()) { | 257 if (bound_net_log_.IsLoggingAllEvents()) { |
| 258 bound_net_log_.AddEvent( | 258 bound_net_log_.AddEvent( |
| 259 net::NetLog::TYPE_DOWNLOAD_STREAM_DRAINED, | 259 net::NetLog::TYPE_DOWNLOAD_STREAM_DRAINED, |
| 260 make_scoped_refptr(new download_net_logs::FileStreamDrainedParameters( | 260 base::Bind(&download_net_logs::FileStreamDrainedCallback, |
| 261 total_incoming_data_size, num_buffers))); | 261 total_incoming_data_size, num_buffers)); |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 void DownloadFileImpl::SendUpdate() { | 265 void DownloadFileImpl::SendUpdate() { |
| 266 if (download_manager_.get()) { | 266 if (download_manager_.get()) { |
| 267 BrowserThread::PostTask( | 267 BrowserThread::PostTask( |
| 268 BrowserThread::UI, FROM_HERE, | 268 BrowserThread::UI, FROM_HERE, |
| 269 base::Bind(&DownloadManager::UpdateDownload, | 269 base::Bind(&DownloadManager::UpdateDownload, |
| 270 download_manager_, id_.local(), | 270 download_manager_, id_.local(), |
| 271 BytesSoFar(), CurrentSpeed(), GetHashState())); | 271 BytesSoFar(), CurrentSpeed(), GetHashState())); |
| 272 } | 272 } |
| 273 } | 273 } |
| OLD | NEW |