Index: chrome/browser/chromeos/login/profile_image_downloader.h |
diff --git a/chrome/browser/chromeos/login/profile_image_downloader.h b/chrome/browser/chromeos/login/profile_image_downloader.h |
index a1e85e981da5a51739876fafa1ec4b9e0fa33866..2a9f9094dfc944d4cc3a878b13639f1f1a8aa410 100644 |
--- a/chrome/browser/chromeos/login/profile_image_downloader.h |
+++ b/chrome/browser/chromeos/login/profile_image_downloader.h |
@@ -23,6 +23,17 @@ class ProfileImageDownloader : public content::URLFetcherDelegate, |
public ImageDecoder::Delegate, |
public content::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 @@ class ProfileImageDownloader : public content::URLFetcherDelegate, |
// 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 @@ class ProfileImageDownloader : public content::URLFetcherDelegate, |
// 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(); |