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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests( | 826 void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests( |
827 const ListValue* list) { | 827 const ListValue* list) { |
828 // |value| should be: [<URL to test>]. | 828 // |value| should be: [<URL to test>]. |
829 string16 url_str; | 829 string16 url_str; |
830 CHECK(list->GetString(0, &url_str)); | 830 CHECK(list->GetString(0, &url_str)); |
831 | 831 |
832 // Try to fix-up the user provided URL into something valid. | 832 // Try to fix-up the user provided URL into something valid. |
833 // For example, turn "www.google.com" into "http://www.google.com". | 833 // For example, turn "www.google.com" into "http://www.google.com". |
834 GURL url(URLFixerUpper::FixupURL(UTF16ToUTF8(url_str), std::string())); | 834 GURL url(URLFixerUpper::FixupURL(UTF16ToUTF8(url_str), std::string())); |
835 | 835 |
836 connection_tester_.reset(new ConnectionTester(this, io_thread_)); | 836 connection_tester_.reset(new ConnectionTester( |
| 837 this, io_thread_->globals()->proxy_request_context.get())); |
837 connection_tester_->RunAllTests(url); | 838 connection_tester_->RunAllTests(url); |
838 } | 839 } |
839 | 840 |
840 void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo( | 841 void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo( |
841 const ListValue* list) { | 842 const ListValue* list) { |
842 DictionaryValue* info_dict = new DictionaryValue(); | 843 DictionaryValue* info_dict = new DictionaryValue(); |
843 DictionaryValue* stats_dict = new DictionaryValue(); | 844 DictionaryValue* stats_dict = new DictionaryValue(); |
844 | 845 |
845 disk_cache::Backend* disk_cache = GetDiskCacheBackend( | 846 disk_cache::Backend* disk_cache = GetDiskCacheBackend( |
846 context_getter_->GetURLRequestContext()); | 847 context_getter_->GetURLRequestContext()); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); | 1036 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); |
1036 | 1037 |
1037 // Set up the chrome://net-internals/ source. | 1038 // Set up the chrome://net-internals/ source. |
1038 BrowserThread::PostTask( | 1039 BrowserThread::PostTask( |
1039 BrowserThread::IO, FROM_HERE, | 1040 BrowserThread::IO, FROM_HERE, |
1040 NewRunnableMethod( | 1041 NewRunnableMethod( |
1041 ChromeURLDataManager::GetInstance(), | 1042 ChromeURLDataManager::GetInstance(), |
1042 &ChromeURLDataManager::AddDataSource, | 1043 &ChromeURLDataManager::AddDataSource, |
1043 make_scoped_refptr(html_source))); | 1044 make_scoped_refptr(html_source))); |
1044 } | 1045 } |
OLD | NEW |