| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void set_install_source(Extension::Location source) { | 87 void set_install_source(Extension::Location source) { |
| 88 install_source_ = source; | 88 install_source_ = source; |
| 89 } | 89 } |
| 90 | 90 |
| 91 const std::string& expected_id() const { return expected_id_; } | 91 const std::string& expected_id() const { return expected_id_; } |
| 92 void set_expected_id(const std::string& val) { expected_id_ = val; } | 92 void set_expected_id(const std::string& val) { expected_id_ = val; } |
| 93 | 93 |
| 94 bool delete_source() const { return delete_source_; } | 94 bool delete_source() const { return delete_source_; } |
| 95 void set_delete_source(bool val) { delete_source_ = val; } | 95 void set_delete_source(bool val) { delete_source_ = val; } |
| 96 | 96 |
| 97 bool allow_privilege_increase() const { return allow_privilege_increase_; } | |
| 98 void set_allow_privilege_increase(bool val) { | |
| 99 allow_privilege_increase_ = val; | |
| 100 } | |
| 101 | |
| 102 bool allow_silent_install() const { return allow_silent_install_; } | 97 bool allow_silent_install() const { return allow_silent_install_; } |
| 103 void set_allow_silent_install(bool val) { allow_silent_install_ = val; } | 98 void set_allow_silent_install(bool val) { allow_silent_install_ = val; } |
| 104 | 99 |
| 105 bool is_gallery_install() const { return is_gallery_install_; } | 100 bool is_gallery_install() const { return is_gallery_install_; } |
| 106 void set_is_gallery_install(bool val) { is_gallery_install_ = val; } | 101 void set_is_gallery_install(bool val) { is_gallery_install_ = val; } |
| 107 | 102 |
| 108 // If |apps_require_extension_mime_type_| is set to true, be sure to set | 103 // If |apps_require_extension_mime_type_| is set to true, be sure to set |
| 109 // |original_mime_type_| as well. | 104 // |original_mime_type_| as well. |
| 110 void set_apps_require_extension_mime_type( | 105 void set_apps_require_extension_mime_type( |
| 111 bool apps_require_extension_mime_type) { | 106 bool apps_require_extension_mime_type) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 161 |
| 167 // Whether manual extension installation is enabled. We can't just check this | 162 // Whether manual extension installation is enabled. We can't just check this |
| 168 // before trying to install because themes are special-cased to always be | 163 // before trying to install because themes are special-cased to always be |
| 169 // allowed. | 164 // allowed. |
| 170 bool extensions_enabled_; | 165 bool extensions_enabled_; |
| 171 | 166 |
| 172 // Whether we're supposed to delete the source file on destruction. Defaults | 167 // Whether we're supposed to delete the source file on destruction. Defaults |
| 173 // to false. | 168 // to false. |
| 174 bool delete_source_; | 169 bool delete_source_; |
| 175 | 170 |
| 176 // Whether privileges should be allowed to silently increaes from any | |
| 177 // previously installed version of the extension. This is used for things | |
| 178 // like external extensions, where extensions come with third-party software | |
| 179 // or are distributed by the network administrator. There is no UI shown | |
| 180 // for these extensions, so there shouldn't be UI for privilege increase, | |
| 181 // either. Defaults to false. | |
| 182 bool allow_privilege_increase_; | |
| 183 | |
| 184 // Whether the install originated from the gallery. | 171 // Whether the install originated from the gallery. |
| 185 bool is_gallery_install_; | 172 bool is_gallery_install_; |
| 186 | 173 |
| 187 // Whether to create an app shortcut after successful installation. This is | 174 // Whether to create an app shortcut after successful installation. This is |
| 188 // set based on the user's selection in the UI and can only ever be true for | 175 // set based on the user's selection in the UI and can only ever be true for |
| 189 // apps. | 176 // apps. |
| 190 bool create_app_shortcut_; | 177 bool create_app_shortcut_; |
| 191 | 178 |
| 192 // The extension we're installing. We own this and either pass it off to | 179 // The extension we're installing. We own this and either pass it off to |
| 193 // ExtensionsService on success, or delete it on failure. | 180 // ExtensionsService on success, or delete it on failure. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool allow_silent_install_; | 216 bool allow_silent_install_; |
| 230 | 217 |
| 231 // The value of the content type header sent with the CRX. | 218 // The value of the content type header sent with the CRX. |
| 232 // Ignorred unless |require_extension_mime_type_| is true. | 219 // Ignorred unless |require_extension_mime_type_| is true. |
| 233 std::string original_mime_type_; | 220 std::string original_mime_type_; |
| 234 | 221 |
| 235 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 222 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 236 }; | 223 }; |
| 237 | 224 |
| 238 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 225 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |