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

Side by Side Diff: content/browser/histogram_internals_request_job.cc

Issue 653863003: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/histogram_internals_request_job.h" 5 #include "content/browser/histogram_internals_request_job.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/statistics_recorder.h" 8 #include "base/metrics/statistics_recorder.h"
9 #include "base/profiler/scoped_profile.h"
9 #include "content/browser/histogram_synchronizer.h" 10 #include "content/browser/histogram_synchronizer.h"
10 #include "net/base/escape.h" 11 #include "net/base/escape.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
12 #include "net/url_request/url_request.h" 13 #include "net/url_request/url_request.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 HistogramInternalsRequestJob::HistogramInternalsRequestJob( 18 HistogramInternalsRequestJob::HistogramInternalsRequestJob(
18 net::URLRequest* request, net::NetworkDelegate* network_delegate) 19 net::URLRequest* request, net::NetworkDelegate* network_delegate)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 data->append("<table width=\"100%\">\n"); 53 data->append("<table width=\"100%\">\n");
53 54
54 base::StatisticsRecorder::WriteHTMLGraph(unescaped_query, data); 55 base::StatisticsRecorder::WriteHTMLGraph(unescaped_query, data);
55 } 56 }
56 57
57 int HistogramInternalsRequestJob::GetData( 58 int HistogramInternalsRequestJob::GetData(
58 std::string* mime_type, 59 std::string* mime_type,
59 std::string* charset, 60 std::string* charset,
60 std::string* data, 61 std::string* data,
61 const net::CompletionCallback& callback) const { 62 const net::CompletionCallback& callback) const {
63 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed.
64 tracked_objects::ScopedProfile tracking_profile(
65 FROM_HERE_WITH_EXPLICIT_FUNCTION(
66 "422489 HistogramInternalsRequestJob::GetData"));
67
62 mime_type->assign("text/html"); 68 mime_type->assign("text/html");
63 charset->assign("UTF8"); 69 charset->assign("UTF8");
64 70
65 data->clear(); 71 data->clear();
66 AboutHistogram(data, path_); 72 AboutHistogram(data, path_);
67 return net::OK; 73 return net::OK;
68 } 74 }
69 75
70 } // namespace content 76 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/view_appcache_internals_job.cc ('k') | content/browser/tcmalloc_internals_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698