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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 | 221 |
222 // Relative path of RegisteredApplications registry entry under which | 222 // Relative path of RegisteredApplications registry entry under which |
223 // we add Chrome as a Windows application | 223 // we add Chrome as a Windows application |
224 static const wchar_t* kRegRegisteredApplications; | 224 static const wchar_t* kRegRegisteredApplications; |
225 | 225 |
226 // The key path and key name required to register Chrome on Windows such | 226 // The key path and key name required to register Chrome on Windows such |
227 // that it can be launched from Start->Run just by name (chrome.exe). | 227 // that it can be launched from Start->Run just by name (chrome.exe). |
228 static const wchar_t* kAppPathsRegistryKey; | 228 static const wchar_t* kAppPathsRegistryKey; |
229 static const wchar_t* kAppPathsRegistryPathName; | 229 static const wchar_t* kAppPathsRegistryPathName; |
230 | 230 |
231 #if defined(GOOGLE_CHROME_BUILD) | |
231 // Name that we give to Chrome file association handler ProgId. | 232 // Name that we give to Chrome file association handler ProgId. |
232 static const wchar_t* kChromeHTMLProgId; | 233 static const wchar_t* kChromeStableHTMLProgId; |
grt (UTC plus 2)
2013/09/04 03:33:36
remove these constants from the header since they
zturner
2013/09/05 01:35:29
Done.
| |
233 | 234 |
234 // Description of Chrome file association handler ProgId. | 235 // Description of Chrome file association handler ProgId. |
235 static const wchar_t* kChromeHTMLProgIdDesc; | 236 static const wchar_t* kChromeStableHTMLProgIdDesc; |
237 | |
238 // Name that we give to Chrome Canary file association handler ProgId. | |
239 static const wchar_t* kChromeSXSHTMLProgId; | |
240 | |
241 // Description of Chrome Canary file association handler ProgId. | |
242 static const wchar_t* kChromeSXSHTMLProgIdDesc; | |
243 #else | |
244 // Name that we give to Chromium file association handler ProgId. | |
245 static const wchar_t* kChromiumHTMLProgId; | |
246 | |
247 // Description of Chromium file association handler ProgId. | |
248 static const wchar_t* kChromiumHTMLProgIdDesc; | |
249 #endif | |
236 | 250 |
237 // Registry path that stores url associations on Vista. | 251 // Registry path that stores url associations on Vista. |
238 static const wchar_t* kRegVistaUrlPrefs; | 252 static const wchar_t* kRegVistaUrlPrefs; |
239 | 253 |
240 // File extensions that Chrome registers itself as the default handler | 254 // File extensions that Chrome registers itself as the default handler |
241 // for when the user makes Chrome the default browser. | 255 // for when the user makes Chrome the default browser. |
242 static const wchar_t* kDefaultFileAssociations[]; | 256 static const wchar_t* kDefaultFileAssociations[]; |
243 | 257 |
244 // File extensions that Chrome registers itself as being capable of | 258 // File extensions that Chrome registers itself as being capable of |
245 // handling. | 259 // handling. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 // Registry value name for the OpenWithProgids entry for file associations. | 309 // Registry value name for the OpenWithProgids entry for file associations. |
296 static const wchar_t* kRegOpenWithProgids; | 310 static const wchar_t* kRegOpenWithProgids; |
297 | 311 |
298 // Returns true if |chrome_exe| is registered in HKLM with |suffix|. | 312 // Returns true if |chrome_exe| is registered in HKLM with |suffix|. |
299 // Note: This only checks one deterministic key in HKLM for |chrome_exe| and | 313 // Note: This only checks one deterministic key in HKLM for |chrome_exe| and |
300 // doesn't otherwise validate a full Chrome install in HKLM. | 314 // doesn't otherwise validate a full Chrome install in HKLM. |
301 static bool QuickIsChromeRegisteredInHKLM(BrowserDistribution* dist, | 315 static bool QuickIsChromeRegisteredInHKLM(BrowserDistribution* dist, |
302 const string16& chrome_exe, | 316 const string16& chrome_exe, |
303 const string16& suffix); | 317 const string16& suffix); |
304 | 318 |
319 // Returns the Browser ProgId prefix (e.g. ChromeHTML, ChromiumHTM, etc...). | |
320 // The full id is of the form |prefix||suffix| where suffix is a 26-digit | |
321 // alpha-numeric identifier. | |
322 static string16 GetBrowserProgIdPrefix(); | |
gab
2013/09/03 21:05:19
This should be in BrowserDistribution and have sub
zturner
2013/09/05 01:35:29
Done.
| |
323 | |
324 // Returns the Browser ProgId description. | |
325 static string16 GetBrowserProgIdDesc(); | |
gab
2013/09/03 21:05:19
Same for this.
zturner
2013/09/05 01:35:29
Done.
| |
326 | |
305 // Returns true if the current Windows version supports the presence of | 327 // Returns true if the current Windows version supports the presence of |
306 // shortcuts at |location|. | 328 // shortcuts at |location|. |
307 static bool ShortcutLocationIsSupported(ShellUtil::ShortcutLocation location); | 329 static bool ShortcutLocationIsSupported(ShellUtil::ShortcutLocation location); |
308 | 330 |
309 // Sets |path| to the path for a shortcut at the |location| desired for the | 331 // Sets |path| to the path for a shortcut at the |location| desired for the |
310 // given |level| (CURRENT_USER for per-user path and SYSTEM_LEVEL for | 332 // given |level| (CURRENT_USER for per-user path and SYSTEM_LEVEL for |
311 // all-users path). | 333 // all-users path). |
312 // Returns false on failure. | 334 // Returns false on failure. |
313 static bool GetShortcutPath(ShellUtil::ShortcutLocation location, | 335 static bool GetShortcutPath(ShellUtil::ShortcutLocation location, |
314 BrowserDistribution* dist, | 336 BrowserDistribution* dist, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
565 // required by the base32 standard for inputs that aren't a multiple of 5 | 587 // required by the base32 standard for inputs that aren't a multiple of 5 |
566 // bytes. | 588 // bytes. |
567 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); | 589 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
568 | 590 |
569 private: | 591 private: |
570 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 592 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
571 }; | 593 }; |
572 | 594 |
573 | 595 |
574 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 596 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
OLD | NEW |