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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const std::string& expected_id() const { return expected_id_; } | 126 const std::string& expected_id() const { return expected_id_; } |
127 void set_expected_id(const std::string& val) { expected_id_ = val; } | 127 void set_expected_id(const std::string& val) { expected_id_ = val; } |
128 | 128 |
129 // Expected SHA256 hash sum for the package. | 129 // Expected SHA256 hash sum for the package. |
130 const std::string& expected_hash() const { return expected_hash_; } | 130 const std::string& expected_hash() const { return expected_hash_; } |
131 void set_expected_hash(const std::string& val) { expected_hash_ = val; } | 131 void set_expected_hash(const std::string& val) { expected_hash_ = val; } |
132 | 132 |
133 bool hash_check_failed() const { return hash_check_failed_; } | 133 bool hash_check_failed() const { return hash_check_failed_; } |
134 void set_hash_check_failed(bool val) { hash_check_failed_ = val; } | 134 void set_hash_check_failed(bool val) { hash_check_failed_ = val; } |
135 | 135 |
136 void set_expected_version(const base::Version& val) { | 136 void set_expected_version(const Version& val) { |
137 expected_version_.reset(new base::Version(val)); | 137 expected_version_.reset(new Version(val)); |
138 expected_version_strict_checking_ = true; | 138 expected_version_strict_checking_ = true; |
139 } | 139 } |
140 | 140 |
141 bool delete_source() const { return delete_source_; } | 141 bool delete_source() const { return delete_source_; } |
142 void set_delete_source(bool val) { delete_source_ = val; } | 142 void set_delete_source(bool val) { delete_source_ = val; } |
143 | 143 |
144 bool allow_silent_install() const { return allow_silent_install_; } | 144 bool allow_silent_install() const { return allow_silent_install_; } |
145 void set_allow_silent_install(bool val) { allow_silent_install_ = val; } | 145 void set_allow_silent_install(bool val) { allow_silent_install_ = val; } |
146 | 146 |
147 bool grant_permissions() const { return grant_permissions_; } | 147 bool grant_permissions() const { return grant_permissions_; } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 scoped_ptr<Manifest> expected_manifest_; | 319 scoped_ptr<Manifest> expected_manifest_; |
320 | 320 |
321 // The level of checking when comparing the actual manifest against | 321 // The level of checking when comparing the actual manifest against |
322 // the |expected_manifest_|. | 322 // the |expected_manifest_|. |
323 WebstoreInstaller::ManifestCheckLevel expected_manifest_check_level_; | 323 WebstoreInstaller::ManifestCheckLevel expected_manifest_check_level_; |
324 | 324 |
325 // If non-NULL, contains the expected version of the extension we're | 325 // If non-NULL, contains the expected version of the extension we're |
326 // installing. Important for external sources, where claiming the wrong | 326 // installing. Important for external sources, where claiming the wrong |
327 // version could cause unnecessary unpacking of an extension at every | 327 // version could cause unnecessary unpacking of an extension at every |
328 // restart. | 328 // restart. |
329 scoped_ptr<base::Version> expected_version_; | 329 scoped_ptr<Version> expected_version_; |
330 | 330 |
331 // If true, the actual version should be same with the |expected_version_|, | 331 // If true, the actual version should be same with the |expected_version_|, |
332 // Otherwise the actual version should be equal to or newer than | 332 // Otherwise the actual version should be equal to or newer than |
333 // the |expected_version_|. | 333 // the |expected_version_|. |
334 bool expected_version_strict_checking_; | 334 bool expected_version_strict_checking_; |
335 | 335 |
336 // Whether manual extension installation is enabled. We can't just check this | 336 // Whether manual extension installation is enabled. We can't just check this |
337 // before trying to install because themes are special-cased to always be | 337 // before trying to install because themes are special-cased to always be |
338 // allowed. | 338 // allowed. |
339 bool extensions_enabled_; | 339 bool extensions_enabled_; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 // Performs requirements, policy and blacklist checks on the extension. | 432 // Performs requirements, policy and blacklist checks on the extension. |
433 ExtensionInstallChecker install_checker_; | 433 ExtensionInstallChecker install_checker_; |
434 | 434 |
435 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 435 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
436 }; | 436 }; |
437 | 437 |
438 } // namespace extensions | 438 } // namespace extensions |
439 | 439 |
440 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 440 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
OLD | NEW |