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

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

Issue 7812036: Update base/timer.h code to pass through Location from call sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 should_pause); 231 should_pause);
232 is_paused_ = should_pause; 232 is_paused_ = should_pause;
233 } 233 }
234 } 234 }
235 235
236 DownloadResourceHandler::~DownloadResourceHandler() { 236 DownloadResourceHandler::~DownloadResourceHandler() {
237 } 237 }
238 238
239 void DownloadResourceHandler::StartPauseTimer() { 239 void DownloadResourceHandler::StartPauseTimer() {
240 if (!pause_timer_.IsRunning()) 240 if (!pause_timer_.IsRunning())
241 pause_timer_.Start(base::TimeDelta::FromMilliseconds(kThrottleTimeMs), this, 241 pause_timer_.Start(FROM_HERE,
242 base::TimeDelta::FromMilliseconds(kThrottleTimeMs), this,
242 &DownloadResourceHandler::CheckWriteProgress); 243 &DownloadResourceHandler::CheckWriteProgress);
243 } 244 }
244 245
245 std::string DownloadResourceHandler::DebugString() const { 246 std::string DownloadResourceHandler::DebugString() const {
246 return base::StringPrintf("{" 247 return base::StringPrintf("{"
247 " url_ = " "\"%s\"" 248 " url_ = " "\"%s\""
248 " download_id_ = " "%d" 249 " download_id_ = " "%d"
249 " global_id_ = {" 250 " global_id_ = {"
250 " child_id = " "%d" 251 " child_id = " "%d"
251 " request_id = " "%d" 252 " request_id = " "%d"
252 " }" 253 " }"
253 " render_view_id_ = " "%d" 254 " render_view_id_ = " "%d"
254 " save_info_.file_path = \"%" PRFilePath "\"" 255 " save_info_.file_path = \"%" PRFilePath "\""
255 " }", 256 " }",
256 request_->url().spec().c_str(), 257 request_->url().spec().c_str(),
257 download_id_, 258 download_id_,
258 global_id_.child_id, 259 global_id_.child_id,
259 global_id_.request_id, 260 global_id_.request_id,
260 render_view_id_, 261 render_view_id_,
261 save_info_.file_path.value().c_str()); 262 save_info_.file_path.value().c_str());
262 } 263 }
OLDNEW
« no previous file with comments | « content/browser/download/download_item.cc ('k') | content/browser/net/url_request_slow_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698