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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager.h

Issue 2553193002: Remove explicit singletonness of ArcBridgeService part 4. (Closed)
Patch Set: 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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ArcSupportHost* support_host() { return support_host_.get(); } 194 ArcSupportHost* support_host() { return support_host_.get(); }
195 195
196 // TODO(hidehiko): Get rid of the getter by migration between ArcAuthContext 196 // TODO(hidehiko): Get rid of the getter by migration between ArcAuthContext
197 // and ArcAuthCodeFetcher. 197 // and ArcAuthCodeFetcher.
198 ArcAuthContext* auth_context() { return context_.get(); } 198 ArcAuthContext* auth_context() { return context_.get(); }
199 199
200 void StartArc(); 200 void StartArc();
201 201
202 void OnProvisioningFinished(ProvisioningResult result); 202 void OnProvisioningFinished(ProvisioningResult result);
203 203
204 void SetAttemptUserExitCallbackForTesting(const base::Closure& callback);
205
204 private: 206 private:
205 // Negotiates the terms of service to user. 207 // Negotiates the terms of service to user.
206 void StartTermsOfServiceNegotiation(); 208 void StartTermsOfServiceNegotiation();
207 void OnTermsOfServiceNegotiated(bool accepted); 209 void OnTermsOfServiceNegotiated(bool accepted);
208 210
209 void SetState(State state); 211 void SetState(State state);
210 void ShutdownBridge(); 212 void ShutdownBridge();
211 void OnOptInPreferenceChanged(); 213 void OnOptInPreferenceChanged();
212 void OnAndroidManagementPassed(); 214 void OnAndroidManagementPassed();
213 void OnArcDataRemoved(bool success); 215 void OnArcDataRemoved(bool success);
(...skipping 27 matching lines...) Expand all
241 base::OneShotTimer arc_sign_in_timer_; 243 base::OneShotTimer arc_sign_in_timer_;
242 244
243 std::unique_ptr<ArcSupportHost> support_host_; 245 std::unique_ptr<ArcSupportHost> support_host_;
244 246
245 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_; 247 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_;
246 248
247 std::unique_ptr<ArcAuthContext> context_; 249 std::unique_ptr<ArcAuthContext> context_;
248 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_; 250 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_;
249 251
250 base::Time sign_in_time_; 252 base::Time sign_in_time_;
253 base::Closure attempt_user_exit_callback_;
251 254
252 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_; 255 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_;
253 256
254 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); 257 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager);
255 }; 258 };
256 259
257 // Outputs the stringified |state| to |os|. This is only for logging purposes. 260 // Outputs the stringified |state| to |os|. This is only for logging purposes.
258 std::ostream& operator<<(std::ostream& os, 261 std::ostream& operator<<(std::ostream& os,
259 const ArcSessionManager::State& state); 262 const ArcSessionManager::State& state);
260 263
261 } // namespace arc 264 } // namespace arc
262 265
263 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ 266 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698