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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // NOTE: This a quick check that only validates that a single registry entry | 245 // NOTE: This a quick check that only validates that a single registry entry |
246 // points to |chrome_exe|. This should only be used at run-time to determine | 246 // points to |chrome_exe|. This should only be used at run-time to determine |
247 // how Chrome is registered, not to know whether the registration is complete | 247 // how Chrome is registered, not to know whether the registration is complete |
248 // at install-time (IsChromeRegistered() can be used for that). | 248 // at install-time (IsChromeRegistered() can be used for that). |
249 static bool QuickIsChromeRegistered( | 249 static bool QuickIsChromeRegistered( |
250 BrowserDistribution* dist, | 250 BrowserDistribution* dist, |
251 const string16& chrome_exe, | 251 const string16& chrome_exe, |
252 const string16& suffix, | 252 const string16& suffix, |
253 RegistrationConfirmationLevel confirmation_level); | 253 RegistrationConfirmationLevel confirmation_level); |
254 | 254 |
| 255 // Returns the application name of the program under |dist|. |
| 256 // This application name will be suffixed as is appropriate for the current |
| 257 // install. |
| 258 // This is the name that is registered in the Windows default programs list |
| 259 // and that should thus be used to "make chrome default" and such. |
| 260 static string16 GetApplicationName(BrowserDistribution* dist, |
| 261 const string16& chrome_exe); |
| 262 |
255 // Make Chrome the default browser. This function works by going through | 263 // Make Chrome the default browser. This function works by going through |
256 // the url protocols and file associations that are related to general | 264 // the url protocols and file associations that are related to general |
257 // browsing, e.g. http, https, .html etc., and requesting to become the | 265 // browsing, e.g. http, https, .html etc., and requesting to become the |
258 // default handler for each. If any of these fails the operation will return | 266 // default handler for each. If any of these fails the operation will return |
259 // false to indicate failure, which is consistent with the return value of | 267 // false to indicate failure, which is consistent with the return value of |
260 // ShellIntegration::IsDefaultBrowser. | 268 // ShellIntegration::IsDefaultBrowser. |
261 // | 269 // |
262 // In the case of failure any successful changes will be left, however no | 270 // In the case of failure any successful changes will be left, however no |
263 // more changes will be attempted. | 271 // more changes will be attempted. |
264 // TODO(benwells): Attempt to undo any changes that were successfully made. | 272 // TODO(benwells): Attempt to undo any changes that were successfully made. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 const string16& icon_path, | 390 const string16& icon_path, |
383 int icon_index, | 391 int icon_index, |
384 uint32 options); | 392 uint32 options); |
385 | 393 |
386 private: | 394 private: |
387 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 395 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
388 }; | 396 }; |
389 | 397 |
390 | 398 |
391 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 399 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
OLD | NEW |