| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 // chrome::kMaxAppModelIdLength (some of the components might have been | 403 // chrome::kMaxAppModelIdLength (some of the components might have been |
| 404 // shortened to enforce this). | 404 // shortened to enforce this). |
| 405 static base::string16 BuildAppModelId( | 405 static base::string16 BuildAppModelId( |
| 406 const std::vector<base::string16>& components); | 406 const std::vector<base::string16>& components); |
| 407 | 407 |
| 408 // Returns true if Chrome can make itself the default browser without relying | 408 // Returns true if Chrome can make itself the default browser without relying |
| 409 // on the Windows shell to prompt the user. This is the case for versions of | 409 // on the Windows shell to prompt the user. This is the case for versions of |
| 410 // Windows prior to Windows 8. | 410 // Windows prior to Windows 8. |
| 411 static bool CanMakeChromeDefaultUnattended(); | 411 static bool CanMakeChromeDefaultUnattended(); |
| 412 | 412 |
| 413 // Returns the DefaultState of Chrome for HTTP and HTTPS. | 413 // Returns the DefaultState of Chrome for HTTP and HTTPS and updates the |
| 414 // default browser beacons as appropriate. |
| 414 static DefaultState GetChromeDefaultState(); | 415 static DefaultState GetChromeDefaultState(); |
| 415 | 416 |
| 416 // Returns the DefaultState of the Chrome instance with the specified path | 417 // Returns the DefaultState of the Chrome instance with the specified path for |
| 417 // for HTTP and HTTPs. | 418 // HTTP and HTTPs and updates the default browser beacons as appropriate. |
| 418 static DefaultState GetChromeDefaultStateFromPath( | 419 static DefaultState GetChromeDefaultStateFromPath( |
| 419 const base::FilePath& chrome_exe); | 420 const base::FilePath& chrome_exe); |
| 420 | 421 |
| 421 // Returns the DefaultState of Chrome for |protocol|. | 422 // Returns the DefaultState of Chrome for |protocol|. |
| 422 static DefaultState GetChromeDefaultProtocolClientState( | 423 static DefaultState GetChromeDefaultProtocolClientState( |
| 423 const base::string16& protocol); | 424 const base::string16& protocol); |
| 424 | 425 |
| 425 // Make Chrome the default browser. This function works by going through | 426 // Make Chrome the default browser. This function works by going through |
| 426 // the url protocols and file associations that are related to general | 427 // the url protocols and file associations that are related to general |
| 427 // browsing, e.g. http, https, .html etc., and requesting to become the | 428 // browsing, e.g. http, https, .html etc., and requesting to become the |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 // application, as given to AddFileAssociations. All information associated | 637 // application, as given to AddFileAssociations. All information associated |
| 637 // with this name will be deleted. | 638 // with this name will be deleted. |
| 638 static bool DeleteFileAssociations(const base::string16& prog_id); | 639 static bool DeleteFileAssociations(const base::string16& prog_id); |
| 639 | 640 |
| 640 private: | 641 private: |
| 641 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 642 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 642 }; | 643 }; |
| 643 | 644 |
| 644 | 645 |
| 645 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 646 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |