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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_initializer.h

Issue 2287343004: All DCP manager tests that enroll/register are tested with all auths. (Closed)
Patch Set: All DCP manager tests that enroll/register are tested with all auths. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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..ff6725c11ad66bd2b19d044f89695cf7aa87fe5a 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,12 @@ 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(
+ std::unique_ptr<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 +153,7 @@ class DeviceCloudPolicyInitializer : public CloudPolicyStore::Observer {
ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_;
// Our signing service.
- TpmEnrollmentKeySigningService signing_service_;
+ std::unique_ptr<SigningService> signing_service_;
DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer);
};

Powered by Google App Engine
This is Rietveld 408576698