| 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_UNPACKED_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Loads the extension from the directory |extension_path|; | 44 // Loads the extension from the directory |extension_path|; |
| 45 // for use with command line switch --load-extension=path or | 45 // for use with command line switch --load-extension=path or |
| 46 // --load-and-launch-app=path. | 46 // --load-and-launch-app=path. |
| 47 // This is equivalent to Load, except that it reads the extension from | 47 // This is equivalent to Load, except that it reads the extension from |
| 48 // |extension_path| synchronously. | 48 // |extension_path| synchronously. |
| 49 // The return value indicates whether the installation has begun successfully. | 49 // The return value indicates whether the installation has begun successfully. |
| 50 // The id of the extension being loaded is returned in |extension_id|. | 50 // The id of the extension being loaded is returned in |extension_id|. |
| 51 bool LoadFromCommandLine(const base::FilePath& extension_path, | 51 bool LoadFromCommandLine(const base::FilePath& extension_path, |
| 52 std::string* extension_id); | 52 std::string* extension_id); |
| 53 | 53 |
| 54 void LoadFromZipFile(const base::FilePath& zip_path); |
| 55 void UnpackZipFileAndLoad(const base::FilePath& zip_path); |
| 56 |
| 54 // Allows prompting for plugins to be disabled; intended for testing only. | 57 // Allows prompting for plugins to be disabled; intended for testing only. |
| 55 bool prompt_for_plugins() { return prompt_for_plugins_; } | 58 bool prompt_for_plugins() { return prompt_for_plugins_; } |
| 56 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } | 59 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } |
| 57 | 60 |
| 58 // Allows overriding of whether modern manifest versions are required; | 61 // Allows overriding of whether modern manifest versions are required; |
| 59 // intended for testing. | 62 // intended for testing. |
| 60 bool require_modern_manifest_version() const { | 63 bool require_modern_manifest_version() const { |
| 61 return require_modern_manifest_version_; | 64 return require_modern_manifest_version_; |
| 62 } | 65 } |
| 63 void set_require_modern_manifest_version(bool val) { | 66 void set_require_modern_manifest_version(bool val) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Checks management policies and requirements before the extension can be | 135 // Checks management policies and requirements before the extension can be |
| 133 // installed. | 136 // installed. |
| 134 ExtensionInstallChecker install_checker_; | 137 ExtensionInstallChecker install_checker_; |
| 135 | 138 |
| 136 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 139 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
| 137 }; | 140 }; |
| 138 | 141 |
| 139 } // namespace extensions | 142 } // namespace extensions |
| 140 | 143 |
| 141 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 144 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| OLD | NEW |