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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 &certificates)) { | 981 &certificates)) { |
982 error = "Errors occurred during the ONC parsing. "; | 982 error = "Errors occurred during the ONC parsing. "; |
983 } | 983 } |
984 | 984 |
985 std::string network_error; | 985 std::string network_error; |
986 chromeos::onc::ImportNetworksForUser(user, network_configs, &network_error); | 986 chromeos::onc::ImportNetworksForUser(user, network_configs, &network_error); |
987 if (!network_error.empty()) | 987 if (!network_error.empty()) |
988 error += network_error; | 988 error += network_error; |
989 | 989 |
990 chromeos::onc::CertificateImporterImpl cert_importer( | 990 chromeos::onc::CertificateImporterImpl cert_importer( |
991 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), nssdb); | 991 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nssdb); |
992 cert_importer.ImportCertificates( | 992 cert_importer.ImportCertificates( |
993 certificates, | 993 certificates, |
994 onc_source, | 994 onc_source, |
995 base::Bind(&NetInternalsMessageHandler::OnCertificatesImported, | 995 base::Bind(&NetInternalsMessageHandler::OnCertificatesImported, |
996 AsWeakPtr(), | 996 AsWeakPtr(), |
997 error)); | 997 error)); |
998 } | 998 } |
999 | 999 |
1000 void NetInternalsMessageHandler::OnCertificatesImported( | 1000 void NetInternalsMessageHandler::OnCertificatesImported( |
1001 const std::string& previous_error, | 1001 const std::string& previous_error, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 //////////////////////////////////////////////////////////////////////////////// | 1182 //////////////////////////////////////////////////////////////////////////////// |
1183 | 1183 |
1184 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1184 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
1185 : WebUIController(web_ui) { | 1185 : WebUIController(web_ui) { |
1186 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1186 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
1187 | 1187 |
1188 // Set up the chrome://net-internals/ source. | 1188 // Set up the chrome://net-internals/ source. |
1189 Profile* profile = Profile::FromWebUI(web_ui); | 1189 Profile* profile = Profile::FromWebUI(web_ui); |
1190 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 1190 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
1191 } | 1191 } |
OLD | NEW |