| 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 CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "chrome/browser/image_decoder.h" | 14 #include "chrome/browser/image_decoder.h" |
| 15 #include "components/signin/core/browser/account_info.h" | 15 #include "components/signin/core/browser/account_info.h" |
| 16 #include "components/signin/core/browser/account_tracker_service.h" | 16 #include "components/signin/core/browser/account_tracker_service.h" |
| 17 #include "google_apis/gaia/oauth2_token_service.h" | 17 #include "google_apis/gaia/oauth2_token_service.h" |
| 18 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
| 19 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 class ProfileDownloaderDelegate; | 22 class ProfileDownloaderDelegate; |
| 23 class OAuth2AccessTokenFetcher; | |
| 24 | 23 |
| 25 namespace net { | 24 namespace net { |
| 26 class URLFetcher; | 25 class URLFetcher; |
| 27 } // namespace net | 26 } // namespace net |
| 28 | 27 |
| 29 // Downloads user profile information. The profile picture is decoded in a | 28 // Downloads user profile information. The profile picture is decoded in a |
| 30 // sandboxed process. | 29 // sandboxed process. |
| 31 class ProfileDownloader : public net::URLFetcherDelegate, | 30 class ProfileDownloader : public net::URLFetcherDelegate, |
| 32 public ImageDecoder::ImageRequest, | 31 public ImageDecoder::ImageRequest, |
| 33 public OAuth2TokenService::Observer, | 32 public OAuth2TokenService::Observer, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 AccountInfo account_info_; | 130 AccountInfo account_info_; |
| 132 SkBitmap profile_picture_; | 131 SkBitmap profile_picture_; |
| 133 PictureStatus picture_status_; | 132 PictureStatus picture_status_; |
| 134 AccountTrackerService* account_tracker_service_; | 133 AccountTrackerService* account_tracker_service_; |
| 135 bool waiting_for_account_info_; | 134 bool waiting_for_account_info_; |
| 136 | 135 |
| 137 DISALLOW_COPY_AND_ASSIGN(ProfileDownloader); | 136 DISALLOW_COPY_AND_ASSIGN(ProfileDownloader); |
| 138 }; | 137 }; |
| 139 | 138 |
| 140 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ | 139 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_H_ |
| OLD | NEW |