| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 explicit ProfileImageDownloader(Delegate* delegate); | 38 explicit ProfileImageDownloader(Delegate* delegate); |
| 39 virtual ~ProfileImageDownloader(); | 39 virtual ~ProfileImageDownloader(); |
| 40 | 40 |
| 41 // Starts downloading the picture if the necessary authorization token is | 41 // Starts downloading the picture if the necessary authorization token is |
| 42 // ready. If not, subscribes to token service and starts fetching if the | 42 // ready. If not, subscribes to token service and starts fetching if the |
| 43 // token is available. | 43 // token is available. |
| 44 void Start(); | 44 void Start(); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // Overriden from URLFetcher::Delegate: | 47 // Overriden from URLFetcher::Delegate: |
| 48 virtual void OnURLFetchComplete(const URLFetcher* source, | 48 virtual void OnURLFetchComplete(const URLFetcher* source) OVERRIDE; |
| 49 const GURL& url, | |
| 50 const net::URLRequestStatus& status, | |
| 51 int response_code, | |
| 52 const net::ResponseCookies& cookies, | |
| 53 const std::string& data) OVERRIDE; | |
| 54 | 49 |
| 55 // Overriden from ImageDecoder::Delegate: | 50 // Overriden from ImageDecoder::Delegate: |
| 56 virtual void OnImageDecoded(const ImageDecoder* decoder, | 51 virtual void OnImageDecoded(const ImageDecoder* decoder, |
| 57 const SkBitmap& decoded_image) OVERRIDE; | 52 const SkBitmap& decoded_image) OVERRIDE; |
| 58 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE; | 53 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE; |
| 59 | 54 |
| 60 // Overriden from content::NotificationObserver: | 55 // Overriden from content::NotificationObserver: |
| 61 virtual void Observe(int type, | 56 virtual void Observe(int type, |
| 62 const content::NotificationSource& source, | 57 const content::NotificationSource& source, |
| 63 const content::NotificationDetails& details) OVERRIDE; | 58 const content::NotificationDetails& details) OVERRIDE; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 scoped_ptr<URLFetcher> user_entry_fetcher_; | 69 scoped_ptr<URLFetcher> user_entry_fetcher_; |
| 75 scoped_ptr<URLFetcher> profile_image_fetcher_; | 70 scoped_ptr<URLFetcher> profile_image_fetcher_; |
| 76 content::NotificationRegistrar registrar_; | 71 content::NotificationRegistrar registrar_; |
| 77 | 72 |
| 78 DISALLOW_COPY_AND_ASSIGN(ProfileImageDownloader); | 73 DISALLOW_COPY_AND_ASSIGN(ProfileImageDownloader); |
| 79 }; | 74 }; |
| 80 | 75 |
| 81 } // namespace chromeos | 76 } // namespace chromeos |
| 82 | 77 |
| 83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_IMAGE_DOWNLOADER_H_ |
| 84 | |
| OLD | NEW |