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 aca6b89f29e53af49315e59cd4c0e1626de8962b..137cd8e0ed982125e7f0e9cb5c629c083f04483f 100644 |
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater.h |
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.h |
@@ -5,6 +5,7 @@ |
#ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ |
#define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_H_ |
+#include <set> |
#include <vector> |
#include "base/basictypes.h" |
@@ -47,13 +48,15 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater { |
PolicyService* policy_service, |
chromeos::ManagedNetworkConfigurationHandler* network_config_handler); |
- // Sets the CertVerifier on which the current list of Web trusted server and |
+ // Adds a CertVerifier on which the current list of Web trusted server and |
// CA certificates will be set. Policy updates will trigger further calls to |
- // |cert_verifier| later. |cert_verifier| must be valid until |
- // SetPolicyCertVerifier is called again (with another CertVerifier or NULL) |
- // or until this Updater is destructed. |cert_verifier|'s methods are only |
- // called on the IO thread. This function must be called on the UI thread. |
- void SetPolicyCertVerifier(PolicyCertVerifier* cert_verifier); |
+ // |cert_verifier| later. |cert_verifier| must be valid until it's removed |
+ // with RemovePolicyCertVerifier. Calls to |cert_verifier| will happen on the |
+ // IO thread. This function must be called on the UI thread. |
+ void AddPolicyCertVerifier(PolicyCertVerifier* cert_verifier); |
+ |
+ // Removes |cert_verifier| from further notifications. |
+ void RemovePolicyCertVerifier(PolicyCertVerifier* cert_verifier); |
// Sets |certs| to the list of Web trusted server and CA certificates from the |
// last received policy. |
@@ -76,7 +79,7 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater { |
base::ListValue* network_configs_onc, |
base::DictionaryValue* global_network_config) OVERRIDE; |
- // Push |web_trust_certs_| to |cert_verifier_| if necessary. |
+ // Push |web_trust_certs_| to |cert_verifiers_| if necessary. |
void SetTrustAnchors(); |
// Whether Web trust is allowed or not. Only relevant for user policies. |
@@ -86,8 +89,8 @@ class UserNetworkConfigurationUpdater : public NetworkConfigurationUpdater { |
// is used for device policy. |
const chromeos::User* user_; |
- // Calls to this object are only allowed on the IO Thread. |
- PolicyCertVerifier* cert_verifier_; |
+ // Calls to these objects are only allowed on the IO Thread. |
+ std::set<PolicyCertVerifier*> cert_verifiers_; |
// Contains the certificates of the last import that requested web trust. Must |
// be empty if Web trust from policy is not allowed. |