diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-24 12:15:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:30:04 +0000 |
commit | b014812705fc80bff0a5c120dfcef88f349816dc (patch) | |
tree | 25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/components/cryptauth/fake_software_feature_manager.cc | |
parent | 9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff) | |
download | qtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz |
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/cryptauth/fake_software_feature_manager.cc')
-rw-r--r-- | chromium/components/cryptauth/fake_software_feature_manager.cc | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/chromium/components/cryptauth/fake_software_feature_manager.cc b/chromium/components/cryptauth/fake_software_feature_manager.cc new file mode 100644 index 00000000000..a7625dc179d --- /dev/null +++ b/chromium/components/cryptauth/fake_software_feature_manager.cc @@ -0,0 +1,74 @@ +// Copyright 2017 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_software_feature_manager.h" + +namespace cryptauth { + +FakeSoftwareFeatureManager::SetSoftwareFeatureStateArgs:: + SetSoftwareFeatureStateArgs( + const std::string& public_key, + SoftwareFeature software_feature, + bool enabled, + const base::Closure& success_callback, + const base::Callback<void(const std::string&)>& error_callback, + bool is_exclusive) + : public_key(public_key), + software_feature(software_feature), + enabled(enabled), + success_callback(success_callback), + error_callback(error_callback), + is_exclusive(is_exclusive) {} + +FakeSoftwareFeatureManager::SetSoftwareFeatureStateArgs:: + ~SetSoftwareFeatureStateArgs() = default; + +FakeSoftwareFeatureManager::FindEligibleDevicesArgs::FindEligibleDevicesArgs( + SoftwareFeature software_feature, + const base::Callback<void(const std::vector<ExternalDeviceInfo>&, + const std::vector<IneligibleDevice>&)>& + success_callback, + const base::Callback<void(const std::string&)>& error_callback) + : software_feature(software_feature), + success_callback(success_callback), + error_callback(error_callback) {} + +FakeSoftwareFeatureManager::FindEligibleDevicesArgs:: + ~FindEligibleDevicesArgs() = default; + +FakeSoftwareFeatureManager::FakeSoftwareFeatureManager() = default; + +FakeSoftwareFeatureManager::~FakeSoftwareFeatureManager() = default; + +void FakeSoftwareFeatureManager::SetSoftwareFeatureState( + const std::string& public_key, + SoftwareFeature software_feature, + bool enabled, + const base::Closure& success_callback, + const base::Callback<void(const std::string&)>& error_callback, + bool is_exclusive) { + set_software_feature_state_calls_.emplace_back( + std::make_unique<SetSoftwareFeatureStateArgs>( + public_key, software_feature, enabled, success_callback, + error_callback, is_exclusive)); + + if (delegate_) + delegate_->OnSetSoftwareFeatureStateCalled(); +} + +void FakeSoftwareFeatureManager::FindEligibleDevices( + SoftwareFeature software_feature, + const base::Callback<void(const std::vector<ExternalDeviceInfo>&, + const std::vector<IneligibleDevice>&)>& + success_callback, + const base::Callback<void(const std::string&)>& error_callback) { + find_eligible_multidevice_host_calls_.emplace_back( + std::make_unique<FindEligibleDevicesArgs>( + software_feature, success_callback, error_callback)); + + if (delegate_) + delegate_->OnFindEligibleDevicesCalled(); +} + +} // namespace cryptauth |