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

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

Issue 9583036: Revert 124817 - Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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_updater_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_updater_unittest.cc (revision 124830)
+++ chrome/browser/extensions/extension_updater_unittest.cc (working copy)
@@ -18,12 +18,9 @@
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
#include "chrome/browser/extensions/extension_sync_data.h"
-#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/extensions/extension_updater.h"
#include "chrome/browser/extensions/test_extension_prefs.h"
#include "chrome/browser/extensions/test_extension_service.h"
-#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/extensions/extension.h"
@@ -815,21 +812,17 @@
// service, not on our mock |service|. This allows us to fake
// the CrxInstaller actions we want.
TestingProfile profile;
- static_cast<TestExtensionSystem*>(
- ExtensionSystemFactory::GetForProfile(&profile))->
- CreateExtensionService(
- CommandLine::ForCurrentProcess(),
- FilePath(),
- false);
- ExtensionService* extension_service =
- ExtensionSystemFactory::GetForProfile(&profile)->extension_service();
- extension_service->set_extensions_enabled(true);
- extension_service->set_show_extensions_prompts(false);
+ profile.CreateExtensionService(
+ CommandLine::ForCurrentProcess(),
+ FilePath(),
+ false);
+ profile.GetExtensionService()->set_extensions_enabled(true);
+ profile.GetExtensionService()->set_show_extensions_prompts(false);
scoped_refptr<CrxInstaller> fake_crx1(
- CrxInstaller::Create(extension_service, NULL));
+ CrxInstaller::Create(profile.GetExtensionService(), NULL));
scoped_refptr<CrxInstaller> fake_crx2(
- CrxInstaller::Create(extension_service, NULL));
+ CrxInstaller::Create(profile.GetExtensionService(), NULL));
if (updates_start_running) {
// Add fake CrxInstaller to be returned by service.UpdateExtension().
« no previous file with comments | « chrome/browser/extensions/extension_system_factory.cc ('k') | chrome/browser/extensions/test_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698