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

Side by Side Diff: chrome/browser/profiles/profile_shortcut_manager_win.cc

Issue 16035013: ProfileInfoCacheObserver: All methods now have a default empty implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" 5 #include "chrome/browser/profiles/profile_shortcut_manager_win.h"
6 6
7 #include <shlobj.h> // For SHChangeNotify(). 7 #include <shlobj.h> // For SHChangeNotify().
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 const base::FilePath& profile_path) { 604 const base::FilePath& profile_path) {
605 if (profile_manager_->GetProfileInfoCache().GetNumberOfProfiles() == 2) { 605 if (profile_manager_->GetProfileInfoCache().GetNumberOfProfiles() == 2) {
606 // When the second profile is added, make existing non-profile shortcuts 606 // When the second profile is added, make existing non-profile shortcuts
607 // point to the first profile and be badged/named appropriately. 607 // point to the first profile and be badged/named appropriately.
608 CreateOrUpdateShortcutsForProfileAtPath(GetOtherProfilePath(profile_path), 608 CreateOrUpdateShortcutsForProfileAtPath(GetOtherProfilePath(profile_path),
609 UPDATE_EXISTING_ONLY, 609 UPDATE_EXISTING_ONLY,
610 UPDATE_NON_PROFILE_SHORTCUTS); 610 UPDATE_NON_PROFILE_SHORTCUTS);
611 } 611 }
612 } 612 }
613 613
614 void ProfileShortcutManagerWin::OnProfileWillBeRemoved(
615 const base::FilePath& profile_path) {
616 }
617
618 void ProfileShortcutManagerWin::OnProfileWasRemoved( 614 void ProfileShortcutManagerWin::OnProfileWasRemoved(
619 const base::FilePath& profile_path, 615 const base::FilePath& profile_path,
620 const string16& profile_name) { 616 const string16& profile_name) {
621 const ProfileInfoCache& cache = profile_manager_->GetProfileInfoCache(); 617 const ProfileInfoCache& cache = profile_manager_->GetProfileInfoCache();
622 // If there is only one profile remaining, remove the badging information 618 // If there is only one profile remaining, remove the badging information
623 // from an existing shortcut. 619 // from an existing shortcut.
624 const bool deleting_down_to_last_profile = (cache.GetNumberOfProfiles() == 1); 620 const bool deleting_down_to_last_profile = (cache.GetNumberOfProfiles() == 1);
625 if (deleting_down_to_last_profile) { 621 if (deleting_down_to_last_profile) {
626 CreateOrUpdateShortcutsForProfileAtPath(cache.GetPathOfProfileAtIndex(0), 622 CreateOrUpdateShortcutsForProfileAtPath(cache.GetPathOfProfileAtIndex(0),
627 UPDATE_EXISTING_ONLY, 623 UPDATE_EXISTING_ONLY,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 BrowserThread::PostTask( 696 BrowserThread::PostTask(
701 BrowserThread::FILE, FROM_HERE, 697 BrowserThread::FILE, FROM_HERE,
702 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path, 698 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path,
703 old_shortcut_appended_name, new_shortcut_appended_name, 699 old_shortcut_appended_name, new_shortcut_appended_name,
704 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode, 700 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode,
705 action)); 701 action));
706 702
707 cache->SetShortcutNameOfProfileAtIndex(profile_index, 703 cache->SetShortcutNameOfProfileAtIndex(profile_index,
708 new_shortcut_appended_name); 704 new_shortcut_appended_name);
709 } 705 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_win.h ('k') | chrome/browser/ui/app_list/app_list_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698