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

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

Issue 2844383006: Turn ArcSupportHost from Observer model to Delegate (Closed)
Patch Set: rebase Created 3 years, 6 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 | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/arc/arc_session_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
28 namespace arc { 28 namespace arc {
29 29
30 class ArcAndroidManagementChecker; 30 class ArcAndroidManagementChecker;
31 class ArcAuthContext; 31 class ArcAuthContext;
32 class ArcTermsOfServiceNegotiator; 32 class ArcTermsOfServiceNegotiator;
33 enum class ProvisioningResult : int; 33 enum class ProvisioningResult : int;
34 34
35 // This class proxies the request from the client to fetch an auth code from 35 // This class proxies the request from the client to fetch an auth code from
36 // LSO. It lives on the UI thread. 36 // LSO. It lives on the UI thread.
37 class ArcSessionManager : public ArcSessionRunner::Observer, 37 class ArcSessionManager : public ArcSessionRunner::Observer,
38 public ArcSupportHost::Observer { 38 public ArcSupportHost::ErrorDelegate {
39 public: 39 public:
40 // Represents each State of ARC session. 40 // Represents each State of ARC session.
41 // NOT_INITIALIZED: represents the state that the Profile is not yet ready 41 // NOT_INITIALIZED: represents the state that the Profile is not yet ready
42 // so that this service is not yet initialized, or Chrome is being shut 42 // so that this service is not yet initialized, or Chrome is being shut
43 // down so that this is destroyed. 43 // down so that this is destroyed.
44 // STOPPED: ARC session is not running, or being terminated. 44 // STOPPED: ARC session is not running, or being terminated.
45 // NEGOTIATING_TERMS_OF_SERVICE: Negotiating Google Play Store "Terms of 45 // NEGOTIATING_TERMS_OF_SERVICE: Negotiating Google Play Store "Terms of
46 // Service" with a user. There are several ways for the negotiation, 46 // Service" with a user. There are several ways for the negotiation,
47 // including opt-in flow, which shows "Terms of Service" page on ARC 47 // including opt-in flow, which shows "Terms of Service" page on ARC
48 // support app, and OOBE flow, which shows "Terms of Service" page as a 48 // support app, and OOBE flow, which shows "Terms of Service" page as a
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // If ARC is stopped, triggers to remove the data. Otherwise, queues to 187 // If ARC is stopped, triggers to remove the data. Otherwise, queues to
188 // remove the data after ARC stops. 188 // remove the data after ARC stops.
189 // A log statement with the removal reason must be added prior to calling 189 // A log statement with the removal reason must be added prior to calling
190 // this. 190 // this.
191 void RequestArcDataRemoval(); 191 void RequestArcDataRemoval();
192 192
193 // Called from the Chrome OS metrics provider to record Arc.State 193 // Called from the Chrome OS metrics provider to record Arc.State
194 // periodically. 194 // periodically.
195 void RecordArcState(); 195 void RecordArcState();
196 196
197 // ArcSupportHost::Observer: 197 // ArcSupportHost:::ErrorDelegate:
198 void OnWindowClosed() override; 198 void OnWindowClosed() override;
199 void OnTermsAgreed(bool is_metrics_enabled,
200 bool is_backup_and_restore_enabled,
201 bool is_location_service_enabled) override;
202 void OnRetryClicked() override; 199 void OnRetryClicked() override;
203 void OnSendFeedbackClicked() override; 200 void OnSendFeedbackClicked() override;
204 201
205 // StopArc(), then restart. Between them data clear may happens. 202 // StopArc(), then restart. Between them data clear may happens.
206 // This is a special method to support enterprise device lost case. 203 // This is a special method to support enterprise device lost case.
207 // This can be called only when ARC is running. 204 // This can be called only when ARC is running.
208 void StopAndEnableArc(); 205 void StopAndEnableArc();
209 206
210 ArcSupportHost* support_host() { return support_host_.get(); } 207 ArcSupportHost* support_host() { return support_host_.get(); }
211 208
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); 355 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager);
359 }; 356 };
360 357
361 // Outputs the stringified |state| to |os|. This is only for logging purposes. 358 // Outputs the stringified |state| to |os|. This is only for logging purposes.
362 std::ostream& operator<<(std::ostream& os, 359 std::ostream& operator<<(std::ostream& os,
363 const ArcSessionManager::State& state); 360 const ArcSessionManager::State& state);
364 361
365 } // namespace arc 362 } // namespace arc
366 363
367 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ 364 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/arc/arc_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698