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

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

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "net/http/http_server_properties.h" 68 #include "net/http/http_server_properties.h"
69 #include "net/http/http_stream_factory.h" 69 #include "net/http/http_stream_factory.h"
70 #include "net/http/transport_security_state.h" 70 #include "net/http/transport_security_state.h"
71 #include "net/proxy/proxy_service.h" 71 #include "net/proxy/proxy_service.h"
72 #include "net/url_request/url_request_context.h" 72 #include "net/url_request/url_request_context.h"
73 #include "net/url_request/url_request_context_getter.h" 73 #include "net/url_request/url_request_context_getter.h"
74 #include "ui/base/resource/resource_bundle.h" 74 #include "ui/base/resource/resource_bundle.h"
75 75
76 #if defined(OS_CHROMEOS) 76 #if defined(OS_CHROMEOS)
77 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" 77 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h"
78 #include "chrome/browser/chromeos/login/users/user.h"
79 #include "chrome/browser/chromeos/net/onc_utils.h" 78 #include "chrome/browser/chromeos/net/onc_utils.h"
80 #include "chrome/browser/chromeos/profiles/profile_helper.h" 79 #include "chrome/browser/chromeos/profiles/profile_helper.h"
81 #include "chrome/browser/chromeos/system/syslogs_provider.h" 80 #include "chrome/browser/chromeos/system/syslogs_provider.h"
82 #include "chrome/browser/net/nss_context.h" 81 #include "chrome/browser/net/nss_context.h"
83 #include "chromeos/dbus/dbus_thread_manager.h" 82 #include "chromeos/dbus/dbus_thread_manager.h"
84 #include "chromeos/dbus/debug_daemon_client.h" 83 #include "chromeos/dbus/debug_daemon_client.h"
85 #include "chromeos/network/onc/onc_certificate_importer_impl.h" 84 #include "chromeos/network/onc/onc_certificate_importer_impl.h"
86 #include "chromeos/network/onc/onc_utils.h" 85 #include "chromeos/network/onc/onc_utils.h"
86 #include "components/user_manager/user.h"
87 #endif 87 #endif
88 88
89 #if defined(OS_WIN) 89 #if defined(OS_WIN)
90 #include "chrome/browser/net/service_providers_win.h" 90 #include "chrome/browser/net/service_providers_win.h"
91 #endif 91 #endif
92 92
93 #if defined(ENABLE_EXTENSIONS) 93 #if defined(ENABLE_EXTENSIONS)
94 #include "chrome/browser/extensions/extension_service.h" 94 #include "chrome/browser/extensions/extension_service.h"
95 #include "chrome/browser/ui/webui/extensions/extension_basic_info.h" 95 #include "chrome/browser/ui/webui/extensions/extension_basic_info.h"
96 #include "extensions/browser/extension_registry.h" 96 #include "extensions/browser/extension_registry.h"
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 const base::ListValue* list) { 1475 const base::ListValue* list) {
1476 DCHECK(syslogs_getter_.get()); 1476 DCHECK(syslogs_getter_.get());
1477 syslogs_getter_->RequestSystemLog(list); 1477 syslogs_getter_->RequestSystemLog(list);
1478 } 1478 }
1479 1479
1480 void NetInternalsMessageHandler::ImportONCFileToNSSDB( 1480 void NetInternalsMessageHandler::ImportONCFileToNSSDB(
1481 const std::string& onc_blob, 1481 const std::string& onc_blob,
1482 const std::string& passcode, 1482 const std::string& passcode,
1483 net::NSSCertDatabase* nssdb) { 1483 net::NSSCertDatabase* nssdb) {
1484 std::string error; 1484 std::string error;
1485 chromeos::User* user = chromeos::ProfileHelper::Get()->GetUserByProfile( 1485 user_manager::User* user = chromeos::ProfileHelper::Get()->GetUserByProfile(
1486 Profile::FromWebUI(web_ui())); 1486 Profile::FromWebUI(web_ui()));
1487 1487
1488 if (user) { 1488 if (user) {
1489 onc::ONCSource onc_source = onc::ONC_SOURCE_USER_IMPORT; 1489 onc::ONCSource onc_source = onc::ONC_SOURCE_USER_IMPORT;
1490 1490
1491 base::ListValue network_configs; 1491 base::ListValue network_configs;
1492 base::DictionaryValue global_network_config; 1492 base::DictionaryValue global_network_config;
1493 base::ListValue certificates; 1493 base::ListValue certificates;
1494 if (!chromeos::onc::ParseAndValidateOncForImport(onc_blob, 1494 if (!chromeos::onc::ParseAndValidateOncForImport(onc_blob,
1495 onc_source, 1495 onc_source,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 } 1781 }
1782 1782
1783 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1783 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1784 : WebUIController(web_ui) { 1784 : WebUIController(web_ui) {
1785 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1785 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1786 1786
1787 // Set up the chrome://net-internals/ source. 1787 // Set up the chrome://net-internals/ source.
1788 Profile* profile = Profile::FromWebUI(web_ui); 1788 Profile* profile = Profile::FromWebUI(web_ui);
1789 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1789 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1790 } 1790 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/net_internals/DEPS ('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