| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // does not exist, this method is a no-op and returns false. | 417 // does not exist, this method is a no-op and returns false. |
| 418 static bool UpdateChromeShortcut(BrowserDistribution* dist, | 418 static bool UpdateChromeShortcut(BrowserDistribution* dist, |
| 419 const string16& chrome_exe, | 419 const string16& chrome_exe, |
| 420 const string16& shortcut, | 420 const string16& shortcut, |
| 421 const string16& arguments, | 421 const string16& arguments, |
| 422 const string16& description, | 422 const string16& description, |
| 423 const string16& icon_path, | 423 const string16& icon_path, |
| 424 int icon_index, | 424 int icon_index, |
| 425 uint32 options); | 425 uint32 options); |
| 426 | 426 |
| 427 // Verify that a shortcut exists with the expected information. | |
| 428 // |exe_path| The shortcut's exe. | |
| 429 // |shortcut| The path to the shortcut. | |
| 430 // |description| The shortcut's description. | |
| 431 // |icon_index| The icon's index in the exe. | |
| 432 static VerifyShortcutStatus VerifyChromeShortcut(const string16& exe_path, | |
| 433 const string16& shortcut, | |
| 434 const string16& description, | |
| 435 int icon_index); | |
| 436 | |
| 437 // Sets |suffix| to the base 32 encoding of the md5 hash of this user's sid | 427 // Sets |suffix| to the base 32 encoding of the md5 hash of this user's sid |
| 438 // preceded by a dot. | 428 // preceded by a dot. |
| 439 // This is guaranteed to be unique on the machine and 27 characters long | 429 // This is guaranteed to be unique on the machine and 27 characters long |
| 440 // (including the '.'). | 430 // (including the '.'). |
| 441 // This suffix is then meant to be added to all registration that may conflict | 431 // This suffix is then meant to be added to all registration that may conflict |
| 442 // with another user-level Chrome install. | 432 // with another user-level Chrome install. |
| 443 // Note that prior to Chrome 21, the suffix registered used to be the user's | 433 // Note that prior to Chrome 21, the suffix registered used to be the user's |
| 444 // username (see GetOldUserSpecificRegistrySuffix() below). We still honor old | 434 // username (see GetOldUserSpecificRegistrySuffix() below). We still honor old |
| 445 // installs registered that way, but it was wrong because some of the | 435 // installs registered that way, but it was wrong because some of the |
| 446 // characters allowed in a username are not allowed in a ProgId. | 436 // characters allowed in a username are not allowed in a ProgId. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 463 // required by the base32 standard for inputs that aren't a multiple of 5 | 453 // required by the base32 standard for inputs that aren't a multiple of 5 |
| 464 // bytes. | 454 // bytes. |
| 465 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); | 455 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
| 466 | 456 |
| 467 private: | 457 private: |
| 468 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 458 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 469 }; | 459 }; |
| 470 | 460 |
| 471 | 461 |
| 472 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 462 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |