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

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

Issue 2783423002: [Merge M58] arc: Provide UMA for OptIn flow. (Closed)
Patch Set: 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
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 // Returns whether the Play Store app is requested to be launched by this 219 // Returns whether the Play Store app is requested to be launched by this
220 // class. Should be used only for tests. 220 // class. Should be used only for tests.
221 bool IsPlaystoreLaunchRequestedForTesting() const; 221 bool IsPlaystoreLaunchRequestedForTesting() const;
222 222
223 // Invoking StartArc() only for testing, e.g., to emulate accepting Terms of 223 // Invoking StartArc() only for testing, e.g., to emulate accepting Terms of
224 // Service then passing Android management check successfully. 224 // Service then passing Android management check successfully.
225 void StartArcForTesting() { StartArc(); } 225 void StartArcForTesting() { StartArc(); }
226 226
227 private: 227 private:
228 // Reports statuses of OptIn flow to UMA.
229 class ScopedOptInFlowTracker;
230
228 // RequestEnable() has a check in order not to trigger starting procedure 231 // RequestEnable() has a check in order not to trigger starting procedure
229 // twice. This method can be called to bypass that check when restarting. 232 // twice. This method can be called to bypass that check when restarting.
230 void RequestEnableImpl(); 233 void RequestEnableImpl();
231 234
232 // Negotiates the terms of service to user. 235 // Negotiates the terms of service to user.
233 void StartTermsOfServiceNegotiation(); 236 void StartTermsOfServiceNegotiation();
234 void OnTermsOfServiceNegotiated(bool accepted); 237 void OnTermsOfServiceNegotiated(bool accepted);
235 238
236 // Returns whether ARC is managed and all ARC related OptIn preferences are 239 // Returns whether ARC is managed and all ARC related OptIn preferences are
237 // managed too. 240 // managed too.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 bool provisioning_reported_ = false; 290 bool provisioning_reported_ = false;
288 base::OneShotTimer arc_sign_in_timer_; 291 base::OneShotTimer arc_sign_in_timer_;
289 292
290 std::unique_ptr<ArcSupportHost> support_host_; 293 std::unique_ptr<ArcSupportHost> support_host_;
291 294
292 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_; 295 std::unique_ptr<ArcTermsOfServiceNegotiator> terms_of_service_negotiator_;
293 296
294 std::unique_ptr<ArcAuthContext> context_; 297 std::unique_ptr<ArcAuthContext> context_;
295 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_; 298 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_;
296 299
300 std::unique_ptr<ScopedOptInFlowTracker> scoped_opt_in_tracker_;
301
297 // The time when the sign in process started. 302 // The time when the sign in process started.
298 base::Time sign_in_start_time_; 303 base::Time sign_in_start_time_;
299 // The time when ARC was about to start. 304 // The time when ARC was about to start.
300 base::Time arc_start_time_; 305 base::Time arc_start_time_;
301 base::Closure attempt_user_exit_callback_; 306 base::Closure attempt_user_exit_callback_;
302 307
303 // Must be the last member. 308 // Must be the last member.
304 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_; 309 base::WeakPtrFactory<ArcSessionManager> weak_ptr_factory_;
305 310
306 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); 311 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager);
307 }; 312 };
308 313
309 // Outputs the stringified |state| to |os|. This is only for logging purposes. 314 // Outputs the stringified |state| to |os|. This is only for logging purposes.
310 std::ostream& operator<<(std::ostream& os, 315 std::ostream& operator<<(std::ostream& os,
311 const ArcSessionManager::State& state); 316 const ArcSessionManager::State& state);
312 317
313 } // namespace arc 318 } // namespace arc
314 319
315 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ 320 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_optin_uma.cc ('k') | chrome/browser/chromeos/arc/arc_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698