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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 900793009: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ResourceRequestInfoImpl* info = GetRequestInfo(); 139 ResourceRequestInfoImpl* info = GetRequestInfo();
140 info->set_was_ignored_by_handler(true); 140 info->set_was_ignored_by_handler(true);
141 CancelRequest(false); 141 CancelRequest(false);
142 } 142 }
143 143
144 void ResourceLoader::CancelWithError(int error_code) { 144 void ResourceLoader::CancelWithError(int error_code) {
145 CancelRequestInternal(error_code, false); 145 CancelRequestInternal(error_code, false);
146 } 146 }
147 147
148 void ResourceLoader::ReportUploadProgress() { 148 void ResourceLoader::ReportUploadProgress() {
149 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
150 // fixed.
151 tracked_objects::ScopedTracker tracking_profile(
152 FROM_HERE_WITH_EXPLICIT_FUNCTION(
153 "455952 ResourceLoader::ReportUploadProgress"));
149 if (waiting_for_upload_progress_ack_) 154 if (waiting_for_upload_progress_ack_)
150 return; // Send one progress event at a time. 155 return; // Send one progress event at a time.
151 156
152 net::UploadProgress progress = request_->GetUploadProgress(); 157 net::UploadProgress progress = request_->GetUploadProgress();
153 if (!progress.size()) 158 if (!progress.size())
154 return; // Nothing to upload. 159 return; // Nothing to upload.
155 160
156 if (progress.position() == last_upload_position_) 161 if (progress.position() == last_upload_position_)
157 return; // No progress made since last time. 162 return; // No progress made since last time.
158 163
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 855 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
851 } 856 }
852 } 857 }
853 858
854 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { 859 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) {
855 ssl_client_auth_handler_.reset(); 860 ssl_client_auth_handler_.reset();
856 request_->ContinueWithCertificate(cert); 861 request_->ContinueWithCertificate(cert);
857 } 862 }
858 863
859 } // namespace content 864 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698