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

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

Issue 8497006: Merge 107584 - [cros] Don't succeed if user has default profile picture. Merge 108860 - [cros] Fi... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: '' Created 9 years, 1 month 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
===================================================================
--- 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();
« 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