OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void RemoveTrustedCertsObserver(WebTrustedCertsObserver* observer); | 75 void RemoveTrustedCertsObserver(WebTrustedCertsObserver* observer); |
76 | 76 |
77 // Sets |certs| to the list of Web trusted server and CA certificates from the | 77 // Sets |certs| to the list of Web trusted server and CA certificates from the |
78 // last received policy. | 78 // last received policy. |
79 void GetWebTrustedCertificates(net::CertificateList* certs) const; | 79 void GetWebTrustedCertificates(net::CertificateList* certs) const; |
80 | 80 |
81 // Helper method to expose |SetCertificateImporter| for usage in tests. | 81 // Helper method to expose |SetCertificateImporter| for usage in tests. |
82 void SetCertificateImporterForTest( | 82 void SetCertificateImporterForTest( |
83 scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer); | 83 scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer); |
84 | 84 |
85 // Used in test to delay CertificateImporter creation until the NSSDatabase is | |
86 // ready. This is needed in some tests as the user's certificate database may | |
87 // not get initialized in time. | |
88 // TODO(tbarzic): Remove this when it's not needed. | |
89 static void SetSkipCertificateImporterCreationForTest(bool skip); | |
90 | |
91 private: | 85 private: |
92 class CrosTrustAnchorProvider; | 86 class CrosTrustAnchorProvider; |
93 | 87 |
94 UserNetworkConfigurationUpdater( | 88 UserNetworkConfigurationUpdater( |
95 Profile* profile, | 89 Profile* profile, |
96 bool allow_trusted_certs_from_policy, | 90 bool allow_trusted_certs_from_policy, |
97 const chromeos::User& user, | 91 const chromeos::User& user, |
98 PolicyService* policy_service, | 92 PolicyService* policy_service, |
99 chromeos::ManagedNetworkConfigurationHandler* network_config_handler); | 93 chromeos::ManagedNetworkConfigurationHandler* network_config_handler); |
100 | 94 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 content::NotificationRegistrar registrar_; | 140 content::NotificationRegistrar registrar_; |
147 | 141 |
148 base::WeakPtrFactory<UserNetworkConfigurationUpdater> weak_factory_; | 142 base::WeakPtrFactory<UserNetworkConfigurationUpdater> weak_factory_; |
149 | 143 |
150 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdater); | 144 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdater); |
151 }; | 145 }; |
152 | 146 |
153 } // namespace policy | 147 } // namespace policy |
154 | 148 |
155 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ | 149 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ |
OLD | NEW |