| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 // that target |target_exe|. | 529 // that target |target_exe|. |
| 530 // Returns true if all shortcuts pointing to |target_exe| are successfully | 530 // Returns true if all shortcuts pointing to |target_exe| are successfully |
| 531 // updated, including the case where no such shortcuts are found. | 531 // updated, including the case where no such shortcuts are found. |
| 532 static bool UpdateShortcuts( | 532 static bool UpdateShortcuts( |
| 533 ShellUtil::ShortcutLocation location, | 533 ShellUtil::ShortcutLocation location, |
| 534 BrowserDistribution* dist, | 534 BrowserDistribution* dist, |
| 535 ShellChange level, | 535 ShellChange level, |
| 536 const base::FilePath& target_exe, | 536 const base::FilePath& target_exe, |
| 537 const ShellUtil::ShortcutProperties& properties); | 537 const ShellUtil::ShortcutProperties& properties); |
| 538 | 538 |
| 539 // Similar to UpdateShortcuts(), but operates on shortcuts whose filename |
| 540 // matches |name_filter|. |
| 541 static bool UpdateShortcutsFilteredByName( |
| 542 ShellUtil::ShortcutLocation location, |
| 543 BrowserDistribution* dist, |
| 544 ShellChange level, |
| 545 const string16& name_filter, |
| 546 const base::FilePath& target_exe, |
| 547 const ShellUtil::ShortcutProperties& properties); |
| 548 |
| 539 // Sets |suffix| to the base 32 encoding of the md5 hash of this user's sid | 549 // Sets |suffix| to the base 32 encoding of the md5 hash of this user's sid |
| 540 // preceded by a dot. | 550 // preceded by a dot. |
| 541 // This is guaranteed to be unique on the machine and 27 characters long | 551 // This is guaranteed to be unique on the machine and 27 characters long |
| 542 // (including the '.'). | 552 // (including the '.'). |
| 543 // This suffix is then meant to be added to all registration that may conflict | 553 // This suffix is then meant to be added to all registration that may conflict |
| 544 // with another user-level Chrome install. | 554 // with another user-level Chrome install. |
| 545 // Note that prior to Chrome 21, the suffix registered used to be the user's | 555 // Note that prior to Chrome 21, the suffix registered used to be the user's |
| 546 // username (see GetOldUserSpecificRegistrySuffix() below). We still honor old | 556 // username (see GetOldUserSpecificRegistrySuffix() below). We still honor old |
| 547 // installs registered that way, but it was wrong because some of the | 557 // installs registered that way, but it was wrong because some of the |
| 548 // characters allowed in a username are not allowed in a ProgId. | 558 // characters allowed in a username are not allowed in a ProgId. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 565 // required by the base32 standard for inputs that aren't a multiple of 5 | 575 // required by the base32 standard for inputs that aren't a multiple of 5 |
| 566 // bytes. | 576 // bytes. |
| 567 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); | 577 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
| 568 | 578 |
| 569 private: | 579 private: |
| 570 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 580 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 571 }; | 581 }; |
| 572 | 582 |
| 573 | 583 |
| 574 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 584 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |