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

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

Issue 196473015: [Profiles] Don't treat GAIA names differently than regular profile names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove useless comment Created 6 years, 9 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/profiles/gaia_info_update_service.cc
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc
index 9733fe47ffe751340bf81cbb3a38b5d1d5163381..9585110d5637372a89b3ccf6ab795facf100178b 100644
--- a/chrome/browser/profiles/gaia_info_update_service.cc
+++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -131,20 +131,12 @@ void GAIAInfoUpdateService::OnProfileDownloadSuccess(
cache.SetGAIAPictureOfProfileAtIndex(profile_index, NULL);
}
- // If this profile hasn't switched to using GAIA information for the profile
- // name and picture then switch it now. Once the profile has switched this
- // preference guards against clobbering the user's custom settings.
- if (!cache.GetHasMigratedToGAIAInfoOfProfileAtIndex(profile_index)) {
- cache.SetHasMigratedToGAIAInfoOfProfileAtIndex(profile_index, true);
- // Order matters here for shortcut management, like in
- // ProfileShortcutManagerWin::OnProfileAdded, as the picture update does not
- // allow us to change the target, so we have to apply any renaming first. We
- // also need to re-fetch the index, as SetIsUsingGAIANameOfProfileAtIndex
- // may alter it.
- cache.SetIsUsingGAIANameOfProfileAtIndex(profile_index, true);
- profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
- cache.SetIsUsingGAIAPictureOfProfileAtIndex(profile_index, true);
- }
+ // Order matters here for shortcut management, like in
+ // ProfileShortcutManagerWin::OnProfileAdded, as the picture update does not
+ // allow us to change the target, so we have to apply any renaming first. We
+ // also need to re-fetch the index, as changing the profile name may alter it.
+ profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
+ cache.SetIsUsingGAIAPictureOfProfileAtIndex(profile_index, true);
}
void GAIAInfoUpdateService::OnProfileDownloadFailure(
« no previous file with comments | « no previous file | chrome/browser/profiles/gaia_info_update_service_unittest.cc » ('j') | chrome/browser/profiles/profiles_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698