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

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

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 SendJavascriptCommand("receivedServiceProviders", service_providers); 989 SendJavascriptCommand("receivedServiceProviders", service_providers);
990 } 990 }
991 #endif 991 #endif
992 992
993 #if defined(OS_CHROMEOS) 993 #if defined(OS_CHROMEOS)
994 void NetInternalsMessageHandler::ImportONCFileToNSSDB( 994 void NetInternalsMessageHandler::ImportONCFileToNSSDB(
995 const std::string& onc_blob, 995 const std::string& onc_blob,
996 const std::string& passcode, 996 const std::string& passcode,
997 net::NSSCertDatabase* nssdb) { 997 net::NSSCertDatabase* nssdb) {
998 user_manager::User* user = chromeos::ProfileHelper::Get()->GetUserByProfile( 998 const user_manager::User* user =
999 Profile::FromWebUI(web_ui())); 999 chromeos::ProfileHelper::Get()->GetUserByProfile(
1000 Profile::FromWebUI(web_ui()));
1000 1001
1001 if (!user) { 1002 if (!user) {
1002 std::string error = "User not found."; 1003 std::string error = "User not found.";
1003 SendJavascriptCommand("receivedONCFileParse", new base::StringValue(error)); 1004 SendJavascriptCommand("receivedONCFileParse", new base::StringValue(error));
1004 return; 1005 return;
1005 } 1006 }
1006 1007
1007 std::string error; 1008 std::string error;
1008 onc::ONCSource onc_source = onc::ONC_SOURCE_USER_IMPORT; 1009 onc::ONCSource onc_source = onc::ONC_SOURCE_USER_IMPORT;
1009 base::ListValue network_configs; 1010 base::ListValue network_configs;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } 1280 }
1280 1281
1281 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1282 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1282 : WebUIController(web_ui) { 1283 : WebUIController(web_ui) {
1283 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1284 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1284 1285
1285 // Set up the chrome://net-internals/ source. 1286 // Set up the chrome://net-internals/ source.
1286 Profile* profile = Profile::FromWebUI(web_ui); 1287 Profile* profile = Profile::FromWebUI(web_ui);
1287 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1288 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1288 } 1289 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/user_accounts_delegate_chromeos.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698