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

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: Slight renaming. 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..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);
};

Powered by Google App Engine
This is Rietveld 408576698