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

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

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: Added missing dep. Created 3 years, 8 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 | « chromeos/components/tether/tether_host_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H_ 5 #ifndef COMPONENTS_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H_
6 #define COMPONENTS_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H_ 6 #define COMPONENTS_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() const; 115 virtual std::string GetUserPublicKey() const;
116 std::string GetUserPrivateKey() const; 116 virtual 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_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H_ 189 #endif // COMPONENTS_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H_
OLDNEW
« no previous file with comments | « chromeos/components/tether/tether_host_fetcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698