Index: chrome/browser/profiles/profile_downloader.h |
diff --git a/chrome/browser/profiles/profile_downloader.h b/chrome/browser/profiles/profile_downloader.h |
index 2d30e7d6420a710b3bd0d53a6a44fac14a3d646f..4e15a47fa5d7ad215477463bb74f116a6c16c575 100644 |
--- a/chrome/browser/profiles/profile_downloader.h |
+++ b/chrome/browser/profiles/profile_downloader.h |
@@ -29,6 +29,13 @@ class ProfileDownloader : public content::URLFetcherDelegate, |
public content::NotificationObserver, |
public OAuth2AccessTokenConsumer { |
public: |
+ enum PictureStatus { |
+ PICTURE_SUCCESS, |
+ PICTURE_FAILED, |
+ PICTURE_DEFAULT, |
+ PICTURE_CACHED, |
+ }; |
+ |
explicit ProfileDownloader(ProfileDownloaderDelegate* delegate); |
virtual ~ProfileDownloader(); |
@@ -46,6 +53,14 @@ class ProfileDownloader : public content::URLFetcherDelegate, |
// profile picture) this will return an Null bitmap. |
virtual SkBitmap GetProfilePicture() const; |
+ // Gets the profile picture status. |
+ virtual PictureStatus GetProfilePictureStatus() const; |
+ |
+ // Gets the URL for the profile picture. This can be cached so that the same |
+ // picture is not downloaded multiple times. This value should only be used |
+ // when the picture status is PICTURE_SUCCESS. |
+ virtual std::string GetProfilePictureURL() const; |
+ |
private: |
// Overriden from content::URLFetcherDelegate: |
virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
@@ -91,6 +106,8 @@ class ProfileDownloader : public content::URLFetcherDelegate, |
content::NotificationRegistrar registrar_; |
string16 profile_full_name_; |
SkBitmap profile_picture_; |
+ PictureStatus picture_status_; |
+ std::string picture_url_; |
DISALLOW_COPY_AND_ASSIGN(ProfileDownloader); |
}; |