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

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

Issue 2498363002: Remove delegates from ArcAuthCodeFetcher and ArcAuthContext. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 f40a80934e5fff6012301f7695fb3ce476478833..b330a4c364016039c707baebf776672ba2163904 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.h
+++ b/chrome/browser/chromeos/arc/arc_auth_service.h
@@ -13,8 +13,6 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/timer/timer.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/arc/arc_support_host.h"
#include "chrome/browser/chromeos/arc/optin/arc_optin_preference_handler_observer.h"
#include "chrome/browser/chromeos/policy/android_management_client.h"
@@ -55,8 +53,6 @@ class ArcAuthService : public ArcService,
public InstanceHolder<mojom::AuthInstance>::Observer,
public ArcSupportHost::Observer,
public ArcOptInPreferenceHandlerObserver,
- public ArcAuthContextDelegate,
- public ArcAuthCodeFetcherDelegate,
public sync_preferences::PrefServiceSyncableObserver,
public sync_preferences::SyncedPrefObserver {
public:
@@ -181,9 +177,6 @@ class ArcAuthService : public ArcService,
void GetIsAccountManagedDeprecated(
const GetIsAccountManagedDeprecatedCallback& callback) override;
- // Called from Arc support platform app to set auth code and start arc.
- void OnAuthCodeObtained(const std::string& auth_code);
-
// Called from Arc support platform app when user cancels signing.
void CancelAuthCode();
@@ -204,14 +197,6 @@ class ArcAuthService : public ArcService,
// sync_preferences::SyncedPrefObserver
void OnSyncedPrefChanged(const std::string& path, bool from_sync) override;
- // ArcAuthContextDelegate:
- void OnContextReady() override;
- void OnPrepareContextFailed() override;
-
- // ArcAuthCodeFetcherDelegate:
- void OnAuthCodeSuccess(const std::string& auth_code) override;
- void OnAuthCodeFailed() override;
-
// ArcSupportHost::Observer:
void OnWindowClosed() override;
void OnTermsAgreed(bool is_metrics_enabled,
@@ -256,14 +241,23 @@ class ArcAuthService : public ArcService,
void OnAndroidManagementPassed();
void OnArcDataRemoved(bool success);
void OnArcSignInTimeout();
- bool IsAuthCodeRequest() const;
void FetchAuthCode();
void PrepareContextForAuthCodeRequest();
void RequestAccountInfoInternal(
std::unique_ptr<AccountInfoNotifier> account_info_notifier);
void OnAccountInfoReady(mojom::AccountInfoPtr account_info);
+
+ // Callback for Robot auth in Kiosk mode.
void OnRobotAuthCodeFetched(const std::string& auth_code);
+ // Callback for automatic auth code fetching when --arc-user-auth-endpoint
+ // flag is set.
+ void OnAuthCodeFetched(const std::string& auth_code);
+
+ // Common procedure across LSO auth code fetching, automatic auth code
+ // fetching, and Robot auth.
+ void OnAuthCodeObtained(const std::string& auth_code);
+
void StartArcAndroidManagementCheck();
// Called when the Android management check is done in opt-in flow or
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_context_delegate.h ('k') | chrome/browser/chromeos/arc/arc_auth_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698