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

Unified Diff: chrome/browser/profiles/profile_downloader.cc

Issue 8801023: Fix detection of default G+ profile picture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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/profiles/profile_downloader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_downloader.cc
diff --git a/chrome/browser/profiles/profile_downloader.cc b/chrome/browser/profiles/profile_downloader.cc
index 56483ba5b052202d2245856edf4133d656c7b422..8e0522b6d034c9641dcd13f99837bc46055a5a70 100644
--- a/chrome/browser/profiles/profile_downloader.cc
+++ b/chrome/browser/profiles/profile_downloader.cc
@@ -64,12 +64,6 @@ const char kPicasaPhotoId[] = "AAAAAAAAAAA";
// Photo version of the default PWA profile picture (base64 of 1).
const char kDefaultPicasaPhotoVersion[] = "AAAAAAAAAAE";
-// Photo ID of the Google+ profile picture (base64 of 2).
-const char kGooglePlusPhotoId[] = "AAAAAAAAAAI";
-
-// Photo version of the default Google+ profile picture (base64 of 0).
-const char kDefaultGooglePlusPhotoVersion[] = "AAAAAAAAAAA";
-
// The minimum number of path components in profile picture URL.
const size_t kProfileImageURLPathComponentsCount = 6;
@@ -192,12 +186,9 @@ bool ProfileDownloader::IsDefaultProfileImageURL(const std::string& url) {
const std::string& photo_version =
path_components[kPhotoVersionPathComponentIndex];
- // There are at least two pairs of (ID, version) for the default photo:
- // the default Google+ profile photo and the default Picasa profile photo.
- return ((photo_id == kPicasaPhotoId &&
- photo_version == kDefaultPicasaPhotoVersion) ||
- (photo_id == kGooglePlusPhotoId &&
- photo_version == kDefaultGooglePlusPhotoVersion));
+ // Check that the ID and version match the default Picasa profile photo.
+ return photo_id == kPicasaPhotoId &&
+ photo_version == kDefaultPicasaPhotoVersion;
}
ProfileDownloader::ProfileDownloader(ProfileDownloaderDelegate* delegate)
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_downloader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698