Chromium Code Reviews| Index: chrome/browser/profiles/profile_shortcut_manager_win.h |
| diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.h b/chrome/browser/profiles/profile_shortcut_manager_win.h |
| index 631a71303e6cbef73a4e7c411211ee0010c073ab..96ff15e80cf8e7fa0e49691e3748478e2355d117 100644 |
| --- a/chrome/browser/profiles/profile_shortcut_manager_win.h |
| +++ b/chrome/browser/profiles/profile_shortcut_manager_win.h |
| @@ -6,6 +6,8 @@ |
| #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
| #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| class BrowserDistribution; |
| @@ -13,8 +15,8 @@ class BrowserDistribution; |
| namespace profiles { |
| namespace internal { |
| -// Name of the badged icon file generated for a given profile. |
| -extern const char kProfileIconFileName[]; |
| +// Returns the full path to the profile icon file. |
| +base::FilePath GetProfileIconPath(const base::FilePath& profile_path); |
| // Returns the default shortcut filename for the given profile name, |
| // given |distribution|. Returns a filename appropriate for a |
| @@ -29,12 +31,16 @@ string16 CreateProfileShortcutFlags(const base::FilePath& profile_path); |
| } // namespace profiles |
| class ProfileShortcutManagerWin : public ProfileShortcutManager, |
| - public ProfileInfoCacheObserver { |
| + public ProfileInfoCacheObserver, |
| + public content::NotificationObserver { |
| public: |
| - // Specifies whether a new shortcut should be created if none exist. |
| + // Specifies whether only the existing shortcuts should be updated, a new |
|
gab
2013/06/18 15:36:58
s/shortcuts/shortcut here right?
calamity
2013/06/27 08:10:11
Done.
|
| + // shortcut should be created if none exist, or only the icon for this profile |
| + // should be created in the profile directory. |
| enum CreateOrUpdateMode { |
| UPDATE_EXISTING_ONLY, |
| CREATE_WHEN_NONE_FOUND, |
| + CREATE_OR_UPDATE_ICON_ONLY, |
| }; |
| // Specifies whether non-profile shortcuts should be updated. |
| enum NonProfileShortcutAction { |
| @@ -46,6 +52,9 @@ class ProfileShortcutManagerWin : public ProfileShortcutManager, |
| virtual ~ProfileShortcutManagerWin(); |
| // ProfileShortcutManager implementation: |
| + virtual void CreateOrUpdateProfileIcon( |
| + const base::FilePath& profile_path, |
| + const base::Closure& callback) OVERRIDE; |
|
gab
2013/06/18 15:36:58
#include "base/callback.h"
calamity
2013/06/27 08:10:11
Done.
|
| virtual void CreateProfileShortcut( |
| const base::FilePath& profile_path) OVERRIDE; |
| virtual void RemoveProfileShortcuts( |
| @@ -65,6 +74,11 @@ class ProfileShortcutManagerWin : public ProfileShortcutManager, |
| virtual void OnProfileAvatarChanged( |
| const base::FilePath& profile_path) OVERRIDE; |
| + // content::NotificationObserver: |
|
Alexei Svitkine (slow)
2013/06/18 15:27:19
Nit: to be consistent with comments above, change
calamity
2013/06/27 08:10:11
Done.
|
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| private: |
| // Gives the profile path of an alternate profile than |profile_path|. |
| // Must only be called when the number profiles is 2. |
| @@ -73,10 +87,13 @@ class ProfileShortcutManagerWin : public ProfileShortcutManager, |
| void CreateOrUpdateShortcutsForProfileAtPath( |
|
gab
2013/06/18 15:36:58
Add a method comment here.
calamity
2013/06/27 08:10:11
Done.
|
| const base::FilePath& profile_path, |
| CreateOrUpdateMode create_mode, |
| - NonProfileShortcutAction action); |
| + NonProfileShortcutAction action, |
| + const base::Closure& callback); |
| ProfileManager* profile_manager_; |
| + content::NotificationRegistrar registrar_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); |
| }; |