| 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/ui/webui/extensions/install_extension_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/install_extension_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/crx_installer.h" | 9 #include "chrome/browser/extensions/crx_installer.h" |
| 10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 if (file_to_install_.empty()) { | 75 if (file_to_install_.empty()) { |
| 76 LOG(ERROR) << "No file captured to install."; | 76 LOG(ERROR) << "No file captured to install."; |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 | 79 |
| 80 Profile* profile = Profile::FromWebUI(web_ui()); | 80 Profile* profile = Profile::FromWebUI(web_ui()); |
| 81 scoped_refptr<CrxInstaller> crx_installer( | 81 scoped_refptr<CrxInstaller> crx_installer( |
| 82 CrxInstaller::Create( | 82 CrxInstaller::Create( |
| 83 ExtensionSystem::Get(profile)->extension_service(), | 83 ExtensionSystem::Get(profile)->extension_service(), |
| 84 new ExtensionInstallUI(profile))); | 84 new ExtensionInstallUI(profile))); |
| 85 crx_installer->set_allow_off_store_install(true); |
| 85 crx_installer->InstallCrx(file_to_install_); | 86 crx_installer->InstallCrx(file_to_install_); |
| 86 | 87 |
| 87 file_to_install_.clear(); | 88 file_to_install_.clear(); |
| 88 } | 89 } |
| OLD | NEW |