OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |