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

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

Issue 15986006: Don't create an unbadged shortcut when first profile is created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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_shortcut_manager_unittest_win.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_shortcut_manager_win.cc
===================================================================
--- chrome/browser/profiles/profile_shortcut_manager_win.cc (revision 202083)
+++ chrome/browser/profiles/profile_shortcut_manager_win.cc (working copy)
@@ -602,13 +602,9 @@
void ProfileShortcutManagerWin::OnProfileAdded(
const base::FilePath& profile_path) {
- const size_t profile_count =
- profile_manager_->GetProfileInfoCache().GetNumberOfProfiles();
- if (profile_count == 1) {
- CreateOrUpdateShortcutsForProfileAtPath(profile_path,
- CREATE_WHEN_NONE_FOUND,
- UPDATE_NON_PROFILE_SHORTCUTS);
- } else if (profile_count == 2) {
+ if (profile_manager_->GetProfileInfoCache().GetNumberOfProfiles() == 2) {
+ // When the second profile is added, make existing non-profile shortcuts
+ // point to the first profile and be badged/named appropriately.
CreateOrUpdateShortcutsForProfileAtPath(GetOtherProfilePath(profile_path),
UPDATE_EXISTING_ONLY,
UPDATE_NON_PROFILE_SHORTCUTS);
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698