| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // Allows overriding of whether modern manifest versions are required; | 59 // Allows overriding of whether modern manifest versions are required; |
| 60 // intended for testing. | 60 // intended for testing. |
| 61 bool require_modern_manifest_version() const { | 61 bool require_modern_manifest_version() const { |
| 62 return require_modern_manifest_version_; | 62 return require_modern_manifest_version_; |
| 63 } | 63 } |
| 64 void set_require_modern_manifest_version(bool val) { | 64 void set_require_modern_manifest_version(bool val) { |
| 65 require_modern_manifest_version_ = val; | 65 require_modern_manifest_version_ = val; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void set_on_failure_callback(const OnFailureCallback& callback) { | |
| 69 on_failure_callback_ = callback; | |
| 70 } | |
| 71 | |
| 72 void set_be_noisy_on_failure(bool be_noisy_on_failure) { | 68 void set_be_noisy_on_failure(bool be_noisy_on_failure) { |
| 73 be_noisy_on_failure_ = be_noisy_on_failure; | 69 be_noisy_on_failure_ = be_noisy_on_failure; |
| 74 } | 70 } |
| 75 | 71 |
| 76 private: | 72 private: |
| 77 friend class base::RefCountedThreadSafe<UnpackedInstaller>; | 73 friend class base::RefCountedThreadSafe<UnpackedInstaller>; |
| 78 | 74 |
| 79 explicit UnpackedInstaller(ExtensionService* extension_service); | 75 explicit UnpackedInstaller(ExtensionService* extension_service); |
| 80 virtual ~UnpackedInstaller(); | 76 virtual ~UnpackedInstaller(); |
| 81 | 77 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 base::FilePath extension_path_; | 118 base::FilePath extension_path_; |
| 123 | 119 |
| 124 // If true and the extension contains plugins, we prompt the user before | 120 // If true and the extension contains plugins, we prompt the user before |
| 125 // loading. | 121 // loading. |
| 126 bool prompt_for_plugins_; | 122 bool prompt_for_plugins_; |
| 127 | 123 |
| 128 // Whether to require the extension installed to have a modern manifest | 124 // Whether to require the extension installed to have a modern manifest |
| 129 // version. | 125 // version. |
| 130 bool require_modern_manifest_version_; | 126 bool require_modern_manifest_version_; |
| 131 | 127 |
| 132 // An optional callback to set in order to be notified of failure. | |
| 133 OnFailureCallback on_failure_callback_; | |
| 134 | |
| 135 // Whether or not to be noisy (show a dialog) on failure. Defaults to true. | 128 // Whether or not to be noisy (show a dialog) on failure. Defaults to true. |
| 136 bool be_noisy_on_failure_; | 129 bool be_noisy_on_failure_; |
| 137 | 130 |
| 138 // Gives access to common methods and data of an extension installer. | 131 // Gives access to common methods and data of an extension installer. |
| 139 ExtensionInstaller installer_; | 132 ExtensionInstaller installer_; |
| 140 | 133 |
| 141 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 134 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
| 142 }; | 135 }; |
| 143 | 136 |
| 144 } // namespace extensions | 137 } // namespace extensions |
| 145 | 138 |
| 146 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 139 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| OLD | NEW |