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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « components/cryptauth/fake_cryptauth_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/callback.h"
8 #include "base/memory/ptr_util.h"
9 #include "components/cryptauth/fake_secure_message_delegate.h"
10 #include "components/cryptauth/mock_cryptauth_client.h"
11
12 namespace cryptauth {
13
14 FakeCryptAuthService::FakeCryptAuthService() {}
15
16 FakeCryptAuthService::~FakeCryptAuthService() {}
17
18 CryptAuthDeviceManager* FakeCryptAuthService::GetCryptAuthDeviceManager() {
19 return cryptauth_device_manager_;
20 }
21
22 CryptAuthEnrollmentManager*
23 FakeCryptAuthService::GetCryptAuthEnrollmentManager() {
24 return cryptauth_enrollment_manager_;
25 }
26
27 DeviceClassifier FakeCryptAuthService::GetDeviceClassifier() {
28 return device_classifier_;
29 }
30
31 std::string FakeCryptAuthService::GetAccountId() {
32 return account_id_;
33 }
34
35 std::unique_ptr<SecureMessageDelegate>
36 FakeCryptAuthService::CreateSecureMessageDelegate() {
37 return base::MakeUnique<FakeSecureMessageDelegate>();
38 }
39
40 std::unique_ptr<CryptAuthClientFactory>
41 FakeCryptAuthService::CreateCryptAuthClientFactory() {
42 return base::MakeUnique<MockCryptAuthClientFactory>(
43 MockCryptAuthClientFactory::MockType::MAKE_NICE_MOCKS);
44 }
45
46 } // namespace cryptauth
OLDNEW
« 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