Chromium Code Reviews| Index: chrome/browser/chromeos/policy/device_cloud_policy_initializer.h |
| diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.h b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.h |
| index 30dfe31fc2977a8e9ceb97520dfd52703819bff2..114412b4055d3a44f364ee2334ea348f49371a7f 100644 |
| --- a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.h |
| +++ b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.h |
| @@ -11,6 +11,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/compiler_specific.h" |
| +#include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h" |
| @@ -97,8 +98,11 @@ class DeviceCloudPolicyInitializer : public CloudPolicyStore::Observer { |
| void OnStoreLoaded(CloudPolicyStore* store) override; |
| void OnStoreError(CloudPolicyStore* store) override; |
| + // Allows testing code to set a signing service tailored to its needs. |
| + void SetSigningServiceForTesting(policy::SigningService* signing_service); |
| + |
| private: |
| - // Signing class implemting the policy::SigningService interface to |
| + // Signing class implementing the policy::SigningService interface to |
| // sign data using the enrollment certificate's TPM-bound key. |
| class TpmEnrollmentKeySigningService : public policy::SigningService { |
| public: |
| @@ -148,7 +152,8 @@ class DeviceCloudPolicyInitializer : public CloudPolicyStore::Observer { |
| ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; |
| // Our signing service. |
| - TpmEnrollmentKeySigningService signing_service_; |
| + SigningService* signing_service_; |
| + std::unique_ptr<SigningService> default_signing_service_; |
|
pastarmovj
2016/08/30 08:55:03
Since there is no way of going back to the default
The one and only Dr. Crash
2016/08/30 17:09:28
Sure. Done.
|
| DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer); |
| }; |