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

Unified Diff: components/cryptauth/fake_cryptauth_service.cc

Issue 2799683004: [CrOS Tether] Add FakeCryptAuthService, a test double for CryptAuthService. (Closed)
Patch Set: Added a missing #include. Created 3 years, 8 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/cryptauth/fake_cryptauth_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cryptauth/fake_cryptauth_service.cc
diff --git a/components/cryptauth/fake_cryptauth_service.cc b/components/cryptauth/fake_cryptauth_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..93b9113cc42daf09a3fdfdc406077b2ea956adbf
--- /dev/null
+++ b/components/cryptauth/fake_cryptauth_service.cc
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/cryptauth/fake_cryptauth_service.h"
+
+#include "base/callback.h"
+#include "base/memory/ptr_util.h"
+#include "components/cryptauth/fake_secure_message_delegate.h"
+#include "components/cryptauth/mock_cryptauth_client.h"
+
+namespace cryptauth {
+
+FakeCryptAuthService::FakeCryptAuthService() {}
+
+FakeCryptAuthService::~FakeCryptAuthService() {}
+
+CryptAuthDeviceManager* FakeCryptAuthService::GetCryptAuthDeviceManager() {
+ return cryptauth_device_manager_;
+}
+
+CryptAuthEnrollmentManager*
+FakeCryptAuthService::GetCryptAuthEnrollmentManager() {
+ return cryptauth_enrollment_manager_;
+}
+
+DeviceClassifier FakeCryptAuthService::GetDeviceClassifier() {
+ return device_classifier_;
+}
+
+std::string FakeCryptAuthService::GetAccountId() {
+ return account_id_;
+}
+
+std::unique_ptr<SecureMessageDelegate>
+FakeCryptAuthService::CreateSecureMessageDelegate() {
+ return base::MakeUnique<FakeSecureMessageDelegate>();
+}
+
+std::unique_ptr<CryptAuthClientFactory>
+FakeCryptAuthService::CreateCryptAuthClientFactory() {
+ return base::MakeUnique<MockCryptAuthClientFactory>(
+ MockCryptAuthClientFactory::MockType::MAKE_NICE_MOCKS);
+}
+
+} // namespace cryptauth
« no previous file with comments | « components/cryptauth/fake_cryptauth_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698