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

Unified Diff: components/policy/core/common/cloud/mock_signing_service.cc

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
« no previous file with comments | « components/policy/core/common/cloud/mock_signing_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/cloud/mock_signing_service.cc
diff --git a/components/policy/core/common/cloud/mock_signing_service.cc b/components/policy/core/common/cloud/mock_signing_service.cc
index aece3a60d6cb86ffcf9a163de53f9f65b70247ad..8e281514ebf9d1f2d4cbcdee6c9720b6b3eaa80a 100644
--- a/components/policy/core/common/cloud/mock_signing_service.cc
+++ b/components/policy/core/common/cloud/mock_signing_service.cc
@@ -19,22 +19,17 @@ FakeSigningService::FakeSigningService() {}
FakeSigningService::~FakeSigningService() {}
-void FakeSigningService::SignRegistrationData(
- const em::CertificateBasedDeviceRegistrationData* registration_data,
- em::SignedData* signed_data) {
- DoSignData(registration_data->SerializeAsString(), signed_data);
- }
-
void FakeSigningService::SignData(const std::string& data,
const SigningCallback& callback) {
em::SignedData signed_data;
- if (success_)
- DoSignData(data, &signed_data);
+ if (success_) {
+ SignDataSynchronously(data, &signed_data);
+ }
callback.Run(success_, signed_data);
}
-void FakeSigningService::DoSignData(const std::string& data,
- em::SignedData* signed_data) {
+void FakeSigningService::SignDataSynchronously(const std::string& data,
+ em::SignedData* signed_data) {
signed_data->set_data(data + kSignedDataNonce);
signed_data->set_signature(kSignature);
signed_data->set_extra_data_bytes(sizeof(kSignedDataNonce) - 1);
@@ -49,4 +44,3 @@ MockSigningService::MockSigningService() {}
MockSigningService::~MockSigningService() {}
} // namespace policy
-
« no previous file with comments | « components/policy/core/common/cloud/mock_signing_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698