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

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

Issue 10868076: Only import certificates with Web trust from ONC if the user is managed and matches the enterprise … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaesd Created 8 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/policy/network_configuration_updater_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/network_configuration_updater_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698