| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // This is the name that is registered with Default Programs on Windows and | 253 // This is the name that is registered with Default Programs on Windows and |
| 254 // that should thus be used to "make chrome default" and such. | 254 // that should thus be used to "make chrome default" and such. |
| 255 static string16 GetApplicationName(BrowserDistribution* dist, | 255 static string16 GetApplicationName(BrowserDistribution* dist, |
| 256 const string16& chrome_exe); | 256 const string16& chrome_exe); |
| 257 | 257 |
| 258 // Returns the AppUserModelId for |dist|. This identifier is unconditionally | 258 // Returns the AppUserModelId for |dist|. This identifier is unconditionally |
| 259 // suffixed with a unique id for this user on user-level installs (in contrast | 259 // suffixed with a unique id for this user on user-level installs (in contrast |
| 260 // to other registration entries which are suffixed as described in | 260 // to other registration entries which are suffixed as described in |
| 261 // GetCurrentInstallationSuffix() above). | 261 // GetCurrentInstallationSuffix() above). |
| 262 static string16 GetBrowserModelId(BrowserDistribution* dist, | 262 static string16 GetBrowserModelId(BrowserDistribution* dist, |
| 263 const string16& chrome_exe); | 263 bool is_per_user_install); |
| 264 | 264 |
| 265 // Returns an AppUserModelId composed of each member of |components| separated | 265 // Returns an AppUserModelId composed of each member of |components| separated |
| 266 // by dots. | 266 // by dots. |
| 267 // The returned appid is guaranteed to be no longer than | 267 // The returned appid is guaranteed to be no longer than |
| 268 // chrome::kMaxAppModelIdLength (some of the components might have been | 268 // chrome::kMaxAppModelIdLength (some of the components might have been |
| 269 // shortened to enforce this). | 269 // shortened to enforce this). |
| 270 static string16 BuildAppModelId(const std::vector<string16>& components); | 270 static string16 BuildAppModelId(const std::vector<string16>& components); |
| 271 | 271 |
| 272 // Returns true if Chrome can make itself the default browser without relying | 272 // Returns true if Chrome can make itself the default browser without relying |
| 273 // on the Windows shell to prompt the user. This is the case for versions of | 273 // on the Windows shell to prompt the user. This is the case for versions of |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // 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 |
| 454 // bytes. | 454 // bytes. |
| 455 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); | 455 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
| 456 | 456 |
| 457 private: | 457 private: |
| 458 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 458 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 459 }; | 459 }; |
| 460 | 460 |
| 461 | 461 |
| 462 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 462 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |