Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_auth_service.h |
| diff --git a/chrome/browser/chromeos/arc/arc_auth_service.h b/chrome/browser/chromeos/arc/arc_auth_service.h |
| index d797dfa2f749c6d2e254fa2b651e6cc25df6899d..9dd814fb7ed502b3166655c2ad18fb2f4d6a0855 100644 |
| --- a/chrome/browser/chromeos/arc/arc_auth_service.h |
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.h |
| @@ -6,22 +6,25 @@ |
| #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
| #include <ostream> |
| +#include <string> |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/observer_list.h" |
| +#include "chrome/browser/chromeos/policy/android_management_client.h" |
| #include "components/arc/arc_bridge_service.h" |
| #include "components/arc/arc_service.h" |
| #include "components/arc/common/auth.mojom.h" |
| #include "components/prefs/pref_change_registrar.h" |
| #include "components/syncable_prefs/pref_service_syncable_observer.h" |
| #include "components/syncable_prefs/synced_pref_observer.h" |
| -#include "google_apis/gaia/gaia_auth_consumer.h" |
| #include "google_apis/gaia/ubertoken_fetcher.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| class ArcAppLauncher; |
| class GaiaAuthFetcher; |
| class Profile; |
| +class ProfileOAuth2TokenService; |
| namespace content { |
| class StoragePartition; |
| @@ -74,6 +77,9 @@ class ArcAuthService : public ArcService, |
| // Called to notify that OptIn UI needs to show specific page. |
| virtual void OnOptInUIShowPage(UIPage page, const base::string16& status) {} |
| + |
| + // Called to notify that ARC bridge is shutdown. |
|
bartfab (slow)
2016/05/02 14:55:48
Nit: s/shutdown/shut down/
Polina Bondarenko
2016/05/03 13:41:54
Done.
|
| + virtual void OnShutdownBridge() {} |
| }; |
| explicit ArcAuthService(ArcBridgeService* bridge_service); |
| @@ -89,6 +95,8 @@ class ArcAuthService : public ArcService, |
| // Checks if OptIn verification was disabled by switch in command line. |
| static bool IsOptInVerificationDisabled(); |
| + static void EnableCheckAndroidManagementForTesting(); |
| + |
| void OnPrimaryUserProfilePrepared(Profile* profile); |
| void Shutdown(); |
| @@ -160,6 +168,10 @@ class ArcAuthService : public ArcService, |
| void OnOptInPreferenceChanged(); |
| void StartUI(); |
| void OnPrepareContextFailed(); |
| + void StartAndroidManagementClient(); |
| + void CheckAndroidManagement(); |
| + void OnAndroidManagementChecked( |
| + policy::AndroidManagementClient::Result result); |
| // Unowned pointer. Keeps current profile. |
| Profile* profile_ = nullptr; |
| @@ -183,6 +195,12 @@ class ArcAuthService : public ArcService, |
| UIPage ui_page_ = UIPage::NO_PAGE; |
| base::string16 ui_page_status_; |
| + ProfileOAuth2TokenService* token_service_; |
| + std::string account_id_; |
| + std::unique_ptr<policy::AndroidManagementClient> android_management_client_; |
|
bartfab (slow)
2016/05/02 14:55:48
Nit: #include <memory>
Polina Bondarenko
2016/05/03 13:41:54
Done.
|
| + |
| + base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
| }; |