OLD | NEW |
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
7 | 7 |
8 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 8 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
9 | 9 |
10 class BrowserDistribution; | 10 class BrowserDistribution; |
(...skipping 29 matching lines...) Expand all Loading... |
40 enum NonProfileShortcutAction { | 40 enum NonProfileShortcutAction { |
41 IGNORE_NON_PROFILE_SHORTCUTS, | 41 IGNORE_NON_PROFILE_SHORTCUTS, |
42 UPDATE_NON_PROFILE_SHORTCUTS, | 42 UPDATE_NON_PROFILE_SHORTCUTS, |
43 }; | 43 }; |
44 | 44 |
45 explicit ProfileShortcutManagerWin(ProfileManager* manager); | 45 explicit ProfileShortcutManagerWin(ProfileManager* manager); |
46 virtual ~ProfileShortcutManagerWin(); | 46 virtual ~ProfileShortcutManagerWin(); |
47 | 47 |
48 // ProfileShortcutManager implementation: | 48 // ProfileShortcutManager implementation: |
49 virtual void CreateProfileShortcut(const FilePath& profile_path) OVERRIDE; | 49 virtual void CreateProfileShortcut(const FilePath& profile_path) OVERRIDE; |
| 50 virtual void RemoveProfileShortcuts(const FilePath& profile_path) OVERRIDE; |
| 51 virtual void HasProfileShortcuts( |
| 52 const FilePath& profile_path, |
| 53 const base::Callback<void(bool)>& callback) OVERRIDE; |
50 | 54 |
51 // ProfileInfoCacheObserver implementation: | 55 // ProfileInfoCacheObserver implementation: |
52 virtual void OnProfileAdded(const FilePath& profile_path) OVERRIDE; | 56 virtual void OnProfileAdded(const FilePath& profile_path) OVERRIDE; |
53 virtual void OnProfileWillBeRemoved(const FilePath& profile_path) OVERRIDE; | 57 virtual void OnProfileWillBeRemoved(const FilePath& profile_path) OVERRIDE; |
54 virtual void OnProfileWasRemoved(const FilePath& profile_path, | 58 virtual void OnProfileWasRemoved(const FilePath& profile_path, |
55 const string16& profile_name) OVERRIDE; | 59 const string16& profile_name) OVERRIDE; |
56 virtual void OnProfileNameChanged(const FilePath& profile_path, | 60 virtual void OnProfileNameChanged(const FilePath& profile_path, |
57 const string16& old_profile_name) OVERRIDE; | 61 const string16& old_profile_name) OVERRIDE; |
58 virtual void OnProfileAvatarChanged(const FilePath& profile_path) OVERRIDE; | 62 virtual void OnProfileAvatarChanged(const FilePath& profile_path) OVERRIDE; |
59 | 63 |
60 private: | 64 private: |
61 void StartProfileShortcutNameChange(const FilePath& profile_path, | 65 void StartProfileShortcutNameChange(const FilePath& profile_path, |
62 const string16& old_profile_name); | 66 const string16& old_profile_name); |
63 | 67 |
64 // Gives the profile path of an alternate profile than |profile_path|. | 68 // Gives the profile path of an alternate profile than |profile_path|. |
65 // Must only be called when the number profiles is 2. | 69 // Must only be called when the number profiles is 2. |
66 FilePath GetOtherProfilePath(const FilePath& profile_path); | 70 FilePath GetOtherProfilePath(const FilePath& profile_path); |
67 | 71 |
68 void CreateOrUpdateShortcutsForProfileAtPath(const FilePath& profile_path, | 72 void CreateOrUpdateShortcutsForProfileAtPath(const FilePath& profile_path, |
69 CreateOrUpdateMode create_mode, | 73 CreateOrUpdateMode create_mode, |
70 NonProfileShortcutAction action); | 74 NonProfileShortcutAction action); |
71 | 75 |
72 ProfileManager* profile_manager_; | 76 ProfileManager* profile_manager_; |
73 | 77 |
74 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); | 78 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); |
75 }; | 79 }; |
76 | 80 |
77 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ | 81 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
OLD | NEW |