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

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

Issue 10542153: NetLogEventParameter to Callback refactoring 11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments Created 8 years, 6 months 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
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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 }
OLDNEW
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698