Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: chrome/browser/chromeos/login/profile_image_downloader.h

Issue 8399005: [cros] Don't succeed if user has default profile picturewq (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed stats for change picture options Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/profile_image_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/profile_image_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698