| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 set_install_flag(kInstallFlagInstallImmediately, val); | 195 set_install_flag(kInstallFlagInstallImmediately, val); |
| 196 } | 196 } |
| 197 void set_do_not_sync(bool val) { | 197 void set_do_not_sync(bool val) { |
| 198 set_install_flag(kInstallFlagDoNotSync, val); | 198 set_install_flag(kInstallFlagDoNotSync, val); |
| 199 } | 199 } |
| 200 | 200 |
| 201 bool did_handle_successfully() const { return did_handle_successfully_; } | 201 bool did_handle_successfully() const { return did_handle_successfully_; } |
| 202 | 202 |
| 203 Profile* profile() { return install_checker_.profile(); } | 203 Profile* profile() { return install_checker_.profile(); } |
| 204 | 204 |
| 205 const Extension* extension() { return install_checker_.extension().get(); } | 205 const Extension* extension() { return extension_.get(); } |
| 206 | 206 |
| 207 // The currently installed version of the extension, for updates. Will be | 207 // The currently installed version of the extension, for updates. Will be |
| 208 // invalid if this isn't an update. | 208 // invalid if this isn't an update. |
| 209 const base::Version& current_version() const { return current_version_; } | 209 const base::Version& current_version() const { return current_version_; } |
| 210 | 210 |
| 211 private: | 211 private: |
| 212 friend class ::ExtensionServiceTest; | 212 friend class ::ExtensionServiceTest; |
| 213 friend class ExtensionUpdaterTest; | 213 friend class ExtensionUpdaterTest; |
| 214 friend class ExtensionCrxInstallerTest; | 214 friend class ExtensionCrxInstallerTest; |
| 215 | 215 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 base::WeakPtr<ExtensionService> service_weak_; | 373 base::WeakPtr<ExtensionService> service_weak_; |
| 374 | 374 |
| 375 // The client we will work with to do the installation. This can be NULL, in | 375 // The client we will work with to do the installation. This can be NULL, in |
| 376 // which case the install is silent. | 376 // which case the install is silent. |
| 377 std::unique_ptr<ExtensionInstallPrompt> client_; | 377 std::unique_ptr<ExtensionInstallPrompt> client_; |
| 378 | 378 |
| 379 // The root of the unpacked extension directory. This is a subdirectory of | 379 // The root of the unpacked extension directory. This is a subdirectory of |
| 380 // temp_dir_, so we don't have to delete it explicitly. | 380 // temp_dir_, so we don't have to delete it explicitly. |
| 381 base::FilePath unpacked_extension_root_; | 381 base::FilePath unpacked_extension_root_; |
| 382 | 382 |
| 383 // The extension being installed. |
| 384 scoped_refptr<const Extension> extension_; |
| 385 |
| 383 // True when the CRX being installed was just downloaded. | 386 // True when the CRX being installed was just downloaded. |
| 384 // Used to trigger extra checks before installing. | 387 // Used to trigger extra checks before installing. |
| 385 bool apps_require_extension_mime_type_; | 388 bool apps_require_extension_mime_type_; |
| 386 | 389 |
| 387 // Allows for the possibility of a normal install (one in which a |client| | 390 // Allows for the possibility of a normal install (one in which a |client| |
| 388 // is provided in the ctor) to proceed without showing the permissions prompt | 391 // is provided in the ctor) to proceed without showing the permissions prompt |
| 389 // dialog. | 392 // dialog. |
| 390 bool allow_silent_install_; | 393 bool allow_silent_install_; |
| 391 | 394 |
| 392 // Allows for the possibility of an installation without granting any | 395 // Allows for the possibility of an installation without granting any |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 438 |
| 436 // Performs requirements, policy and blacklist checks on the extension. | 439 // Performs requirements, policy and blacklist checks on the extension. |
| 437 ExtensionInstallChecker install_checker_; | 440 ExtensionInstallChecker install_checker_; |
| 438 | 441 |
| 439 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 442 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 440 }; | 443 }; |
| 441 | 444 |
| 442 } // namespace extensions | 445 } // namespace extensions |
| 443 | 446 |
| 444 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 447 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |