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

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

Issue 8226002: Multi-Profiles: Initialize sync user name when adding profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/profiles/profile_info_cache_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 7c799bbd62f4c237b101e9d712054ccfe77315cf..a05ab60853c30933c176eaf04a34a976c583b396 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -498,14 +498,16 @@ void ProfileManager::AddProfileToCache(Profile* profile) {
if (cache.GetIndexOfProfileWithPath(profile->GetPath()) != std::string::npos)
return;
+ string16 username = UTF8ToUTF16(profile->GetPrefs()->GetString(
+ prefs::kGoogleServicesUsername));
+
if (profile->GetPath() == GetDefaultProfileDir(cache.GetUserDataDir())) {
cache.AddProfileToCache(
profile->GetPath(),
- l10n_util::GetStringUTF16(IDS_DEFAULT_PROFILE_NAME), 0);
+ l10n_util::GetStringUTF16(IDS_DEFAULT_PROFILE_NAME), username, 0);
} else {
cache.AddProfileToCache(
- profile->GetPath(),
- cache.ChooseNameForNewProfile(),
+ profile->GetPath(), cache.ChooseNameForNewProfile(), username,
cache.ChooseAvatarIconIndexForNewProfile());
}
}
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698