| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | |
| 14 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 15 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 16 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 17 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 18 #include "base/singleton.h" | 17 #include "base/singleton.h" |
| 19 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 20 #include "base/string_piece.h" | 19 #include "base/string_piece.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "base/values.h" | 21 #include "base/values.h" |
| 23 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 41 #include "net/base/host_resolver_impl.h" | 40 #include "net/base/host_resolver_impl.h" |
| 42 #include "net/base/net_errors.h" | 41 #include "net/base/net_errors.h" |
| 43 #include "net/base/net_util.h" | 42 #include "net/base/net_util.h" |
| 44 #include "net/base/sys_addrinfo.h" | 43 #include "net/base/sys_addrinfo.h" |
| 45 #include "net/disk_cache/disk_cache.h" | 44 #include "net/disk_cache/disk_cache.h" |
| 46 #include "net/http/http_cache.h" | 45 #include "net/http/http_cache.h" |
| 47 #include "net/http/http_network_layer.h" | 46 #include "net/http/http_network_layer.h" |
| 48 #include "net/http/http_network_session.h" | 47 #include "net/http/http_network_session.h" |
| 49 #include "net/proxy/proxy_service.h" | 48 #include "net/proxy/proxy_service.h" |
| 50 #include "net/url_request/url_request_context.h" | 49 #include "net/url_request/url_request_context.h" |
| 50 #include "ui/base/resource/resource_bundle.h" |
| 51 |
| 51 #ifdef OS_WIN | 52 #ifdef OS_WIN |
| 52 #include "chrome/browser/net/service_providers_win.h" | 53 #include "chrome/browser/net/service_providers_win.h" |
| 53 #endif | 54 #endif |
| 54 | 55 |
| 55 namespace { | 56 namespace { |
| 56 | 57 |
| 57 // Delay between when an event occurs and when it is passed to the Javascript | 58 // Delay between when an event occurs and when it is passed to the Javascript |
| 58 // page. All events that occur during this period are grouped together and | 59 // page. All events that occur during this period are grouped together and |
| 59 // sent to the page at once, which reduces context switching and CPU usage. | 60 // sent to the page at once, which reduces context switching and CPU usage. |
| 60 const int kNetLogEventDelayMilliseconds = 100; | 61 const int kNetLogEventDelayMilliseconds = 100; |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); | 1079 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); |
| 1079 | 1080 |
| 1080 // Set up the chrome://net-internals/ source. | 1081 // Set up the chrome://net-internals/ source. |
| 1081 BrowserThread::PostTask( | 1082 BrowserThread::PostTask( |
| 1082 BrowserThread::IO, FROM_HERE, | 1083 BrowserThread::IO, FROM_HERE, |
| 1083 NewRunnableMethod( | 1084 NewRunnableMethod( |
| 1084 ChromeURLDataManager::GetInstance(), | 1085 ChromeURLDataManager::GetInstance(), |
| 1085 &ChromeURLDataManager::AddDataSource, | 1086 &ChromeURLDataManager::AddDataSource, |
| 1086 make_scoped_refptr(html_source))); | 1087 make_scoped_refptr(html_source))); |
| 1087 } | 1088 } |
| OLD | NEW |