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

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

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some includes and nits. Created 7 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
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/network_policy_service.h"
37 #include "chrome/browser/policy/profile_policy_connector_factory.h" 37 #include "chrome/browser/chromeos/policy/network_policy_service_factory.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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 web_ui()->RegisterMessageCallback( 483 web_ui()->RegisterMessageCallback(
484 "checkTpmTokenReady", 484 "checkTpmTokenReady",
485 base::Bind(&CertificateManagerHandler::CheckTpmTokenReady, 485 base::Bind(&CertificateManagerHandler::CheckTpmTokenReady,
486 base::Unretained(this))); 486 base::Unretained(this)));
487 #endif 487 #endif
488 } 488 }
489 489
490 void CertificateManagerHandler::CertificatesRefreshed() { 490 void CertificateManagerHandler::CertificatesRefreshed() {
491 net::CertificateList web_trusted_certs; 491 net::CertificateList web_trusted_certs;
492 #if defined(OS_CHROMEOS) 492 #if defined(OS_CHROMEOS)
493 policy::ProfilePolicyConnectorFactory::GetForProfile( 493 policy::NetworkPolicyServiceFactory::GetForProfile(
494 Profile::FromWebUI(web_ui()))->GetWebTrustedCertificates( 494 Profile::FromWebUI(web_ui()))->GetWebTrustedCertificates(
495 &web_trusted_certs); 495 &web_trusted_certs);
496 #endif 496 #endif
497 PopulateTree("personalCertsTab", net::USER_CERT, web_trusted_certs); 497 PopulateTree("personalCertsTab", net::USER_CERT, web_trusted_certs);
498 PopulateTree("serverCertsTab", net::SERVER_CERT, web_trusted_certs); 498 PopulateTree("serverCertsTab", net::SERVER_CERT, web_trusted_certs);
499 PopulateTree("caCertsTab", net::CA_CERT, web_trusted_certs); 499 PopulateTree("caCertsTab", net::CA_CERT, web_trusted_certs);
500 PopulateTree("otherCertsTab", net::OTHER_CERT, web_trusted_certs); 500 PopulateTree("otherCertsTab", net::OTHER_CERT, web_trusted_certs);
501 } 501 }
502 502
503 void CertificateManagerHandler::FileSelected(const base::FilePath& path, 503 void CertificateManagerHandler::FileSelected(const base::FilePath& path,
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", 1118 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady",
1119 ready); 1119 ready);
1120 } 1120 }
1121 #endif 1121 #endif
1122 1122
1123 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1123 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1124 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); 1124 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
1125 } 1125 }
1126 1126
1127 } // namespace options 1127 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698