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

Side by Side Diff: components/cryptauth/fake_cryptauth_service.cc

Issue 2799683004: [CrOS Tether] Add FakeCryptAuthService, a test double for CryptAuthService. (Closed)
Patch Set: Remove all but the test double. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/cryptauth/fake_cryptauth_service.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "components/cryptauth/fake_secure_message_delegate.h"
9 #include "components/cryptauth/mock_cryptauth_client.h"
10
11 namespace cryptauth {
12
13 FakeCryptAuthService::FakeCryptAuthService() {}
14
15 FakeCryptAuthService::~FakeCryptAuthService() {}
16
17 CryptAuthDeviceManager* FakeCryptAuthService::GetCryptAuthDeviceManager() {
18 return cryptauth_device_manager_;
19 }
20
21 CryptAuthEnrollmentManager*
22 FakeCryptAuthService::GetCryptAuthEnrollmentManager() {
23 return cryptauth_enrollment_manager_;
24 }
25
26 DeviceClassifier FakeCryptAuthService::GetDeviceClassifier() {
27 return device_classifier_;
28 }
29
30 std::string FakeCryptAuthService::GetAccountId() {
31 return account_id_;
32 }
33
34 std::unique_ptr<SecureMessageDelegate>
35 FakeCryptAuthService::CreateSecureMessageDelegate() {
36 return base::MakeUnique<FakeSecureMessageDelegate>();
37 }
38
39 std::unique_ptr<CryptAuthClientFactory>
40 FakeCryptAuthService::CreateCryptAuthClientFactory() {
41 return base::MakeUnique<MockCryptAuthClientFactory>(
42 MockCryptAuthClientFactory::MockType::MAKE_NICE_MOCKS);
43 }
44
45 } // namespace cryptauth
OLDNEW
« components/cryptauth/cryptauth_service.h ('K') | « components/cryptauth/fake_cryptauth_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698