Index: chrome/browser/chromeos/login/profile_image_downloader.h |
=================================================================== |
--- chrome/browser/chromeos/login/profile_image_downloader.h (revision 108979) |
+++ chrome/browser/chromeos/login/profile_image_downloader.h (working copy) |
@@ -23,6 +23,17 @@ |
public ImageDecoder::Delegate, |
public NotificationObserver { |
public: |
+ // Enum for reporting histograms about profile picture download. |
+ enum DownloadResult { |
+ kDownloadSuccessChanged, |
+ kDownloadSuccess, |
+ kDownloadFailure, |
+ kDownloadDefault, |
+ |
+ // Must be the last, convenient count. |
+ kDownloadResultsCount |
+ }; |
+ |
// Reports on success or failure of Profile image download. |
class Delegate { |
public: |
@@ -33,6 +44,10 @@ |
// Called on download failure. |
virtual void OnDownloadFailure() {} |
+ |
+ // Called when user has the default profile image and we won't download |
+ // it. |
+ virtual void OnDownloadDefaultImage() {} |
}; |
explicit ProfileImageDownloader(Delegate* delegate); |
@@ -61,6 +76,9 @@ |
// Returns an empty string on failure. |
std::string GetProfileImageURL(const std::string& data) const; |
+ // Returns true if the image url is url of the default profile picture. |
+ bool IsDefaultProfileImageURL(const std::string& url) const; |
+ |
// Issues the first request to get user profile image. |
void StartFetchingImage(); |