| 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/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/crx_installer.h" | 10 #include "chrome/browser/extensions/crx_installer.h" |
| 11 #include "chrome/browser/extensions/extension_install_prompt.h" | 11 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/extension_system.h" | |
| 14 #include "chrome/browser/extensions/unpacked_installer.h" | 13 #include "chrome/browser/extensions/unpacked_installer.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 16 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 17 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
| 18 #include "content/public/browser/web_ui.h" | 17 #include "content/public/browser/web_ui.h" |
| 19 #include "content/public/browser/web_ui_data_source.h" | 18 #include "content/public/browser/web_ui_data_source.h" |
| 20 #include "content/public/common/drop_data.h" | 19 #include "content/public/common/drop_data.h" |
| 20 #include "extensions/browser/extension_system.h" |
| 21 #include "extensions/common/feature_switch.h" | 21 #include "extensions/common/feature_switch.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 23 #include "net/base/net_util.h" | 23 #include "net/base/net_util.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 | 27 |
| 28 InstallExtensionHandler::InstallExtensionHandler() { | 28 InstallExtensionHandler::InstallExtensionHandler() { |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void InstallExtensionHandler::HandleInstallDirectoryMessage( | 131 void InstallExtensionHandler::HandleInstallDirectoryMessage( |
| 132 const base::ListValue* args) { | 132 const base::ListValue* args) { |
| 133 Profile* profile = Profile::FromBrowserContext( | 133 Profile* profile = Profile::FromBrowserContext( |
| 134 web_ui()->GetWebContents()->GetBrowserContext()); | 134 web_ui()->GetWebContents()->GetBrowserContext()); |
| 135 UnpackedInstaller::Create( | 135 UnpackedInstaller::Create( |
| 136 ExtensionSystem::Get(profile)-> | 136 ExtensionSystem::Get(profile)-> |
| 137 extension_service())->Load(file_to_install_); | 137 extension_service())->Load(file_to_install_); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace extensions | 140 } // namespace extensions |
| OLD | NEW |