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> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h" | 15 #include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h" |
16 #include "components/arc/arc_bridge_service.h" | 16 #include "components/arc/arc_bridge_service.h" |
17 #include "components/arc/arc_service.h" | 17 #include "components/arc/arc_service.h" |
18 #include "components/arc/common/auth.mojom.h" | 18 #include "components/arc/common/auth.mojom.h" |
19 #include "components/prefs/pref_change_registrar.h" | 19 #include "components/prefs/pref_change_registrar.h" |
20 #include "components/syncable_prefs/pref_service_syncable_observer.h" | 20 #include "components/syncable_prefs/pref_service_syncable_observer.h" |
21 #include "components/syncable_prefs/synced_pref_observer.h" | 21 #include "components/syncable_prefs/synced_pref_observer.h" |
22 #include "google_apis/gaia/ubertoken_fetcher.h" | 22 #include "google_apis/gaia/ubertoken_fetcher.h" |
23 #include "mojo/public/cpp/bindings/binding.h" | 23 #include "mojo/public/cpp/bindings/binding.h" |
24 | 24 |
25 class ArcAndroidManagementChecker; | 25 class ArcAndroidManagementChecker; |
26 class ArcAppLauncher; | 26 class ArcAppLauncher; |
27 class GaiaAuthFetcher; | 27 class GaiaAuthFetcher; |
28 class Profile; | 28 class Profile; |
29 class ProfileOAuth2TokenService; | 29 class ProfileOAuth2TokenService; |
30 class PrefRegistrySimple; | |
30 | 31 |
31 namespace ash { | 32 namespace ash { |
32 class ShelfDelegate; | 33 class ShelfDelegate; |
33 } | 34 } |
34 | 35 |
35 namespace content { | 36 namespace content { |
36 class StoragePartition; | 37 class StoragePartition; |
37 } | 38 } |
38 | 39 |
39 namespace net { | 40 namespace net { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 }; | 96 }; |
96 | 97 |
97 explicit ArcAuthService(ArcBridgeService* bridge_service); | 98 explicit ArcAuthService(ArcBridgeService* bridge_service); |
98 ~ArcAuthService() override; | 99 ~ArcAuthService() override; |
99 | 100 |
100 static ArcAuthService* Get(); | 101 static ArcAuthService* Get(); |
101 | 102 |
102 // It is called from chrome/browser/prefs/browser_prefs.cc. | 103 // It is called from chrome/browser/prefs/browser_prefs.cc. |
103 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 104 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
104 | 105 |
106 // It is called from chrome/browser/prefs/browser_prefs.cc. | |
107 static void RegisterPrefs(PrefRegistrySimple* registry); | |
khmel
2016/06/28 23:09:54
Should it be sync able?
malaykeshav
2016/06/29 01:29:06
No, this is for the non syncable prefs.
| |
108 | |
105 static void DisableUIForTesting(); | 109 static void DisableUIForTesting(); |
106 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); | 110 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); |
107 | 111 |
108 // Checks if OptIn verification was disabled by switch in command line. | 112 // Checks if OptIn verification was disabled by switch in command line. |
109 static bool IsOptInVerificationDisabled(); | 113 static bool IsOptInVerificationDisabled(); |
110 | 114 |
111 static void EnableCheckAndroidManagementForTesting(); | 115 static void EnableCheckAndroidManagementForTesting(); |
112 | 116 |
113 // Returns true if Arc is allowed to run for the given profile. | 117 // Returns true if Arc is allowed to run for the given profile. |
114 static bool IsAllowedForProfile(const Profile* profile); | 118 static bool IsAllowedForProfile(const Profile* profile); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; | 238 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
235 | 239 |
236 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); | 240 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
237 }; | 241 }; |
238 | 242 |
239 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); | 243 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); |
240 | 244 |
241 } // namespace arc | 245 } // namespace arc |
242 | 246 |
243 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 247 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |