| 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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 !list->GetString(0, &onc_blob) || | 1384 !list->GetString(0, &onc_blob) || |
| 1385 !list->GetString(1, &passcode)) { | 1385 !list->GetString(1, &passcode)) { |
| 1386 NOTREACHED(); | 1386 NOTREACHED(); |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 std::string error; | 1389 std::string error; |
| 1390 chromeos::NetworkLibrary* cros_network = | 1390 chromeos::NetworkLibrary* cros_network = |
| 1391 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); | 1391 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); |
| 1392 cros_network->LoadOncNetworks(onc_blob, passcode, | 1392 cros_network->LoadOncNetworks(onc_blob, passcode, |
| 1393 chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT, | 1393 chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT, |
| 1394 false, // allow_web_trust_from_policy |
| 1394 &error); | 1395 &error); |
| 1395 | 1396 |
| 1396 // Now that we've added the networks, we need to rescan them so they'll be | 1397 // Now that we've added the networks, we need to rescan them so they'll be |
| 1397 // available from the menu more immediately. | 1398 // available from the menu more immediately. |
| 1398 cros_network->RequestNetworkScan(); | 1399 cros_network->RequestNetworkScan(); |
| 1399 | 1400 |
| 1400 SendJavascriptCommand("receivedONCFileParse", | 1401 SendJavascriptCommand("receivedONCFileParse", |
| 1401 Value::CreateStringValue(error)); | 1402 Value::CreateStringValue(error)); |
| 1402 } | 1403 } |
| 1403 | 1404 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 } | 1744 } |
| 1744 | 1745 |
| 1745 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1746 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
| 1746 : WebUIController(web_ui) { | 1747 : WebUIController(web_ui) { |
| 1747 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1748 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
| 1748 | 1749 |
| 1749 // Set up the chrome://net-internals/ source. | 1750 // Set up the chrome://net-internals/ source. |
| 1750 Profile* profile = Profile::FromWebUI(web_ui); | 1751 Profile* profile = Profile::FromWebUI(web_ui); |
| 1751 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); | 1752 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); |
| 1752 } | 1753 } |
| OLD | NEW |