| 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_SESSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 ArcSupportHost* support_host() { return support_host_.get(); } | 199 ArcSupportHost* support_host() { return support_host_.get(); } |
| 200 | 200 |
| 201 // TODO(hidehiko): Get rid of the getter by migration between ArcAuthContext | 201 // TODO(hidehiko): Get rid of the getter by migration between ArcAuthContext |
| 202 // and ArcAuthCodeFetcher. | 202 // and ArcAuthCodeFetcher. |
| 203 ArcAuthContext* auth_context() { return context_.get(); } | 203 ArcAuthContext* auth_context() { return context_.get(); } |
| 204 | 204 |
| 205 void StartArc(); | 205 void StartArc(); |
| 206 | 206 |
| 207 void OnProvisioningFinished(ProvisioningResult result); | 207 void OnProvisioningFinished(ProvisioningResult result); |
| 208 | 208 |
| 209 void SetAttemptUserExitCallbackForTesting(const base::Closure& callback); |
| 210 |
| 209 private: | 211 private: |
| 210 // Negotiates the terms of service to user. | 212 // Negotiates the terms of service to user. |
| 211 void StartTermsOfServiceNegotiation(); | 213 void StartTermsOfServiceNegotiation(); |
| 212 void OnTermsOfServiceNegotiated(bool accepted); | 214 void OnTermsOfServiceNegotiated(bool accepted); |
| 213 | 215 |
| 214 void SetState(State state); | 216 void SetState(State state); |
| 215 void ShutdownBridge(); | 217 void ShutdownBridge(); |
| 216 void OnOptInPreferenceChanged(); | 218 void OnOptInPreferenceChanged(); |
| 217 void OnAndroidManagementPassed(); | 219 void OnAndroidManagementPassed(); |
| 218 void OnArcDataRemoved(bool success); | 220 void OnArcDataRemoved(bool success); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 247 base::OneShotTimer arc_sign_in_timer_; | 249 base::OneShotTimer arc_sign_in_timer_; |
| 248 | 250 |
| 249 std::unique_ptr<ArcSupportHost> support_host_; | 251 std::unique_ptr<ArcSupportHost> support_host_; |
| 250 | 252 |
| 251 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_; | 253 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_; |
| 252 | 254 |
| 253 std::unique_ptr<ArcAuthContext> context_; | 255 std::unique_ptr<ArcAuthContext> context_; |
| 254 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_; | 256 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_; |
| 255 | 257 |
| 256 base::Time sign_in_time_; | 258 base::Time sign_in_time_; |
| 259 base::Closure attempt_user_exit_callback_; |
| 257 | 260 |
| 258 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_; | 261 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_; |
| 259 | 262 |
| 260 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); | 263 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); |
| 261 }; | 264 }; |
| 262 | 265 |
| 263 // Outputs the stringified |state| to |os|. This is only for logging purposes. | 266 // Outputs the stringified |state| to |os|. This is only for logging purposes. |
| 264 std::ostream& operator<<(std::ostream& os, | 267 std::ostream& operator<<(std::ostream& os, |
| 265 const ArcSessionManager::State& state); | 268 const ArcSessionManager::State& state); |
| 266 | 269 |
| 267 } // namespace arc | 270 } // namespace arc |
| 268 | 271 |
| 269 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 272 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| OLD | NEW |