| 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 #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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 scoped_refptr<CrxInstaller> CrxInstaller::Create( | 71 scoped_refptr<CrxInstaller> CrxInstaller::Create( |
| 72 ExtensionService* frontend, | 72 ExtensionService* frontend, |
| 73 ExtensionInstallPrompt* client) { | 73 ExtensionInstallPrompt* client) { |
| 74 return new CrxInstaller(frontend->AsWeakPtr(), client, NULL); | 74 return new CrxInstaller(frontend->AsWeakPtr(), client, NULL); |
| 75 } | 75 } |
| 76 | 76 |
| 77 // static | 77 // static |
| 78 scoped_refptr<CrxInstaller> CrxInstaller::Create( | 78 scoped_refptr<CrxInstaller> CrxInstaller::Create( |
| 79 ExtensionService* frontend, | 79 ExtensionService* frontend, |
| 80 ExtensionInstallPrompt* client, | 80 ExtensionInstallPrompt* client, |
| 81 const WebstoreInstaller::Approval* approval) { | 81 const extensions::WebstoreInstaller::Approval* approval) { |
| 82 return new CrxInstaller(frontend->AsWeakPtr(), client, approval); | 82 return new CrxInstaller(frontend->AsWeakPtr(), client, approval); |
| 83 } | 83 } |
| 84 | 84 |
| 85 CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak, | 85 CrxInstaller::CrxInstaller( |
| 86 ExtensionInstallPrompt* client, | 86 base::WeakPtr<ExtensionService> frontend_weak, |
| 87 const WebstoreInstaller::Approval* approval) | 87 ExtensionInstallPrompt* client, |
| 88 const extensions::WebstoreInstaller::Approval* approval) |
| 88 : install_directory_(frontend_weak->install_directory()), | 89 : install_directory_(frontend_weak->install_directory()), |
| 89 install_source_(Extension::INTERNAL), | 90 install_source_(Extension::INTERNAL), |
| 90 approved_(false), | 91 approved_(false), |
| 91 extensions_enabled_(frontend_weak->extensions_enabled()), | 92 extensions_enabled_(frontend_weak->extensions_enabled()), |
| 92 delete_source_(false), | 93 delete_source_(false), |
| 93 create_app_shortcut_(false), | 94 create_app_shortcut_(false), |
| 94 frontend_weak_(frontend_weak), | 95 frontend_weak_(frontend_weak), |
| 95 profile_(frontend_weak->profile()), | 96 profile_(frontend_weak->profile()), |
| 96 client_(client), | 97 client_(client), |
| 97 apps_require_extension_mime_type_(false), | 98 apps_require_extension_mime_type_(false), |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 // Some users (such as the download shelf) need to know when a | 617 // Some users (such as the download shelf) need to know when a |
| 617 // CRXInstaller is done. Listening for the EXTENSION_* events | 618 // CRXInstaller is done. Listening for the EXTENSION_* events |
| 618 // is problematic because they don't know anything about the | 619 // is problematic because they don't know anything about the |
| 619 // extension before it is unpacked, so they cannot filter based | 620 // extension before it is unpacked, so they cannot filter based |
| 620 // on the extension. | 621 // on the extension. |
| 621 content::NotificationService::current()->Notify( | 622 content::NotificationService::current()->Notify( |
| 622 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 623 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 623 content::Source<CrxInstaller>(this), | 624 content::Source<CrxInstaller>(this), |
| 624 content::Details<const Extension>(extension)); | 625 content::Details<const Extension>(extension)); |
| 625 } | 626 } |
| OLD | NEW |