| 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> |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 // NetInternalsUI | 1155 // NetInternalsUI |
| 1156 // | 1156 // |
| 1157 //////////////////////////////////////////////////////////////////////////////// | 1157 //////////////////////////////////////////////////////////////////////////////// |
| 1158 | 1158 |
| 1159 NetInternalsUI::NetInternalsUI(TabContents* contents) : DOMUI(contents) { | 1159 NetInternalsUI::NetInternalsUI(TabContents* contents) : DOMUI(contents) { |
| 1160 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); | 1160 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); |
| 1161 | 1161 |
| 1162 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); | 1162 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); |
| 1163 | 1163 |
| 1164 // Set up the chrome://net-internals/ source. | 1164 // Set up the chrome://net-internals/ source. |
| 1165 BrowserThread::PostTask( | 1165 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 1166 BrowserThread::IO, FROM_HERE, | |
| 1167 NewRunnableMethod( | |
| 1168 ChromeURLDataManager::GetInstance(), | |
| 1169 &ChromeURLDataManager::AddDataSource, | |
| 1170 make_scoped_refptr(html_source))); | |
| 1171 } | 1166 } |
| OLD | NEW |