| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 | 114 |
| 115 CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak, | 115 CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak, |
| 116 ExtensionInstallUI* client) | 116 ExtensionInstallUI* client) |
| 117 : install_directory_(frontend_weak->install_directory()), | 117 : install_directory_(frontend_weak->install_directory()), |
| 118 install_source_(Extension::INTERNAL), | 118 install_source_(Extension::INTERNAL), |
| 119 extensions_enabled_(frontend_weak->extensions_enabled()), | 119 extensions_enabled_(frontend_weak->extensions_enabled()), |
| 120 delete_source_(false), | 120 delete_source_(false), |
| 121 is_gallery_install_(false), | 121 is_gallery_install_(false), |
| 122 create_app_shortcut_(false), | 122 create_app_shortcut_(false), |
| 123 page_index_(0), | 123 page_index_(-1), |
| 124 frontend_weak_(frontend_weak), | 124 frontend_weak_(frontend_weak), |
| 125 client_(client), | 125 client_(client), |
| 126 apps_require_extension_mime_type_(false), | 126 apps_require_extension_mime_type_(false), |
| 127 allow_silent_install_(false), | 127 allow_silent_install_(false), |
| 128 install_cause_(extension_misc::INSTALL_CAUSE_UNSET) { | 128 install_cause_(extension_misc::INSTALL_CAUSE_UNSET) { |
| 129 } | 129 } |
| 130 | 130 |
| 131 CrxInstaller::~CrxInstaller() { | 131 CrxInstaller::~CrxInstaller() { |
| 132 // Delete the temp directory and crx file as necessary. Note that the | 132 // Delete the temp directory and crx file as necessary. Note that the |
| 133 // destructor might be called on any thread, so we post a task to the file | 133 // destructor might be called on any thread, so we post a task to the file |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 // Some users (such as the download shelf) need to know when a | 578 // Some users (such as the download shelf) need to know when a |
| 579 // CRXInstaller is done. Listening for the EXTENSION_* events | 579 // CRXInstaller is done. Listening for the EXTENSION_* events |
| 580 // is problematic because they don't know anything about the | 580 // is problematic because they don't know anything about the |
| 581 // extension before it is unpacked, so they can not filter based | 581 // extension before it is unpacked, so they can not filter based |
| 582 // on the extension. | 582 // on the extension. |
| 583 NotificationService::current()->Notify( | 583 NotificationService::current()->Notify( |
| 584 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 584 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 585 Source<CrxInstaller>(this), | 585 Source<CrxInstaller>(this), |
| 586 NotificationService::NoDetails()); | 586 NotificationService::NoDetails()); |
| 587 } | 587 } |
| OLD | NEW |