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

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

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void RemoveSessionObserver(ArcSessionObserver* observer); 145 void RemoveSessionObserver(ArcSessionObserver* observer);
146 146
147 // Returns true if ARC instance is running/stopped, respectively. 147 // Returns true if ARC instance is running/stopped, respectively.
148 // See ArcSessionRunner::IsRunning()/IsStopped() for details. 148 // See ArcSessionRunner::IsRunning()/IsStopped() for details.
149 bool IsSessionRunning() const; 149 bool IsSessionRunning() const;
150 bool IsSessionStopped() const; 150 bool IsSessionStopped() const;
151 151
152 // Called from ARC support platform app when user cancels signing. 152 // Called from ARC support platform app when user cancels signing.
153 void CancelAuthCode(); 153 void CancelAuthCode();
154 154
155 // TODO(hidehiko): Better to rename longer but descriptive one, e.g.
156 // IsArcEnabledPreferenceManaged.
157 // TODO(hidehiko): Look at the real usage, and write document.
158 bool IsArcManaged() const;
159
160 // Returns the preference value of "arc.enabled", which means whether the
161 // user has opted in (or is opting in now) to use Google Play Store on ARC.
162 bool IsArcPlayStoreEnabled() const;
163
164 // Enables/disables Google Play Store on ARC. Currently, it is tied to
165 // ARC enabled state, too, so this also should trigger to enable/disable
166 // whole ARC system.
167 // TODO(hidehiko): De-couple the concept to enable ARC system and opt-in
168 // to use Google Play Store. Note that there is a plan to use ARC without
169 // Google Play Store, then ARC can run without opt-in.
170 void SetArcPlayStoreEnabled(bool enable);
171
172 // Requests to enable ARC session. This starts ARC instance, or maybe starts 155 // Requests to enable ARC session. This starts ARC instance, or maybe starts
173 // Terms Of Service negotiation if they haven't been accepted yet. 156 // Terms Of Service negotiation if they haven't been accepted yet.
174 // If it is already requested to enable, no-op. 157 // If it is already requested to enable, no-op.
175 // Currently, enabled/disabled is tied to whether Google Play Store is 158 // Currently, enabled/disabled is tied to whether Google Play Store is
176 // enabled or disabled. Please see also TODO of SetArcPlayStoreEnabled(). 159 // enabled or disabled. Please see also TODO of
160 // SetArcPlayStoreEnabledForProfile().
177 void RequestEnable(); 161 void RequestEnable();
178 162
179 // Requests to disable ARC session. This stops ARC instance, or quits Terms 163 // Requests to disable ARC session. This stops ARC instance, or quits Terms
180 // Of Service negotiation if it is the middle of the process (e.g. closing 164 // Of Service negotiation if it is the middle of the process (e.g. closing
181 // UI for manual negotiation if it is shown). 165 // UI for manual negotiation if it is shown).
182 // If it is already requested to disable, no-op. 166 // If it is already requested to disable, no-op.
183 void RequestDisable(); 167 void RequestDisable();
184 168
185 // Called from the Chrome OS metrics provider to record Arc.State 169 // Called from the Chrome OS metrics provider to record Arc.State
186 // periodically. 170 // periodically.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); 292 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager);
309 }; 293 };
310 294
311 // Outputs the stringified |state| to |os|. This is only for logging purposes. 295 // Outputs the stringified |state| to |os|. This is only for logging purposes.
312 std::ostream& operator<<(std::ostream& os, 296 std::ostream& operator<<(std::ostream& os,
313 const ArcSessionManager::State& state); 297 const ArcSessionManager::State& state);
314 298
315 } // namespace arc 299 } // namespace arc
316 300
317 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ 301 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_notification.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