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

Unified Diff: components/cryptauth/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
Index: components/cryptauth/local_device_data_provider.cc
diff --git a/chromeos/components/tether/local_device_data_provider.cc b/components/cryptauth/local_device_data_provider.cc
similarity index 80%
rename from chromeos/components/tether/local_device_data_provider.cc
rename to components/cryptauth/local_device_data_provider.cc
index 38fbcc10e3b618c90143b48aa2bea04a9814a869..f98cad8160f5185818e2ba3f5331bf85830793e0 100644
--- a/chromeos/components/tether/local_device_data_provider.cc
+++ b/components/cryptauth/local_device_data_provider.cc
@@ -2,26 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chromeos/components/tether/local_device_data_provider.h"
+#include "components/cryptauth/local_device_data_provider.h"
#include "components/cryptauth/cryptauth_device_manager.h"
#include "components/cryptauth/cryptauth_enrollment_manager.h"
#include "components/cryptauth/cryptauth_service.h"
#include "components/cryptauth/proto/cryptauth_api.pb.h"
-namespace chromeos {
-
-namespace tether {
+namespace cryptauth {
LocalDeviceDataProvider::LocalDeviceDataProvider(
- cryptauth::CryptAuthService* cryptauth_service)
+ CryptAuthService* cryptauth_service)
: cryptauth_service_(cryptauth_service) {}
LocalDeviceDataProvider::~LocalDeviceDataProvider() {}
bool LocalDeviceDataProvider::GetLocalDeviceData(
std::string* public_key_out,
- std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const {
+ std::vector<BeaconSeed>* beacon_seeds_out) const {
DCHECK(public_key_out || beacon_seeds_out);
std::string public_key =
@@ -30,7 +28,7 @@ bool LocalDeviceDataProvider::GetLocalDeviceData(
return false;
}
- std::vector<cryptauth::ExternalDeviceInfo> synced_devices =
+ std::vector<ExternalDeviceInfo> synced_devices =
cryptauth_service_->GetCryptAuthDeviceManager()->GetSyncedDevices();
for (const auto& device : synced_devices) {
if (device.has_public_key() && device.public_key() == public_key &&
@@ -53,6 +51,4 @@ bool LocalDeviceDataProvider::GetLocalDeviceData(
return false;
}
-} // namespace tether
-
-} // namespace chromeos
+} // namespace cryptauth
« no previous file with comments | « components/cryptauth/local_device_data_provider.h ('k') | components/cryptauth/local_device_data_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698