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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.h

Issue 2446563002: Refactor ArcAndroidManagementChecker. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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 8f161ed6a8bd73e4bcbbd25bed609c36ca49f576..bd1862c8849b740be0973cdf393aa3caf7adf6e6 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.h
+++ b/chrome/browser/chromeos/arc/arc_auth_service.h
@@ -13,9 +13,9 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
-#include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h"
#include "chrome/browser/chromeos/arc/arc_auth_code_fetcher_delegate.h"
#include "chrome/browser/chromeos/arc/arc_auth_context_delegate.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"
@@ -49,7 +49,6 @@ class ArcAuthService : public ArcService,
public mojom::AuthHost,
public ArcBridgeService::Observer,
public InstanceHolder<mojom::AuthInstance>::Observer,
- public ArcAndroidManagementCheckerDelegate,
public ArcAuthContextDelegate,
public ArcAuthCodeFetcherDelegate,
public syncable_prefs::PrefServiceSyncableObserver,
@@ -185,10 +184,6 @@ class ArcAuthService : public ArcService,
void OnAuthCodeSuccess(const std::string& auth_code) override;
void OnAuthCodeFailed() override;
- // ArcAndroidManagementCheckerDelegate:
- void OnAndroidManagementChecked(
- policy::AndroidManagementClient::Result result) override;
-
// Stops ARC without changing ArcEnabled preference.
void StopArc();
@@ -219,7 +214,6 @@ class ArcAuthService : public ArcService,
void OnOptInPreferenceChanged();
void StartUI();
void StartAndroidManagementClient();
- void CheckAndroidManagement(bool background_mode);
void OnAndroidManagementPassed();
void OnArcDataRemoved(bool success);
void OnArcSignInTimeout();
@@ -227,6 +221,16 @@ class ArcAuthService : public ArcService,
void FetchAuthCode();
void PrepareContextForAuthCodeRequest();
+ // Called when the Android management check is done in opt-in flow or
+ // re-auth flow.
+ void OnAndroidManagementChecked(
+ policy::AndroidManagementClient::Result result);
+
+ // Called when the background Android management check is done. It is
+ // triggered when the second or later ARC boot timing.
+ void OnBackgroundAndroidManagementChecked(
+ policy::AndroidManagementClient::Result result);
+
// Unowned pointer. Keeps current profile.
Profile* profile_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698