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

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

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework, roll back refactor, handle creation of unbadged icons Created 7 years, 7 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 #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;
11 11
12 // Internal free-standing functions that are exported here for testing. 12 // Internal free-standing functions that are exported here for testing.
13 namespace profiles { 13 namespace profiles {
14 namespace internal { 14 namespace internal {
15 15
16 // Name of the badged icon file generated for a given profile. 16 // Name of the badged icon file generated for a given profile.
17 extern const char kProfileIconFileName[]; 17 extern const char kProfileIconFileName[];
18 18
19 // Returns the full path to the profile icon file.
20 base::FilePath GetProfileIconPath(const base::FilePath& profile_path);
21
19 // Returns the default shortcut filename for the given profile name, 22 // Returns the default shortcut filename for the given profile name,
20 // given |distribution|. Returns a filename appropriate for a 23 // given |distribution|. Returns a filename appropriate for a
21 // single-user installation if |profile_name| is empty. 24 // single-user installation if |profile_name| is empty.
22 string16 GetShortcutFilenameForProfile(const string16& profile_name, 25 string16 GetShortcutFilenameForProfile(const string16& profile_name,
23 BrowserDistribution* distribution); 26 BrowserDistribution* distribution);
24 27
25 // Returns the command-line flags to launch Chrome with the given profile. 28 // Returns the command-line flags to launch Chrome with the given profile.
26 string16 CreateProfileShortcutFlags(const base::FilePath& profile_path); 29 string16 CreateProfileShortcutFlags(const base::FilePath& profile_path);
27 30
28 } // namespace internal 31 } // namespace internal
29 } // namespace profiles 32 } // namespace profiles
30 33
31 class ProfileShortcutManagerWin : public ProfileShortcutManager, 34 class ProfileShortcutManagerWin : public ProfileShortcutManager,
32 public ProfileInfoCacheObserver { 35 public ProfileInfoCacheObserver {
33 public: 36 public:
34 // Specifies whether a new shortcut should be created if none exist. 37 // Specifies whether a new shortcut should be created if none exist.
Alexei Svitkine (slow) 2013/05/01 15:27:30 Update the comment.
calamity 2013/05/03 04:40:28 Done.
35 enum CreateOrUpdateMode { 38 enum CreateOrUpdateMode {
36 UPDATE_EXISTING_ONLY, 39 UPDATE_EXISTING_ONLY,
37 CREATE_WHEN_NONE_FOUND, 40 CREATE_WHEN_NONE_FOUND,
41 CREATE_ICON_ONLY,
38 }; 42 };
39 // Specifies whether non-profile shortcuts should be updated. 43 // Specifies whether non-profile shortcuts should be updated.
40 enum NonProfileShortcutAction { 44 enum NonProfileShortcutAction {
41 IGNORE_NON_PROFILE_SHORTCUTS, 45 IGNORE_NON_PROFILE_SHORTCUTS,
42 UPDATE_NON_PROFILE_SHORTCUTS, 46 UPDATE_NON_PROFILE_SHORTCUTS,
43 }; 47 };
44 48
45 explicit ProfileShortcutManagerWin(ProfileManager* manager); 49 explicit ProfileShortcutManagerWin(ProfileManager* manager);
46 virtual ~ProfileShortcutManagerWin(); 50 virtual ~ProfileShortcutManagerWin();
47 51
(...skipping 26 matching lines...) Expand all
74 const base::FilePath& profile_path, 78 const base::FilePath& profile_path,
75 CreateOrUpdateMode create_mode, 79 CreateOrUpdateMode create_mode,
76 NonProfileShortcutAction action); 80 NonProfileShortcutAction action);
77 81
78 ProfileManager* profile_manager_; 82 ProfileManager* profile_manager_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); 84 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin);
81 }; 85 };
82 86
83 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ 87 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698