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

Side by Side Diff: chrome/browser/download/download_resource_throttle.cc

Issue 732633002: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke@ comments Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_fraudulent_certificate_reporter.cc » ('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 "chrome/browser/download/download_resource_throttle.h" 5 #include "chrome/browser/download/download_resource_throttle.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/profiler/scoped_tracker.h"
8 #include "chrome/browser/download/download_stats.h" 9 #include "chrome/browser/download/download_stats.h"
9 #include "content/public/browser/resource_controller.h" 10 #include "content/public/browser/resource_controller.h"
10 11
11 DownloadResourceThrottle::DownloadResourceThrottle( 12 DownloadResourceThrottle::DownloadResourceThrottle(
12 DownloadRequestLimiter* limiter, 13 DownloadRequestLimiter* limiter,
13 int render_process_id, 14 int render_process_id,
14 int render_view_id, 15 int render_view_id,
15 const GURL& url, 16 const GURL& url,
16 const std::string& request_method) 17 const std::string& request_method)
17 : querying_limiter_(true), 18 : querying_limiter_(true),
(...skipping 14 matching lines...) Expand all
32 void DownloadResourceThrottle::WillStartRequest(bool* defer) { 33 void DownloadResourceThrottle::WillStartRequest(bool* defer) {
33 WillDownload(defer); 34 WillDownload(defer);
34 } 35 }
35 36
36 void DownloadResourceThrottle::WillRedirectRequest(const GURL& new_url, 37 void DownloadResourceThrottle::WillRedirectRequest(const GURL& new_url,
37 bool* defer) { 38 bool* defer) {
38 WillDownload(defer); 39 WillDownload(defer);
39 } 40 }
40 41
41 void DownloadResourceThrottle::WillProcessResponse(bool* defer) { 42 void DownloadResourceThrottle::WillProcessResponse(bool* defer) {
43 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
44 tracked_objects::ScopedTracker tracking_profile(
45 FROM_HERE_WITH_EXPLICIT_FUNCTION(
46 "422516 DownloadResourceThrottle::WillProcessResponse"));
47
42 WillDownload(defer); 48 WillDownload(defer);
43 } 49 }
44 50
45 const char* DownloadResourceThrottle::GetNameForLogging() const { 51 const char* DownloadResourceThrottle::GetNameForLogging() const {
46 return "DownloadResourceThrottle"; 52 return "DownloadResourceThrottle";
47 } 53 }
48 54
49 void DownloadResourceThrottle::WillDownload(bool* defer) { 55 void DownloadResourceThrottle::WillDownload(bool* defer) {
50 DCHECK(!request_deferred_); 56 DCHECK(!request_deferred_);
51 57
(...skipping 22 matching lines...) Expand all
74 80
75 if (request_deferred_) { 81 if (request_deferred_) {
76 request_deferred_ = false; 82 request_deferred_ = false;
77 if (allow) { 83 if (allow) {
78 controller()->Resume(); 84 controller()->Resume();
79 } else { 85 } else {
80 controller()->Cancel(); 86 controller()->Cancel();
81 } 87 }
82 } 88 }
83 } 89 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_fraudulent_certificate_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698