| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/net_internals/net_internals_ui.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 !list->GetString(0, &onc_blob) || | 1382 !list->GetString(0, &onc_blob) || |
| 1383 !list->GetString(1, &passcode)) { | 1383 !list->GetString(1, &passcode)) { |
| 1384 NOTREACHED(); | 1384 NOTREACHED(); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 std::string error; | 1387 std::string error; |
| 1388 chromeos::NetworkLibrary* cros_network = | 1388 chromeos::NetworkLibrary* cros_network = |
| 1389 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); | 1389 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); |
| 1390 cros_network->LoadOncNetworks(onc_blob, passcode, | 1390 cros_network->LoadOncNetworks(onc_blob, passcode, |
| 1391 chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT, | 1391 chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT, |
| 1392 false, // allow_web_trust_from_policy |
| 1392 &error); | 1393 &error); |
| 1393 | 1394 |
| 1394 // Now that we've added the networks, we need to rescan them so they'll be | 1395 // Now that we've added the networks, we need to rescan them so they'll be |
| 1395 // available from the menu more immediately. | 1396 // available from the menu more immediately. |
| 1396 cros_network->RequestNetworkScan(); | 1397 cros_network->RequestNetworkScan(); |
| 1397 | 1398 |
| 1398 SendJavascriptCommand("receivedONCFileParse", | 1399 SendJavascriptCommand("receivedONCFileParse", |
| 1399 Value::CreateStringValue(error)); | 1400 Value::CreateStringValue(error)); |
| 1400 } | 1401 } |
| 1401 | 1402 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 } | 1742 } |
| 1742 | 1743 |
| 1743 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1744 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
| 1744 : WebUIController(web_ui) { | 1745 : WebUIController(web_ui) { |
| 1745 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1746 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
| 1746 | 1747 |
| 1747 // Set up the chrome://net-internals/ source. | 1748 // Set up the chrome://net-internals/ source. |
| 1748 Profile* profile = Profile::FromWebUI(web_ui); | 1749 Profile* profile = Profile::FromWebUI(web_ui); |
| 1749 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); | 1750 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); |
| 1750 } | 1751 } |
| OLD | NEW |