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

Side by Side Diff: components/cryptauth/local_device_data_provider.h

Issue 2951303002: [CrOS Tether] Move LocalDeviceDataProvider from //chromeos/components/tether to //components/crypta… (Closed)
Patch Set: Rebased. Created 3 years, 5 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/BUILD.gn ('k') | components/cryptauth/local_device_data_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H_ 5 #ifndef COMPONENTS_CRYPTAUTH_LOCAL_DEVICE_DATA_PROVIDER_H_
6 #define CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H_ 6 #define COMPONENTS_CRYPTAUTH_LOCAL_DEVICE_DATA_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 14
15 namespace cryptauth { 15 namespace cryptauth {
16
16 class BeaconSeed; 17 class BeaconSeed;
17 class CryptAuthService; 18 class CryptAuthService;
18 }
19
20 namespace chromeos {
21
22 namespace tether {
23 19
24 // Fetches CryptAuth data about the local device (i.e., the device on which this 20 // Fetches CryptAuth data about the local device (i.e., the device on which this
25 // code is running) for the current user (i.e., the one which is logged-in). 21 // code is running) for the current user (i.e., the one which is logged-in).
26 class LocalDeviceDataProvider { 22 class LocalDeviceDataProvider {
27 public: 23 public:
28 explicit LocalDeviceDataProvider( 24 explicit LocalDeviceDataProvider(CryptAuthService* cryptauth_service);
29 cryptauth::CryptAuthService* cryptauth_service);
30 virtual ~LocalDeviceDataProvider(); 25 virtual ~LocalDeviceDataProvider();
31 26
32 // Fetches the public key and/or the beacon seeds for the local device. 27 // Fetches the public key and/or the beacon seeds for the local device.
33 // Returns whether the operation succeeded. If |nullptr| is passed as a 28 // Returns whether the operation succeeded. If |nullptr| is passed as a
34 // parameter, the associated data will not be fetched. 29 // parameter, the associated data will not be fetched.
35 virtual bool GetLocalDeviceData( 30 virtual bool GetLocalDeviceData(
36 std::string* public_key_out, 31 std::string* public_key_out,
37 std::vector<cryptauth::BeaconSeed>* beacon_seeds_out) const; 32 std::vector<BeaconSeed>* beacon_seeds_out) const;
38 33
39 private: 34 private:
40 friend class LocalDeviceDataProviderTest; 35 friend class LocalDeviceDataProviderTest;
41 36
42 cryptauth::CryptAuthService* cryptauth_service_; 37 CryptAuthService* cryptauth_service_;
43 38
44 DISALLOW_COPY_AND_ASSIGN(LocalDeviceDataProvider); 39 DISALLOW_COPY_AND_ASSIGN(LocalDeviceDataProvider);
45 }; 40 };
46 41
47 } // namespace tether 42 } // namespace cryptauth
48 43
49 } // namespace chromeos 44 #endif // COMPONENTS_CRYPTAUTH_LOCAL_DEVICE_DATA_PROVIDER_H_
50
51 #endif // CHROMEOS_COMPONENTS_TETHER_LOCAL_DEVICE_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/cryptauth/BUILD.gn ('k') | components/cryptauth/local_device_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698