OLD | NEW |
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Returns true if Arc is allowed to run for the given profile. | 111 // Returns true if Arc is allowed to run for the given profile. |
112 static bool IsAllowedForProfile(const Profile* profile); | 112 static bool IsAllowedForProfile(const Profile* profile); |
113 | 113 |
114 // Returns true if Arc is allowed to run for the current session. | 114 // Returns true if Arc is allowed to run for the current session. |
115 bool IsAllowed() const; | 115 bool IsAllowed() const; |
116 | 116 |
117 void OnPrimaryUserProfilePrepared(Profile* profile); | 117 void OnPrimaryUserProfilePrepared(Profile* profile); |
118 void Shutdown(); | 118 void Shutdown(); |
119 | 119 |
120 Profile* profile() { return profile_; } | 120 Profile* profile() { return profile_; } |
| 121 const Profile* profile() const { return profile_; } |
121 | 122 |
122 State state() const { return state_; } | 123 State state() const { return state_; } |
123 | 124 |
124 std::string GetAndResetAuthCode(); | 125 std::string GetAndResetAuthCode(); |
125 | 126 |
126 // Adds or removes observers. | 127 // Adds or removes observers. |
127 void AddObserver(Observer* observer); | 128 void AddObserver(Observer* observer); |
128 void RemoveObserver(Observer* observer); | 129 void RemoveObserver(Observer* observer); |
129 | 130 |
130 // ArcBridgeService::Observer: | 131 // ArcBridgeService::Observer: |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; | 230 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
230 | 231 |
231 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); | 232 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
232 }; | 233 }; |
233 | 234 |
234 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); | 235 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); |
235 | 236 |
236 } // namespace arc | 237 } // namespace arc |
237 | 238 |
238 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 239 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |