| 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 cd20eaf7598f4c4a94a6920282fa820373ce1faf..92a57574c8f6e887fd72e157a97e302e253dc797 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_service.h
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.h
|
| @@ -6,9 +6,11 @@
|
| #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
|
|
|
| #include <ostream>
|
| +#include <string>
|
|
|
| #include "base/macros.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"
|
| @@ -88,6 +90,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();
|
|
|
| @@ -146,6 +150,12 @@ class ArcAuthService : public ArcService,
|
| // Returns current page status, relevant to the specific page.
|
| const base::string16& ui_page_status() { return ui_page_status_; }
|
|
|
| + // Set auth_token only for testing when check Android management is enabled
|
| + // for testing.
|
| + void set_auth_token_for_testing(const std::string& auth_token) {
|
| + auth_token_ = auth_token;
|
| + }
|
| +
|
| private:
|
| void StartArc();
|
| void PrepareContext();
|
| @@ -159,6 +169,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;
|
| @@ -180,6 +194,9 @@ class ArcAuthService : public ArcService,
|
| bool context_prepared_ = false;
|
| UIPage ui_page_ = UIPage::NO_PAGE;
|
| base::string16 ui_page_status_;
|
| + std::string auth_token_;
|
| +
|
| + std::unique_ptr<policy::AndroidManagementClient> android_management_client_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
|
| };
|
|
|