OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <string> | 10 #include <string> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 State state() const { return state_; } | 115 State state() const { return state_; } |
116 | 116 |
117 std::string GetAndResetAuthCode(); | 117 std::string GetAndResetAuthCode(); |
118 | 118 |
119 // Adds or removes observers. | 119 // Adds or removes observers. |
120 void AddObserver(Observer* observer); | 120 void AddObserver(Observer* observer); |
121 void RemoveObserver(Observer* observer); | 121 void RemoveObserver(Observer* observer); |
122 | 122 |
123 // ArcBridgeService::Observer: | 123 // ArcBridgeService::Observer: |
124 void OnAuthInstanceReady() override; | 124 void OnAuthInstanceReady() override; |
125 void OnBridgeStopped() override; | 125 void OnBridgeStopped(ArcBridgeService::StopReason reason) override; |
126 | 126 |
127 // AuthHost: | 127 // AuthHost: |
128 // For security reason this code can be used only once and exists for specific | 128 // For security reason this code can be used only once and exists for specific |
129 // period of time. | 129 // period of time. |
130 void GetAuthCodeDeprecated( | 130 void GetAuthCodeDeprecated( |
131 const GetAuthCodeDeprecatedCallback& callback) override; | 131 const GetAuthCodeDeprecatedCallback& callback) override; |
132 void GetAuthCode(const GetAuthCodeCallback& callback) override; | 132 void GetAuthCode(const GetAuthCodeCallback& callback) override; |
133 void OnSignInComplete() override; | 133 void OnSignInComplete() override; |
134 void OnSignInFailed(arc::mojom::ArcSignInFailureReason reason) override; | 134 void OnSignInFailed(arc::mojom::ArcSignInFailureReason reason) override; |
135 // Callback is called with a bool that indicates the management status of the | 135 // Callback is called with a bool that indicates the management status of the |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; | 214 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); | 216 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
217 }; | 217 }; |
218 | 218 |
219 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); | 219 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); |
220 | 220 |
221 } // namespace arc | 221 } // namespace arc |
222 | 222 |
223 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 223 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |