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