| 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 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Same as the previous method, except use the |approval| to bypass the | 93 // Same as the previous method, except use the |approval| to bypass the |
| 94 // prompt. Note that the caller retains ownership of |approval|. | 94 // prompt. Note that the caller retains ownership of |approval|. |
| 95 static scoped_refptr<CrxInstaller> Create( | 95 static scoped_refptr<CrxInstaller> Create( |
| 96 ExtensionService* service, | 96 ExtensionService* service, |
| 97 scoped_ptr<ExtensionInstallPrompt> client, | 97 scoped_ptr<ExtensionInstallPrompt> client, |
| 98 const WebstoreInstaller::Approval* approval); | 98 const WebstoreInstaller::Approval* approval); |
| 99 | 99 |
| 100 // Install the crx in |source_file|. | 100 // Install the crx in |source_file|. |
| 101 void InstallCrx(const base::FilePath& source_file); | 101 void InstallCrx(const base::FilePath& source_file); |
| 102 | 102 |
| 103 // Install the crx in |source_file| after checking hash sum. |
| 104 void CheckAndInstallCrx(const base::FilePath& source_file, |
| 105 const std::string& package_hash); |
| 106 |
| 103 // Convert the specified user script into an extension and install it. | 107 // Convert the specified user script into an extension and install it. |
| 104 void InstallUserScript(const base::FilePath& source_file, | 108 void InstallUserScript(const base::FilePath& source_file, |
| 105 const GURL& download_url); | 109 const GURL& download_url); |
| 106 | 110 |
| 107 // Convert the specified web app into an extension and install it. | 111 // Convert the specified web app into an extension and install it. |
| 108 void InstallWebApp(const WebApplicationInfo& web_app); | 112 void InstallWebApp(const WebApplicationInfo& web_app); |
| 109 | 113 |
| 110 // Overridden from ExtensionInstallPrompt::Delegate: | 114 // Overridden from ExtensionInstallPrompt::Delegate: |
| 111 void InstallUIProceed() override; | 115 void InstallUIProceed() override; |
| 112 void InstallUIAbort(bool user_initiated) override; | 116 void InstallUIAbort(bool user_initiated) override; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 424 |
| 421 // Performs requirements, policy and blacklist checks on the extension. | 425 // Performs requirements, policy and blacklist checks on the extension. |
| 422 ExtensionInstallChecker install_checker_; | 426 ExtensionInstallChecker install_checker_; |
| 423 | 427 |
| 424 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 428 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 425 }; | 429 }; |
| 426 | 430 |
| 427 } // namespace extensions | 431 } // namespace extensions |
| 428 | 432 |
| 429 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 433 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |