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

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

Issue 23095006: If user profile doesn't contain language setting, default to his Google account settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 7 years, 3 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 | « chrome/browser/chromeos/login/mock_user_manager.h ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 055141d263a08eb36546b5f794b7b461c7ece168..22166f4aab989095ccf026f7024cb44617668f4f 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -180,7 +180,17 @@ class User {
explicit User(const std::string& email);
virtual ~User();
+ bool is_profile_created() const {
+ return profile_is_created_;
+ }
+
+ const std::string* GetAccountLocale() const {
+ return account_locale_.get();
+ }
+
// Setters are private so only UserManager can call them.
+ void SetAccountLocale(const std::string& raw_account_locale);
+
void SetImage(const UserImage& user_image, int image_index);
void SetImageURL(const GURL& image_url);
@@ -216,6 +226,13 @@ class User {
is_active_ = is_active;
}
+ void set_profile_is_created() {
+ profile_is_created_ = true;
+ }
+
+ // True if user has google account (not a guest or managed user).
+ bool has_gaia_account() const;
+
private:
std::string email_;
string16 display_name_;
@@ -224,6 +241,12 @@ class User {
UserImage user_image_;
OAuthTokenStatus oauth_token_status_;
+ // This is set to chromeos locale if account data has been downloaded.
+ // (Or failed to download, but at least one download attempt finished).
+ // An empty string indicates error in data load, or in
+ // translation of Account locale to chromeos locale.
+ scoped_ptr<std::string> account_locale_;
+
// Used to identify homedir mount point.
std::string username_hash_;
@@ -243,6 +266,9 @@ class User {
// True if user is currently logged in and active in current session.
bool is_active_;
+ // True if user Profile is created
+ bool profile_is_created_;
+
DISALLOW_COPY_AND_ASSIGN(User);
};
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.h ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698