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

Unified Diff: chromeos/components/tether/mock_local_device_data_provider.cc

Issue 2951303002: [CrOS Tether] Move LocalDeviceDataProvider from //chromeos/components/tether to //components/crypta… (Closed)
Patch Set: Rebased. Created 3 years, 6 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 | « chromeos/components/tether/mock_local_device_data_provider.h ('k') | components/cryptauth/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/components/tether/mock_local_device_data_provider.cc
diff --git a/chromeos/components/tether/mock_local_device_data_provider.cc b/chromeos/components/tether/mock_local_device_data_provider.cc
deleted file mode 100644
index 736e620efc7ec4463d50f7e381fed3bdfc2ee065..0000000000000000000000000000000000000000
--- a/chromeos/components/tether/mock_local_device_data_provider.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 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 "chromeos/components/tether/mock_local_device_data_provider.h"
-
-#include "components/cryptauth/cryptauth_device_manager.h"
-#include "components/cryptauth/cryptauth_enrollment_manager.h"
-#include "components/cryptauth/proto/cryptauth_api.pb.h"
-
-namespace chromeos {
-
-namespace tether {
-
-MockLocalDeviceDataProvider::MockLocalDeviceDataProvider()
- : LocalDeviceDataProvider(nullptr /* cryptauth_service */) {}
-
-MockLocalDeviceDataProvider::~MockLocalDeviceDataProvider() {}
-
-void MockLocalDeviceDataProvider::SetPublicKey(
- std::unique_ptr<std::string> public_key) {
- if (public_key) {
- public_key_ = std::move(public_key);
- } else {
- public_key_.reset();
- }
-}
-
-void MockLocalDeviceDataProvider::SetBeaconSeeds(
- std::unique_ptr<std::vector<cryptauth::BeaconSeed>> beacon_seeds) {
- if (beacon_seeds) {
- beacon_seeds_ = std::move(beacon_seeds);
- } else {
- beacon_seeds_.reset();
- }
-}
-
-bool MockLocalDeviceDataProvider::GetLocalDeviceData(
- std::string* public_key_out,
- std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const {
- bool success = false;
-
- if (public_key_ && public_key_out) {
- *public_key_out = *public_key_;
- success = true;
- }
-
- if (beacon_seeds_ && beacon_seeds_out) {
- *beacon_seeds_out = *beacon_seeds_;
- success = true;
- }
-
- return success;
-}
-
-} // namespace tether
-
-} // namespace chromeos
« no previous file with comments | « chromeos/components/tether/mock_local_device_data_provider.h ('k') | components/cryptauth/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698