Index: chrome/browser/chromeos/policy/user_network_configuration_updater.h |
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.h b/chrome/browser/chromeos/policy/user_network_configuration_updater.h |
index 3c8500943fe3e1900769315eeecc159368b74fca..3b8c7b7f56ba6a4d1c12359134302d64f6d9548f 100644 |
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater.h |
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.h |
@@ -15,10 +15,6 @@ |
#include "base/observer_list.h" |
#include "chrome/browser/chromeos/policy/network_configuration_updater.h" |
#include "components/keyed_service/core/keyed_service.h" |
-#include "content/public/browser/notification_observer.h" |
-#include "content/public/browser/notification_registrar.h" |
- |
-class Profile; |
namespace base { |
class ListValue; |
@@ -29,7 +25,6 @@ class User; |
} |
namespace chromeos { |
- |
namespace onc { |
class CertificateImporter; |
} |
@@ -49,8 +44,7 @@ class PolicyService; |
// expansion with the user's name (or email address, etc.) and handling of "Web" |
// trust of certificates. |
class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater, |
- public KeyedService, |
- public content::NotificationObserver { |
+ public KeyedService { |
public: |
class WebTrustedCertsObserver { |
public: |
@@ -68,10 +62,10 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater, |
// granted Web trust if |allow_trusted_certs_from_policy| is true. A reference |
// to |user| is stored. It must outlive the returned updater. |
static scoped_ptr<UserNetworkConfigurationUpdater> CreateForUserPolicy( |
- Profile* profile, |
bool allow_trusted_certs_from_policy, |
const user_manager::User& user, |
PolicyService* policy_service, |
+ scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer, |
chromeos::ManagedNetworkConfigurationHandler* network_config_handler); |
void AddTrustedCertsObserver(WebTrustedCertsObserver* observer); |
@@ -81,18 +75,14 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater, |
// last received policy. |
void GetWebTrustedCertificates(net::CertificateList* certs) const; |
- // Helper method to expose |SetCertificateImporter| for usage in tests. |
- void SetCertificateImporterForTest( |
- scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer); |
- |
private: |
class CrosTrustAnchorProvider; |
UserNetworkConfigurationUpdater( |
- Profile* profile, |
bool allow_trusted_certs_from_policy, |
const user_manager::User& user, |
PolicyService* policy_service, |
+ scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer, |
chromeos::ManagedNetworkConfigurationHandler* network_config_handler); |
// Called by the CertificateImporter when an import finished. |
@@ -107,21 +97,6 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater, |
base::ListValue* network_configs_onc, |
base::DictionaryValue* global_network_config) override; |
- // content::NotificationObserver implementation. Observes the profile to which |
- // |this| belongs to for PROFILE_ADDED notification. |
- virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) override; |
- |
- // Creates onc::CertImporter with |database| and passes it to |
- // |SetCertificateImporter|. |
- void CreateAndSetCertificateImporter(net::NSSCertDatabase* database); |
- |
- // Sets the certificate importer that should be used to import certificate |
- // policies. If there is |pending_certificates_onc_|, it gets imported. |
- void SetCertificateImporter( |
- scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer); |
- |
void NotifyTrustAnchorsChanged(); |
// Whether Web trust is allowed or not. |
@@ -136,17 +111,9 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater, |
// be empty if Web trust from policy is not allowed. |
net::CertificateList web_trust_certs_; |
- // If |ImportCertificates| is called before |SetCertificateImporter|, gets set |
- // to a copy of the policy for which the import was requested. |
- // The policy will be processed when the certificate importer is set. |
- scoped_ptr<base::ListValue> pending_certificates_onc_; |
- |
// Certificate importer to be used for importing policy defined certificates. |
- // Set by |SetCertificateImporter|. |
scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer_; |
- content::NotificationRegistrar registrar_; |
- |
base::WeakPtrFactory<UserNetworkConfigurationUpdater> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdater); |