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

Side by Side Diff: chrome/browser/net/view_net_internals_job_factory.cc

Issue 1556018: Add support for attaching custom parameters to NetLog events. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments Created 10 years, 8 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/net/view_net_internals_job_factory.h" 5 #include "chrome/browser/net/view_net_internals_job_factory.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 441
442 DrawCommandButton("Clear", "clear-hostresolver-trace", out); 442 DrawCommandButton("Clear", "clear-hostresolver-trace", out);
443 443
444 if (resolver->IsRequestsTracingEnabled()) { 444 if (resolver->IsRequestsTracingEnabled()) {
445 DrawCommandButton("Disable tracing", "hostresolver-trace-disable", out); 445 DrawCommandButton("Disable tracing", "hostresolver-trace-disable", out);
446 } else { 446 } else {
447 DrawCommandButton("Enable tracing", "hostresolver-trace-enable", out); 447 DrawCommandButton("Enable tracing", "hostresolver-trace-enable", out);
448 } 448 }
449 449
450 std::vector<net::NetLog::Entry> entries; 450 net::CapturingNetLog::EntryList entries;
451 if (resolver->GetRequestsTrace(&entries)) { 451 if (resolver->GetRequestsTrace(&entries)) {
452 out->append( 452 out->append(
453 "<p>To make sense of this trace, process it with the Python script " 453 "<p>To make sense of this trace, process it with the Python script "
454 "formatter.py at " 454 "formatter.py at "
455 "<a href='http://src.chromium.org/viewvc/chrome/trunk/src/net/tools/" 455 "<a href='http://src.chromium.org/viewvc/chrome/trunk/src/net/tools/"
456 "dns_trace_formatter/'>net/tools/dns_trace_formatter</a></p>"); 456 "dns_trace_formatter/'>net/tools/dns_trace_formatter</a></p>");
457 OutputTextInPre(net::NetLogUtil::PrettyPrintAsEventTree(entries, 0), 457 OutputTextInPre(net::NetLogUtil::PrettyPrintAsEventTree(entries, 0),
458 out); 458 out);
459 } else { 459 } else {
460 out->append("<p><i>No trace information, must enable tracing.</i></p>"); 460 out->append("<p><i>No trace information, must enable tracing.</i></p>");
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 return StartsWithASCII(url.spec(), 840 return StartsWithASCII(url.spec(),
841 chrome::kNetworkViewInternalsURL, 841 chrome::kNetworkViewInternalsURL,
842 true /*case_sensitive*/); 842 true /*case_sensitive*/);
843 } 843 }
844 844
845 // static 845 // static
846 URLRequestJob* ViewNetInternalsJobFactory::CreateJobForRequest( 846 URLRequestJob* ViewNetInternalsJobFactory::CreateJobForRequest(
847 URLRequest* request) { 847 URLRequest* request) {
848 return new ViewNetInternalsJob(request); 848 return new ViewNetInternalsJob(request);
849 } 849 }
OLDNEW
« no previous file with comments | « chrome/browser/net/passive_log_collector_unittest.cc ('k') | chrome/browser/resources/net_internals/loggrouper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698