| Index: chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h
|
| diff --git a/chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h b/chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h
|
| index 0de66140e7f44791a56a30bd5d5cae713349ba17..fe28a96af4d0c252bd50a3c674679dde33e7718b 100644
|
| --- a/chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h
|
| +++ b/chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h
|
| @@ -16,13 +16,21 @@ class ArcAuthInfoFetcher {
|
| public:
|
| virtual ~ArcAuthInfoFetcher() = default;
|
|
|
| - // Fetches the auth code or the enrollment token. On success, |callback| is
|
| - // called with the fetched |auth_info|. Otherwise, |callback| is called with
|
| - // empty string.
|
| + enum class Status {
|
| + SUCCESS, // The fetch was successful.
|
| + FAILURE, // The request failed.
|
| + ARC_DISABLED, // ARC is not enabled.
|
| + };
|
| +
|
| + // Fetches the auth code or the enrollment token.
|
| + // On success, |callback| is called with |status| = SUCCESS and with the
|
| + // fetched |auth_info|. Otherwise, |status| contains the reason of the
|
| + // failure.
|
| // Fetch() should be called once per instance, and it is expected that
|
| // the inflight operation is cancelled without calling the |callback|
|
| // when the instance is deleted.
|
| - using FetchCallback = base::Callback<void(const std::string& auth_info)>;
|
| + using FetchCallback =
|
| + base::Callback<void(Status status, const std::string& auth_info)>;
|
| virtual void Fetch(const FetchCallback& callback) = 0;
|
| };
|
|
|
|
|