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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.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: Added comment on "list of preferred languages". 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
Index: chrome/browser/chromeos/login/user_manager_impl.h
diff --git a/chrome/browser/chromeos/login/user_manager_impl.h b/chrome/browser/chromeos/login/user_manager_impl.h
index 577e1d6987925732ba88907653752498d4c2e804..647ff13b360d4cd0934aed50819c308aa9fa1437 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.h
+++ b/chrome/browser/chromeos/login/user_manager_impl.h
@@ -78,6 +78,9 @@ class UserManagerImpl
User::OAuthTokenStatus oauth_token_status) OVERRIDE;
virtual void SaveUserDisplayName(const std::string& username,
const string16& display_name) OVERRIDE;
+ virtual void UpdateUserAccountData(const std::string& username,
+ const string16& display_name,
+ const std::string& locale) OVERRIDE;
virtual string16 GetUserDisplayName(
const std::string& username) const OVERRIDE;
virtual void SaveUserDisplayEmail(const std::string& username,
@@ -151,6 +154,9 @@ class UserManagerImpl
virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE;
virtual void OnDeviceLocalAccountsChanged() OVERRIDE;
+ // Wait untill we have sufficient information on user locale and apply it.
+ void RespectLocalePreference(Profile* profile, const User* user) const;
+
private:
friend class UserManager;
friend class WallpaperManager;
@@ -305,6 +311,14 @@ class UserManagerImpl
// Sends metrics in response to a regular user logging in.
void SendRegularUserLoginMetrics(const std::string& email);
+ // UpdateUserAccountData() + SaveUserDisplayName() .
+ void UpdateUserAccountDataImpl(const std::string& username,
+ const string16& display_name,
+ const std::string* locale);
+
+ // Returns NULL if User is not created.
+ User* GetUserByProfile(Profile* profile);
+
// Interface to the signed settings store.
CrosSettings* cros_settings_;

Powered by Google App Engine
This is Rietveld 408576698