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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 8417012: Refactor loading out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: finally Created 9 years, 2 months 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/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 3c8a2149ddc9ac3e3b467431db03d7857aaeb9ee..771b1adc136e063857fdc19b44d22f6b23321d9d 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -12,12 +12,14 @@
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
#include "base/string_number_conversions.h"
+#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_creator.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
@@ -66,7 +68,10 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::NotificationService::AllSources());
- service->LoadExtension(path, false);
+ scoped_refptr<extensions::UnpackedInstaller> installer(
+ extensions::UnpackedInstaller::Create(service));
+ installer->set_prompt_for_plugins(false);
+ installer->Load(path);
ui_test_utils::RunMessageLoop();
}
@@ -147,8 +152,7 @@ bool ExtensionBrowserTest::LoadExtensionAsComponent(const FilePath& path) {
&manifest))
return false;
- service->LoadComponentExtension(
- ExtensionService::ComponentExtensionInfo(manifest, path));
+ service->component_loader()->Add(manifest, path);
return true;
}
@@ -269,7 +273,7 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
return false;
scoped_refptr<CrxInstaller> installer(
- service->MakeCrxInstaller(install_ui));
+ CrxInstaller::Create(service, install_ui));
installer->set_expected_id(id);
installer->set_is_gallery_install(from_webstore);
installer->InstallCrx(crx_path);
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698