OLD | NEW |
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 // 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // suffix in their progId entries (as per the old suffix rules). If they were | 223 // suffix in their progId entries (as per the old suffix rules). If they were |
224 // to both fully register (i.e. click "Make Chrome Default" and go through | 224 // to both fully register (i.e. click "Make Chrome Default" and go through |
225 // UAC; or upgrade to Win8 and get the automatic no UAC full registration) | 225 // UAC; or upgrade to Win8 and get the automatic no UAC full registration) |
226 // they would then both get a suffixed registration as per the new suffix | 226 // they would then both get a suffixed registration as per the new suffix |
227 // rules). | 227 // rules). |
228 // | 228 // |
229 // |chrome_exe| The path to the currently installed (or running) chrome.exe. | 229 // |chrome_exe| The path to the currently installed (or running) chrome.exe. |
230 static string16 GetCurrentInstallationSuffix(BrowserDistribution* dist, | 230 static string16 GetCurrentInstallationSuffix(BrowserDistribution* dist, |
231 const string16& chrome_exe); | 231 const string16& chrome_exe); |
232 | 232 |
| 233 // Returns the application name of the program under |dist|. |
| 234 // This application name will be suffixed as is appropriate for the current |
| 235 // install. |
| 236 // This is the name that is registered with Default Programs on Windows and |
| 237 // that should thus be used to "make chrome default" and such. |
| 238 static string16 GetApplicationName(BrowserDistribution* dist, |
| 239 const string16& chrome_exe); |
| 240 |
233 // Make Chrome the default browser. This function works by going through | 241 // Make Chrome the default browser. This function works by going through |
234 // the url protocols and file associations that are related to general | 242 // the url protocols and file associations that are related to general |
235 // browsing, e.g. http, https, .html etc., and requesting to become the | 243 // browsing, e.g. http, https, .html etc., and requesting to become the |
236 // default handler for each. If any of these fails the operation will return | 244 // default handler for each. If any of these fails the operation will return |
237 // false to indicate failure, which is consistent with the return value of | 245 // false to indicate failure, which is consistent with the return value of |
238 // ShellIntegration::IsDefaultBrowser. | 246 // ShellIntegration::IsDefaultBrowser. |
239 // | 247 // |
240 // In the case of failure any successful changes will be left, however no | 248 // In the case of failure any successful changes will be left, however no |
241 // more changes will be attempted. | 249 // more changes will be attempted. |
242 // TODO(benwells): Attempt to undo any changes that were successfully made. | 250 // TODO(benwells): Attempt to undo any changes that were successfully made. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 const string16& icon_path, | 377 const string16& icon_path, |
370 int icon_index, | 378 int icon_index, |
371 uint32 options); | 379 uint32 options); |
372 | 380 |
373 private: | 381 private: |
374 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 382 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
375 }; | 383 }; |
376 | 384 |
377 | 385 |
378 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 386 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
OLD | NEW |