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