Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 8417012: Refactor loading out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: finally Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_provider.cc
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index db8f052257d9261a6dd58651e3b9b3b9fc4365af..096823f4cd1e6b5fa8ef45b4e74a29689cd8ba48 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -50,6 +50,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/extension_toolbar_model.h"
+#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/net/url_request_mock_util.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -857,13 +858,17 @@ void AutomationProvider::InstallExtension(
if (extension_path.MatchesExtension(FILE_PATH_LITERAL(".crx"))) {
ExtensionInstallUI* client =
(with_ui ? new ExtensionInstallUI(profile_) : NULL);
- scoped_refptr<CrxInstaller> installer(service->MakeCrxInstaller(client));
+ scoped_refptr<CrxInstaller> installer(
+ CrxInstaller::Create(service, client));
if (!with_ui)
installer->set_allow_silent_install(true);
installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
installer->InstallCrx(extension_path);
} else {
- service->LoadExtension(extension_path, with_ui);
+ scoped_refptr<extensions::UnpackedInstaller> installer(
+ extensions::UnpackedInstaller::Create(service));
+ installer->set_prompt_for_plugins(with_ui);
+ installer->Load(extension_path);
}
} else {
AutomationMsg_InstallExtension::WriteReplyParams(reply_message, 0);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/chromeos/accessibility_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698