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

Side by Side Diff: chrome/browser/dom_ui/net_internals_ui.cc

Issue 1696005: Add net log entries that summarize transmit and receive byte counts. (Closed)
Patch Set: More tests and address 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_net_log.h » ('j') | 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) 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/dom_ui/net_internals_ui.h" 5 #include "chrome/browser/dom_ui/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // TODO(eroman): Don't duplicate the values, it will never stay up to date! 434 // TODO(eroman): Don't duplicate the values, it will never stay up to date!
435 { 435 {
436 DictionaryValue* dict = new DictionaryValue(); 436 DictionaryValue* dict = new DictionaryValue();
437 437
438 dict->SetInteger(L"NONE", net::NetLog::SOURCE_NONE); 438 dict->SetInteger(L"NONE", net::NetLog::SOURCE_NONE);
439 dict->SetInteger(L"URL_REQUEST", net::NetLog::SOURCE_URL_REQUEST); 439 dict->SetInteger(L"URL_REQUEST", net::NetLog::SOURCE_URL_REQUEST);
440 dict->SetInteger(L"SOCKET_STREAM", net::NetLog::SOURCE_SOCKET_STREAM); 440 dict->SetInteger(L"SOCKET_STREAM", net::NetLog::SOURCE_SOCKET_STREAM);
441 dict->SetInteger(L"INIT_PROXY_RESOLVER", 441 dict->SetInteger(L"INIT_PROXY_RESOLVER",
442 net::NetLog::SOURCE_INIT_PROXY_RESOLVER); 442 net::NetLog::SOURCE_INIT_PROXY_RESOLVER);
443 dict->SetInteger(L"CONNECT_JOB", net::NetLog::SOURCE_CONNECT_JOB); 443 dict->SetInteger(L"CONNECT_JOB", net::NetLog::SOURCE_CONNECT_JOB);
444 dict->SetInteger(L"SOCKET", net::NetLog::SOURCE_SOCKET);
444 445
445 CallJavascriptFunction(L"g_browser.receivedLogSourceTypeConstants", dict); 446 CallJavascriptFunction(L"g_browser.receivedLogSourceTypeConstants", dict);
446 } 447 }
447 448
448 // Tell the javascript how the "time ticks" values we have given it relate to 449 // Tell the javascript how the "time ticks" values we have given it relate to
449 // actual system times. (We used time ticks throughout since they are stable 450 // actual system times. (We used time ticks throughout since they are stable
450 // across system clock changes). 451 // across system clock changes).
451 { 452 {
452 int64 cur_time_ms = (base::Time::Now() - base::Time()).InMilliseconds(); 453 int64 cur_time_ms = (base::Time::Now() - base::Time()).InMilliseconds();
453 454
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); 693 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource();
693 694
694 // Set up the chrome://net-internals/ source. 695 // Set up the chrome://net-internals/ source.
695 ChromeThread::PostTask( 696 ChromeThread::PostTask(
696 ChromeThread::IO, FROM_HERE, 697 ChromeThread::IO, FROM_HERE,
697 NewRunnableMethod( 698 NewRunnableMethod(
698 Singleton<ChromeURLDataManager>::get(), 699 Singleton<ChromeURLDataManager>::get(),
699 &ChromeURLDataManager::AddDataSource, 700 &ChromeURLDataManager::AddDataSource,
700 make_scoped_refptr(html_source))); 701 make_scoped_refptr(html_source)));
701 } 702 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698