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/unpacked_installer.h" | 13 #include "chrome/browser/extensions/unpacked_installer.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
17 #include "content/public/browser/web_ui.h" | 17 #include "content/public/browser/web_ui.h" |
18 #include "content/public/browser/web_ui_data_source.h" | 18 #include "content/public/browser/web_ui_data_source.h" |
19 #include "content/public/common/drop_data.h" | 19 #include "content/public/common/drop_data.h" |
20 #include "extensions/browser/extension_system.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/filename_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 |
31 InstallExtensionHandler::~InstallExtensionHandler() { | 31 InstallExtensionHandler::~InstallExtensionHandler() { |
32 } | 32 } |
33 | 33 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void InstallExtensionHandler::HandleInstallDirectoryMessage( | 133 void InstallExtensionHandler::HandleInstallDirectoryMessage( |
134 const base::ListValue* args) { | 134 const base::ListValue* args) { |
135 Profile* profile = Profile::FromBrowserContext( | 135 Profile* profile = Profile::FromBrowserContext( |
136 web_ui()->GetWebContents()->GetBrowserContext()); | 136 web_ui()->GetWebContents()->GetBrowserContext()); |
137 UnpackedInstaller::Create( | 137 UnpackedInstaller::Create( |
138 ExtensionSystem::Get(profile)-> | 138 ExtensionSystem::Get(profile)-> |
139 extension_service())->Load(file_to_install_); | 139 extension_service())->Load(file_to_install_); |
140 } | 140 } |
141 | 141 |
142 } // namespace extensions | 142 } // namespace extensions |
OLD | NEW |