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

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

Issue 2587963003: [CrOS Tether]: Add LocalDeviceDataProvider, which fetches device data for the local device. (Closed)
Patch Set: Rebased. Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Returns true if the last enrollment failed and the manager is now 106 // Returns true if the last enrollment failed and the manager is now
107 // scheduling enrollments more aggressively to recover. If no enrollment has 107 // scheduling enrollments more aggressively to recover. If no enrollment has
108 // ever been recorded, then this function will also return true. 108 // ever been recorded, then this function will also return true.
109 bool IsRecoveringFromFailure() const; 109 bool IsRecoveringFromFailure() const;
110 110
111 // Returns the keypair used to enroll with CryptAuth. If no enrollment has 111 // Returns the keypair used to enroll with CryptAuth. If no enrollment has
112 // been completed, then an empty string will be returned. 112 // been completed, then an empty string will be returned.
113 // Note: These keys are really serialized protocol buffer messages, and should 113 // Note: These keys are really serialized protocol buffer messages, and should
114 // only be used by passing to SecureMessageDelegate. 114 // only be used by passing to SecureMessageDelegate.
115 std::string GetUserPublicKey(); 115 std::string GetUserPublicKey() const;
116 std::string GetUserPrivateKey(); 116 std::string GetUserPrivateKey() const;
117 117
118 protected: 118 protected:
119 // Creates a new SyncScheduler instance. Exposed for testing. 119 // Creates a new SyncScheduler instance. Exposed for testing.
120 virtual std::unique_ptr<SyncScheduler> CreateSyncScheduler(); 120 virtual std::unique_ptr<SyncScheduler> CreateSyncScheduler();
121 121
122 private: 122 private:
123 // CryptAuthGCMManager::Observer: 123 // CryptAuthGCMManager::Observer:
124 void OnGCMRegistrationResult(bool success) override; 124 void OnGCMRegistrationResult(bool success) override;
125 void OnReenrollMessage() override; 125 void OnReenrollMessage() override;
126 126
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 base::ObserverList<Observer> observers_; 180 base::ObserverList<Observer> observers_;
181 181
182 base::WeakPtrFactory<CryptAuthEnrollmentManager> weak_ptr_factory_; 182 base::WeakPtrFactory<CryptAuthEnrollmentManager> weak_ptr_factory_;
183 183
184 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollmentManager); 184 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollmentManager);
185 }; 185 };
186 186
187 } // namespace cryptauth 187 } // namespace cryptauth
188 188
189 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H 189 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698