| Index: chrome/browser/profiles/profile_downloader.h
|
| diff --git a/chrome/browser/profiles/profile_downloader.h b/chrome/browser/profiles/profile_downloader.h
|
| index 952fd2e39b3bf7b733aa266192686f4ae8c6d3c6..326331c650431d6fe8eab9761f8bafc4efc44fb9 100644
|
| --- a/chrome/browser/profiles/profile_downloader.h
|
| +++ b/chrome/browser/profiles/profile_downloader.h
|
| @@ -54,6 +54,9 @@ class ProfileDownloader : public net::URLFetcherDelegate,
|
| // if the name is "Pat Smith", the given name is "Pat".
|
| virtual string16 GetProfileGivenName() const;
|
|
|
| + // On successful download this returns G+ locale preference of the user.
|
| + virtual std::string GetProfileLocale() const;
|
| +
|
| // On successful download this returns the profile picture of the user.
|
| // For users with no profile picture set (that is, they have the default
|
| // profile picture) this will return an Null bitmap.
|
| @@ -90,15 +93,15 @@ class ProfileDownloader : public net::URLFetcherDelegate,
|
| virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
|
| const GoogleServiceAuthError& error) OVERRIDE;
|
|
|
| - // Parses the entry response and gets the full name, the given name,
|
| - // and profile image URL. |data| should be the JSON formatted data returned
|
| - // by the response. Returns false to indicate a parsing error.
|
| - static bool GetProfileNameAndImageURL(const std::string& data,
|
| - string16* full_name,
|
| - string16* given_name,
|
| - std::string* url,
|
| - int image_size);
|
| -
|
| + // Parses the entry response and gets the name, profile image URL and locale.
|
| + // |data| should be the JSON formatted data return by the response.
|
| + // Returns false to indicate a parsing error.
|
| + static bool ParseProfileJSON(const std::string& data,
|
| + string16* full_name,
|
| + string16* given_name,
|
| + std::string* url,
|
| + int image_size,
|
| + std::string* profile_locale);
|
| // Returns true if the image url is url of the default profile picture.
|
| static bool IsDefaultProfileImageURL(const std::string& url);
|
|
|
| @@ -119,6 +122,7 @@ class ProfileDownloader : public net::URLFetcherDelegate,
|
| scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_;
|
| string16 profile_full_name_;
|
| string16 profile_given_name_;
|
| + std::string profile_locale_;
|
| SkBitmap profile_picture_;
|
| PictureStatus picture_status_;
|
| std::string picture_url_;
|
|
|