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

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

Issue 1973603002: arc: Make Play Store item persistance in shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + policy_browsertest.cc Created 4 years, 7 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 | « no previous file | chrome/browser/chromeos/arc/arc_auth_service.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_AUTH_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 #include <string> 10 #include <string>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // It is called from chrome/browser/prefs/browser_prefs.cc. 91 // It is called from chrome/browser/prefs/browser_prefs.cc.
92 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 92 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
93 93
94 static void DisableUIForTesting(); 94 static void DisableUIForTesting();
95 95
96 // Checks if OptIn verification was disabled by switch in command line. 96 // Checks if OptIn verification was disabled by switch in command line.
97 static bool IsOptInVerificationDisabled(); 97 static bool IsOptInVerificationDisabled();
98 98
99 static void EnableCheckAndroidManagementForTesting(); 99 static void EnableCheckAndroidManagementForTesting();
100 100
101 // Returns true if Arc is allowed to run for the given profile.
102 static bool IsAllowedForProfile(const Profile* profile);
103
104 // Returns true if Arc is allowed to run for the current session.
105 bool IsAllowed() const;
106
101 void OnPrimaryUserProfilePrepared(Profile* profile); 107 void OnPrimaryUserProfilePrepared(Profile* profile);
102 void Shutdown(); 108 void Shutdown();
103 109
104 State state() const { return state_; } 110 State state() const { return state_; }
105 111
106 std::string GetAndResetAuthCode(); 112 std::string GetAndResetAuthCode();
107 113
108 // Adds or removes observers. 114 // Adds or removes observers.
109 void AddObserver(Observer* observer); 115 void AddObserver(Observer* observer);
110 void RemoveObserver(Observer* observer); 116 void RemoveObserver(Observer* observer);
(...skipping 16 matching lines...) Expand all
127 133
128 // Called from Arc support platform app to start LSO. 134 // Called from Arc support platform app to start LSO.
129 void StartLso(); 135 void StartLso();
130 136
131 // Called from Arc support platform app to set auth code and start arc. 137 // Called from Arc support platform app to set auth code and start arc.
132 void SetAuthCodeAndStartArc(const std::string& auth_code); 138 void SetAuthCodeAndStartArc(const std::string& auth_code);
133 139
134 // Called from Arc support platform app when user cancels signing. 140 // Called from Arc support platform app when user cancels signing.
135 void CancelAuthCode(); 141 void CancelAuthCode();
136 142
143 bool IsArcEnabled();
137 void EnableArc(); 144 void EnableArc();
138 void DisableArc(); 145 void DisableArc();
139 146
140 // UbertokenConsumer: 147 // UbertokenConsumer:
141 void OnUbertokenSuccess(const std::string& token) override; 148 void OnUbertokenSuccess(const std::string& token) override;
142 void OnUbertokenFailure(const GoogleServiceAuthError& error) override; 149 void OnUbertokenFailure(const GoogleServiceAuthError& error) override;
143 150
144 // GaiaAuthConsumer: 151 // GaiaAuthConsumer:
145 void OnMergeSessionSuccess(const std::string& data) override; 152 void OnMergeSessionSuccess(const std::string& data) override;
146 void OnMergeSessionFailure(const GoogleServiceAuthError& error) override; 153 void OnMergeSessionFailure(const GoogleServiceAuthError& error) override;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; 211 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_;
205 212
206 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 213 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
207 }; 214 };
208 215
209 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 216 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
210 217
211 } // namespace arc 218 } // namespace arc
212 219
213 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 220 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698