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

Side by Side Diff: chrome/browser/renderer_host/safe_browsing_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 "chrome/browser/renderer_host/safe_browsing_resource_handler.h" 5 #include "chrome/browser/renderer_host/safe_browsing_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/prerender/prerender_final_status.h" 9 #include "chrome/browser/prerender/prerender_final_status.h"
10 #include "chrome/browser/prerender/prerender_tracker.h" 10 #include "chrome/browser/prerender/prerender_tracker.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return true; 275 return true;
276 } 276 }
277 277
278 AddRef(); // Balanced in OnUrlCheckResult(). 278 AddRef(); // Balanced in OnUrlCheckResult().
279 state_ = STATE_CHECKING_URL; 279 state_ = STATE_CHECKING_URL;
280 280
281 // Record the start time of the check. 281 // Record the start time of the check.
282 url_check_start_time_ = base::TimeTicks::Now(); 282 url_check_start_time_ = base::TimeTicks::Now();
283 283
284 // Start a timer to abort the check if it takes too long. 284 // Start a timer to abort the check if it takes too long.
285 timer_.Start(base::TimeDelta::FromMilliseconds(kCheckUrlTimeoutMs), 285 timer_.Start(FROM_HERE,
286 base::TimeDelta::FromMilliseconds(kCheckUrlTimeoutMs),
286 this, &SafeBrowsingResourceHandler::OnCheckUrlTimeout); 287 this, &SafeBrowsingResourceHandler::OnCheckUrlTimeout);
287 288
288 return false; 289 return false;
289 } 290 }
290 291
291 void SafeBrowsingResourceHandler::ResumeRequest() { 292 void SafeBrowsingResourceHandler::ResumeRequest() {
292 CHECK(state_ == STATE_NONE); 293 CHECK(state_ == STATE_NONE);
293 CHECK(defer_state_ != DEFERRED_NONE); 294 CHECK(defer_state_ != DEFERRED_NONE);
294 295
295 // Resume whatever stage got paused by the safe browsing check. 296 // Resume whatever stage got paused by the safe browsing check.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 rdh_->FollowDeferredRedirect(render_process_host_id_, request_id, 349 rdh_->FollowDeferredRedirect(render_process_host_id_, request_id,
349 false, GURL()); 350 false, GURL());
350 } 351 }
351 } 352 }
352 353
353 void SafeBrowsingResourceHandler::ClearDeferredRequestInfo() { 354 void SafeBrowsingResourceHandler::ClearDeferredRequestInfo() {
354 deferred_request_id_ = -1; 355 deferred_request_id_ = -1;
355 deferred_url_ = GURL(); 356 deferred_url_ = GURL();
356 deferred_redirect_response_ = NULL; 357 deferred_redirect_response_ = NULL;
357 } 358 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/safe_browsing/protocol_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698