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

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

Issue 11299160: Find shortcuts that don't have a profile command line set when creating 2nd profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
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);
+
} // 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,12 +60,15 @@
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);
+ void CreateOrUpdateShortcutsForProfileAtPath(const FilePath& profile_path,
+ CreateOrUpdateMode create_mode,
+ NonProfileShortcutAction action);
+
ProfileManager* profile_manager_;
DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin);

Powered by Google App Engine
This is Rietveld 408576698