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

Unified Diff: content/browser/fileapi/mock_url_request_delegate.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/fileapi/mock_url_request_delegate.cc
diff --git a/content/browser/fileapi/mock_url_request_delegate.cc b/content/browser/fileapi/mock_url_request_delegate.cc
index 97e09f0df6f6285601f55bf3f98337f6399302d4..45d4ae3fe3a3b6161640fdbb5e16490c41fd9445 100644
--- a/content/browser/fileapi/mock_url_request_delegate.cc
+++ b/content/browser/fileapi/mock_url_request_delegate.cc
@@ -4,6 +4,7 @@
#include "mock_url_request_delegate.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/run_loop.h"
#include "net/base/io_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,6 +23,11 @@ MockURLRequestDelegate::~MockURLRequestDelegate() {
}
void MockURLRequestDelegate::OnResponseStarted(net::URLRequest* request) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 MockURLRequestDelegate::OnResponseStarted"));
+
if (request->status().is_success()) {
EXPECT_TRUE(request->response_headers());
ReadSome(request);
@@ -32,6 +38,11 @@ void MockURLRequestDelegate::OnResponseStarted(net::URLRequest* request) {
void MockURLRequestDelegate::OnReadCompleted(net::URLRequest* request,
int bytes_read) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 MockURLRequestDelegate::OnReadCompleted"));
+
if (bytes_read > 0)
ReceiveData(request, bytes_read);
else
« no previous file with comments | « content/browser/appcache/appcache_update_job.cc ('k') | content/browser/loader/power_save_block_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698