Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 11469026: Extending ONC validator's logging. Completing toplevel validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@add_error_handling_to_validator
Patch Set: Rebased. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 if (list->GetSize() != 2 || 1486 if (list->GetSize() != 2 ||
1487 !list->GetString(0, &onc_blob) || 1487 !list->GetString(0, &onc_blob) ||
1488 !list->GetString(1, &passcode)) { 1488 !list->GetString(1, &passcode)) {
1489 NOTREACHED(); 1489 NOTREACHED();
1490 } 1490 }
1491 1491
1492 std::string error; 1492 std::string error;
1493 chromeos::NetworkLibrary* cros_network = 1493 chromeos::NetworkLibrary* cros_network =
1494 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); 1494 chromeos::CrosLibrary::Get()->GetNetworkLibrary();
1495 if (!cros_network->LoadOncNetworks(onc_blob, passcode, 1495 if (!cros_network->LoadOncNetworks(onc_blob, passcode,
1496 chromeos::onc::ONC_SOURCE_USER_IMPORT, 1496 chromeos::onc::ONC_SOURCE_USER_IMPORT,
1497 false)) { // allow web trust from policy 1497 false)) { // allow web trust from policy
1498 LOG(ERROR) << "Unable to load ONC."; 1498 LOG(ERROR) << "Unable to load ONC.";
1499 error = "Unable to load ONC configuration."; 1499 error = "Unable to load ONC configuration.";
1500 } 1500 }
1501 1501
1502 // Now that we've added the networks, we need to rescan them so they'll be 1502 // Now that we've added the networks, we need to rescan them so they'll be
1503 // available from the menu more immediately. 1503 // available from the menu more immediately.
1504 cros_network->RequestNetworkScan(); 1504 cros_network->RequestNetworkScan();
1505 1505
1506 SendJavascriptCommand("receivedONCFileParse", 1506 SendJavascriptCommand("receivedONCFileParse",
1507 Value::CreateStringValue(error)); 1507 Value::CreateStringValue(error));
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 } 1913 }
1914 1914
1915 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1915 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1916 : WebUIController(web_ui) { 1916 : WebUIController(web_ui) {
1917 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1917 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1918 1918
1919 // Set up the chrome://net-internals/ source. 1919 // Set up the chrome://net-internals/ source.
1920 Profile* profile = Profile::FromWebUI(web_ui); 1920 Profile* profile = Profile::FromWebUI(web_ui);
1921 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); 1921 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource());
1922 } 1922 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/network_configuration_updater_unittest.cc ('k') | chromeos/network/onc/onc_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698