| Index: components/policy/core/common/cloud/user_info_fetcher.h
|
| diff --git a/components/policy/core/common/cloud/user_info_fetcher.h b/components/policy/core/common/cloud/user_info_fetcher.h
|
| index 0f4c25f533daa17808e3a237945ca1e26ee2b42e..c248d81b06852ccdddc8f5318a6fd8ed5f724d0b 100644
|
| --- a/components/policy/core/common/cloud/user_info_fetcher.h
|
| +++ b/components/policy/core/common/cloud/user_info_fetcher.h
|
| @@ -8,7 +8,6 @@
|
| #include <string>
|
| #include "base/memory/scoped_ptr.h"
|
| #include "components/policy/policy_export.h"
|
| -#include "google_apis/gaia/gaia_oauth_client.h"
|
| #include "net/url_request/url_fetcher_delegate.h"
|
|
|
| class GoogleServiceAuthError;
|
| @@ -26,7 +25,7 @@
|
|
|
| // Class that makes a UserInfo request, parses the response, and notifies
|
| // a provided Delegate when the request is complete.
|
| -class POLICY_EXPORT UserInfoFetcher {
|
| +class POLICY_EXPORT UserInfoFetcher : public net::URLFetcherDelegate {
|
| public:
|
| class POLICY_EXPORT Delegate {
|
| public:
|
| @@ -49,25 +48,13 @@
|
| // Starts the UserInfo request, using the passed OAuth2 |access_token|.
|
| void Start(const std::string& access_token);
|
|
|
| + // net::URLFetcherDelegate implementation.
|
| + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
|
| +
|
| private:
|
| - class GaiaDelegate : public gaia::GaiaOAuthClient::Delegate {
|
| - public:
|
| - explicit GaiaDelegate(UserInfoFetcher::Delegate* delegate);
|
| -
|
| - private:
|
| - // gaia::GaiaOAuthClient::Delegate implementation.
|
| - virtual void OnGetUserInfoResponse(
|
| - scoped_ptr<base::DictionaryValue> user_info) OVERRIDE;
|
| - virtual void OnOAuthError() OVERRIDE;
|
| - virtual void OnNetworkError(int response_code) OVERRIDE;
|
| -
|
| - UserInfoFetcher::Delegate* delegate_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(GaiaDelegate);
|
| - };
|
| -
|
| - GaiaDelegate delegate_;
|
| - gaia::GaiaOAuthClient gaia_client_;
|
| + Delegate* delegate_;
|
| + net::URLRequestContextGetter* context_;
|
| + scoped_ptr<net::URLFetcher> url_fetcher_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(UserInfoFetcher);
|
| };
|
|
|