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

Side by Side Diff: chrome/installer/util/shell_util.h

Issue 8785006: Badge Windows profile shortcuts with multi-user avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Applied some grt memory suggestions. Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file declares methods that are useful for integrating Chrome in 5 // This file declares methods that are useful for integrating Chrome in
6 // Windows shell. These methods are all static and currently part of 6 // Windows shell. These methods are all static and currently part of
7 // ShellUtil class. 7 // ShellUtil class.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static bool AdminNeededForRegistryCleanup(BrowserDistribution* dist, 91 static bool AdminNeededForRegistryCleanup(BrowserDistribution* dist,
92 const std::wstring& suffix); 92 const std::wstring& suffix);
93 93
94 // Creates Chrome shortcut on the Desktop. 94 // Creates Chrome shortcut on the Desktop.
95 // |dist| gives the type of browser distribution currently in use. 95 // |dist| gives the type of browser distribution currently in use.
96 // |chrome_exe| provides the target path information. 96 // |chrome_exe| provides the target path information.
97 // |description| provides the shortcut's "comment" property. 97 // |description| provides the shortcut's "comment" property.
98 // |appended_name| provides a string to be appended to the distribution name, 98 // |appended_name| provides a string to be appended to the distribution name,
99 // and can be the empty string. 99 // and can be the empty string.
100 // |arguments| gives a set of arguments to be passed to the executable. 100 // |arguments| gives a set of arguments to be passed to the executable.
101 // |icon_path| provides the path to the icon file to use.
102 // |icon_index| provides the index of the icon within the provided icon file.
101 // If |shell_change| is CURRENT_USER, the shortcut is created in the 103 // If |shell_change| is CURRENT_USER, the shortcut is created in the
102 // Desktop folder of current user's profile. 104 // Desktop folder of current user's profile.
103 // If |shell_change| is SYSTEM_LEVEL, the shortcut is created in the 105 // If |shell_change| is SYSTEM_LEVEL, the shortcut is created in the
104 // Desktop folder of the "All Users" profile. 106 // Desktop folder of the "All Users" profile.
105 // If |alternate| is true, an alternate text for the shortcut is used. 107 // If |alternate| is true, an alternate text for the shortcut is used.
106 // If |create_new| is false, an existing shortcut will be updated, but if 108 // If |create_new| is false, an existing shortcut will be updated, but if
107 // no shortcut exists, it will not be created. 109 // no shortcut exists, it will not be created.
108 // Returns true iff the method causes a shortcut to be created / updated. 110 // Returns true iff the method causes a shortcut to be created / updated.
109 static bool CreateChromeDesktopShortcut(BrowserDistribution* dist, 111 static bool CreateChromeDesktopShortcut(BrowserDistribution* dist,
110 const std::wstring& chrome_exe, 112 const std::wstring& chrome_exe,
111 const std::wstring& description, 113 const std::wstring& description,
112 const std::wstring& appended_name, 114 const std::wstring& appended_name,
113 const std::wstring& arguments, 115 const std::wstring& arguments,
116 const std::wstring& icon_path,
117 int icon_index,
114 ShellChange shell_change, 118 ShellChange shell_change,
115 bool alternate, 119 bool alternate,
116 bool create_new); 120 bool create_new);
117 121
118 // Create Chrome shortcut on Quick Launch Bar. 122 // Create Chrome shortcut on Quick Launch Bar.
119 // If shell_change is CURRENT_USER, the shortcut is created in the 123 // If shell_change is CURRENT_USER, the shortcut is created in the
120 // Quick Launch folder of current user's profile. 124 // Quick Launch folder of current user's profile.
121 // If shell_change is SYSTEM_LEVEL, the shortcut is created in the 125 // If shell_change is SYSTEM_LEVEL, the shortcut is created in the
122 // Quick Launch folder of "Default User" profile. This will make sure 126 // Quick Launch folder of "Default User" profile. This will make sure
123 // that this shortcut will be seen by all the new users logging into the 127 // that this shortcut will be seen by all the new users logging into the
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Remove Chrome shortcut from Quick Launch Bar. 281 // Remove Chrome shortcut from Quick Launch Bar.
278 // If shell_change is CURRENT_USER, the shortcut is removed from 282 // If shell_change is CURRENT_USER, the shortcut is removed from
279 // the Quick Launch folder of current user's profile. 283 // the Quick Launch folder of current user's profile.
280 // If shell_change is SYSTEM_LEVEL, the shortcut is removed from 284 // If shell_change is SYSTEM_LEVEL, the shortcut is removed from
281 // the Quick Launch folder of "Default User" profile. 285 // the Quick Launch folder of "Default User" profile.
282 static bool RemoveChromeQuickLaunchShortcut(BrowserDistribution* dist, 286 static bool RemoveChromeQuickLaunchShortcut(BrowserDistribution* dist,
283 int shell_change); 287 int shell_change);
284 288
285 // Updates shortcut (or creates a new shortcut) at destination given by 289 // Updates shortcut (or creates a new shortcut) at destination given by
286 // shortcut to a target given by chrome_exe. The arguments are given by 290 // shortcut to a target given by chrome_exe. The arguments are given by
287 // |arguments| for the target and icon is set as icon at index 0 from exe. 291 // |arguments| for the target and icon is set based on |icon_path| and
288 // If create_new is set to true, the function will create a new shortcut if 292 // |icon_index|. If create_new is set to true, the function will create a new
289 // if doesn't exist. 293 // shortcut if it doesn't exist.
290 static bool UpdateChromeShortcut(BrowserDistribution* dist, 294 static bool UpdateChromeShortcut(BrowserDistribution* dist,
291 const std::wstring& chrome_exe, 295 const std::wstring& chrome_exe,
292 const std::wstring& shortcut, 296 const std::wstring& shortcut,
293 const std::wstring& arguments, 297 const std::wstring& arguments,
294 const std::wstring& description, 298 const std::wstring& description,
299 const std::wstring& icon_path,
300 int icon_index,
295 bool create_new); 301 bool create_new);
296 302
297 private: 303 private:
298 DISALLOW_COPY_AND_ASSIGN(ShellUtil); 304 DISALLOW_COPY_AND_ASSIGN(ShellUtil);
299 }; 305 };
300 306
301 307
302 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 308 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698