| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 10 |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "components/policy/policy_export.h" | 12 #include "components/policy/policy_export.h" |
| 12 #include "net/url_request/url_fetcher_delegate.h" | 13 #include "net/url_request/url_fetcher_delegate.h" |
| 13 | 14 |
| 14 class GoogleServiceAuthError; | 15 class GoogleServiceAuthError; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class DictionaryValue; | 18 class DictionaryValue; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 | 49 |
| 49 // Starts the UserInfo request, using the passed OAuth2 |access_token|. | 50 // Starts the UserInfo request, using the passed OAuth2 |access_token|. |
| 50 void Start(const std::string& access_token); | 51 void Start(const std::string& access_token); |
| 51 | 52 |
| 52 // net::URLFetcherDelegate implementation. | 53 // net::URLFetcherDelegate implementation. |
| 53 void OnURLFetchComplete(const net::URLFetcher* source) override; | 54 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 Delegate* delegate_; | 57 Delegate* delegate_; |
| 57 net::URLRequestContextGetter* context_; | 58 net::URLRequestContextGetter* context_; |
| 58 scoped_ptr<net::URLFetcher> url_fetcher_; | 59 std::unique_ptr<net::URLFetcher> url_fetcher_; |
| 59 | 60 |
| 60 DISALLOW_COPY_AND_ASSIGN(UserInfoFetcher); | 61 DISALLOW_COPY_AND_ASSIGN(UserInfoFetcher); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace policy | 64 } // namespace policy |
| 64 | 65 |
| 65 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ | 66 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_INFO_FETCHER_H_ |
| OLD | NEW |