Chromium Code Reviews| Index: chrome/browser/profiles/profile_shortcut_manager_win.h |
| =================================================================== |
| --- chrome/browser/profiles/profile_shortcut_manager_win.h (revision 169477) |
| +++ chrome/browser/profiles/profile_shortcut_manager_win.h (working copy) |
| @@ -13,18 +13,35 @@ |
| namespace profiles { |
| namespace internal { |
| +// Name of the badged icon file generated for a given profile. |
| +extern const char kProfileIconFileName[]; |
| + |
| // Returns the default shortcut filename for the given profile name, |
| // given |distribution|. Returns a filename appropriate for a |
| // single-user installation if |profile_name| is empty. |
| string16 GetShortcutFilenameForProfile(const string16& profile_name, |
| BrowserDistribution* distribution); |
| +// Returns the command-line flags to launch Chrome with the given profile. |
| +string16 CreateProfileShortcutFlags(const FilePath& profile_path); |
|
gab
2012/11/28 22:00:58
A test should probably also be added for this newl
Alexei Svitkine (slow)
2012/11/28 22:25:55
Let me do it in a separate CL instead of cramming
gab
2012/11/28 22:31:37
Seems to me the CL exposing the method should also
|
| + |
| } // namespace internal |
| } // namespace profiles |
| class ProfileShortcutManagerWin : public ProfileShortcutManager, |
| public ProfileInfoCacheObserver { |
| public: |
| + // Specifies whether a new shortcut should be created if none exist. |
| + enum CreateOrUpdateMode { |
| + UPDATE_EXISTING_ONLY, |
| + CREATE_WHEN_NONE_FOUND, |
| + }; |
| + // Specifies whether non-profile shortcuts should be updated. |
| + enum NonProfileShortcutAction { |
| + IGNORE_NON_PROFILE_SHORTCUTS, |
| + UPDATE_NON_PROFILE_SHORTCUTS, |
| + }; |
| + |
| explicit ProfileShortcutManagerWin(ProfileManager* manager); |
| virtual ~ProfileShortcutManagerWin(); |
| @@ -43,11 +60,14 @@ |
| private: |
| void StartProfileShortcutNameChange(const FilePath& profile_path, |
| const string16& old_profile_name); |
| + |
| // Gives the profile path of an alternate profile than |profile_path|. |
| // Must only be called when the number profiles is 2. |
| FilePath GetOtherProfilePath(const FilePath& profile_path); |
| + |
| void UpdateShortcutsForProfileAtPath(const FilePath& profile_path, |
| - bool create_always); |
| + CreateOrUpdateMode create_mode, |
| + NonProfileShortcutAction action); |
| ProfileManager* profile_manager_; |