summaryrefslogtreecommitdiff
path: root/chromium/components/cryptauth/fake_cryptauth_service.cc
blob: 93b9113cc42daf09a3fdfdc406077b2ea956adbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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