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

Side by Side Diff: net/url_request/url_request_view_net_internals_job.cc

Issue 257050: Make the font sizes on about:net-internals consistent. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <sstream> 5 #include <sstream>
6 6
7 #include "net/url_request/url_request_view_net_internals_job.h" 7 #include "net/url_request/url_request_view_net_internals_job.h"
8 8
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 data->clear(); 410 data->clear();
411 411
412 // Use a different handler for "view-cache/*" subpaths. 412 // Use a different handler for "view-cache/*" subpaths.
413 std::string cache_key; 413 std::string cache_key;
414 if (GetViewCacheKeyFromPath(details, &cache_key)) { 414 if (GetViewCacheKeyFromPath(details, &cache_key)) {
415 GURL url = url_format_->MakeURL(kViewHttpCacheSubPath + std::string("/")); 415 GURL url = url_format_->MakeURL(kViewHttpCacheSubPath + std::string("/"));
416 ViewCacheHelper::GetEntryInfoHTML(cache_key, context, url.spec(), data); 416 ViewCacheHelper::GetEntryInfoHTML(cache_key, context, url.spec(), data);
417 return true; 417 return true;
418 } 418 }
419 419
420 data->append("<html><head><title>Network internals</title>" 420 data->append("<!DOCTYPE HTML>"
421 "<html><head><title>Network internals</title>"
421 "<style>" 422 "<style>"
422 "body { font-family: sans-serif; }\n" 423 "body { font-family: sans-serif; font-size: 0.8em; }\n"
424 "tt, code, pre { font-family: WebKitHack, monospace; }\n"
423 ".subsection_body { margin: 10px 0 10px 2em; }\n" 425 ".subsection_body { margin: 10px 0 10px 2em; }\n"
424 ".subsection_title { font-weight: bold; }\n" 426 ".subsection_title { font-weight: bold; }\n"
425 ".subsection_name { font-size: 80%; }\n"
426 "</style>" 427 "</style>"
427 "</head><body>" 428 "</head><body>"
428 "<p><a href='http://dev.chromium.org/" 429 "<p><a href='http://dev.chromium.org/"
429 "developers/design-documents/view-net-internals'>" 430 "developers/design-documents/view-net-internals'>"
430 "Help: how do I use this?</a></p>"); 431 "Help: how do I use this?</a></p>");
431 432
432 SubSection* all = Singleton<AllSubSections>::get(); 433 SubSection* all = Singleton<AllSubSections>::get();
433 SubSection* section = all; 434 SubSection* section = all;
434 435
435 // Display only the subsection tree asked for. 436 // Display only the subsection tree asked for.
436 if (!details.empty()) 437 if (!details.empty())
437 section = all->FindSubSectionByName(details); 438 section = all->FindSubSectionByName(details);
438 439
439 if (section) { 440 if (section) {
440 section->OutputRecursive(context, url_format_, data); 441 section->OutputRecursive(context, url_format_, data);
441 } else { 442 } else {
442 data->append("<i>Nothing found for \""); 443 data->append("<i>Nothing found for \"");
443 data->append(EscapeForHTML(details)); 444 data->append(EscapeForHTML(details));
444 data->append("\"</i>"); 445 data->append("\"</i>");
445 } 446 }
446 447
447 data->append("</body></html>"); 448 data->append("</body></html>");
448 449
449 return true; 450 return true;
450 } 451 }
451 452
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698