OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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/chromeos/dom_ui/mobile_setup_ui.h" | 5 #include "chrome/browser/chromeos/dom_ui/mobile_setup_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 MobileSetupUI::MobileSetupUI(TabContents* contents) : DOMUI(contents) { | 1316 MobileSetupUI::MobileSetupUI(TabContents* contents) : DOMUI(contents) { |
1317 const chromeos::CellularNetwork* network = GetCellularNetwork(); | 1317 const chromeos::CellularNetwork* network = GetCellularNetwork(); |
1318 std::string service_path = network ? network->service_path() : std::string(); | 1318 std::string service_path = network ? network->service_path() : std::string(); |
1319 MobileSetupHandler* handler = new MobileSetupHandler(service_path); | 1319 MobileSetupHandler* handler = new MobileSetupHandler(service_path); |
1320 AddMessageHandler((handler)->Attach(this)); | 1320 AddMessageHandler((handler)->Attach(this)); |
1321 handler->Init(contents); | 1321 handler->Init(contents); |
1322 MobileSetupUIHTMLSource* html_source = | 1322 MobileSetupUIHTMLSource* html_source = |
1323 new MobileSetupUIHTMLSource(service_path); | 1323 new MobileSetupUIHTMLSource(service_path); |
1324 | 1324 |
1325 // Set up the chrome://mobilesetup/ source. | 1325 // Set up the chrome://mobilesetup/ source. |
1326 BrowserThread::PostTask( | 1326 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
1327 BrowserThread::IO, FROM_HERE, | |
1328 NewRunnableMethod( | |
1329 ChromeURLDataManager::GetInstance(), | |
1330 &ChromeURLDataManager::AddDataSource, | |
1331 make_scoped_refptr(html_source))); | |
1332 } | 1327 } |
OLD | NEW |