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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 53923004: policy: Make UserNetworkConfigurationUpdater a BCKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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/profiles/profile_io_data.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | 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/options/certificate_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 15 matching lines...) Expand all
26 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "content/public/browser/web_contents_view.h" 28 #include "content/public/browser/web_contents_view.h"
29 #include "grit/generated_resources.h" 29 #include "grit/generated_resources.h"
30 #include "net/base/crypto_module.h" 30 #include "net/base/crypto_module.h"
31 #include "net/base/net_errors.h" 31 #include "net/base/net_errors.h"
32 #include "net/cert/x509_certificate.h" 32 #include "net/cert/x509_certificate.h"
33 #include "ui/base/l10n/l10n_util.h" 33 #include "ui/base/l10n/l10n_util.h"
34 34
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 #include "chrome/browser/policy/profile_policy_connector.h" 36 #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h"
37 #include "chrome/browser/policy/profile_policy_connector_factory.h" 37 #include "chrome/browser/chromeos/policy/user_network_configuration_updater_fact ory.h"
38 #include "chromeos/dbus/cryptohome_client.h" 38 #include "chromeos/dbus/cryptohome_client.h"
39 #include "chromeos/dbus/dbus_thread_manager.h" 39 #include "chromeos/dbus/dbus_thread_manager.h"
40 #endif 40 #endif
41 41
42 using content::BrowserThread; 42 using content::BrowserThread;
43 43
44 namespace { 44 namespace {
45 45
46 static const char kKeyId[] = "id"; 46 static const char kKeyId[] = "id";
47 static const char kSubNodesId[] = "subnodes"; 47 static const char kSubNodesId[] = "subnodes";
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 web_ui()->RegisterMessageCallback( 482 web_ui()->RegisterMessageCallback(
483 "checkTpmTokenReady", 483 "checkTpmTokenReady",
484 base::Bind(&CertificateManagerHandler::CheckTpmTokenReady, 484 base::Bind(&CertificateManagerHandler::CheckTpmTokenReady,
485 base::Unretained(this))); 485 base::Unretained(this)));
486 #endif 486 #endif
487 } 487 }
488 488
489 void CertificateManagerHandler::CertificatesRefreshed() { 489 void CertificateManagerHandler::CertificatesRefreshed() {
490 net::CertificateList web_trusted_certs; 490 net::CertificateList web_trusted_certs;
491 #if defined(OS_CHROMEOS) 491 #if defined(OS_CHROMEOS)
492 policy::ProfilePolicyConnectorFactory::GetForProfile( 492 policy::UserNetworkConfigurationUpdater* service =
493 Profile::FromWebUI(web_ui()))->GetWebTrustedCertificates( 493 policy::UserNetworkConfigurationUpdaterFactory::GetForProfile(
494 &web_trusted_certs); 494 Profile::FromWebUI(web_ui()));
495 if (service)
496 service->GetWebTrustedCertificates(&web_trusted_certs);
495 #endif 497 #endif
496 PopulateTree("personalCertsTab", net::USER_CERT, web_trusted_certs); 498 PopulateTree("personalCertsTab", net::USER_CERT, web_trusted_certs);
497 PopulateTree("serverCertsTab", net::SERVER_CERT, web_trusted_certs); 499 PopulateTree("serverCertsTab", net::SERVER_CERT, web_trusted_certs);
498 PopulateTree("caCertsTab", net::CA_CERT, web_trusted_certs); 500 PopulateTree("caCertsTab", net::CA_CERT, web_trusted_certs);
499 PopulateTree("otherCertsTab", net::OTHER_CERT, web_trusted_certs); 501 PopulateTree("otherCertsTab", net::OTHER_CERT, web_trusted_certs);
500 } 502 }
501 503
502 void CertificateManagerHandler::FileSelected(const base::FilePath& path, 504 void CertificateManagerHandler::FileSelected(const base::FilePath& path,
503 int index, 505 int index,
504 void* params) { 506 void* params) {
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", 1119 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady",
1118 ready); 1120 ready);
1119 } 1121 }
1120 #endif 1122 #endif
1121 1123
1122 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1124 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1123 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); 1125 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
1124 } 1126 }
1125 1127
1126 } // namespace options 1128 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698