Index: chrome/test/base/testing_profile.cc |
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
index 8c1334596d86e7e32f61dde750e3e5bb4b45651a..8bb5c1b5485f62ef2b30dd2c2a3b7ef3b5022001 100644 |
--- a/chrome/test/base/testing_profile.cc |
+++ b/chrome/test/base/testing_profile.cc |
@@ -41,6 +41,7 @@ |
#include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/url_constants.h" |
#include "chrome/test/base/bookmark_load_observer.h" |
#include "chrome/test/base/test_url_request_context_getter.h" |
@@ -342,6 +343,10 @@ ExtensionService* TestingProfile::CreateExtensionService( |
// Extension pref store, created for use by |extension_prefs_|. |
extension_pref_value_map_.reset(new ExtensionPrefValueMap); |
+ |
+ bool extensions_disabled = |
+ command_line && command_line->HasSwitch(switches::kDisableExtensions); |
+ |
// Note that the GetPrefs() creates a TestingPrefService, therefore |
// the extension controlled pref values set in extension_prefs_ |
// are not reflected in the pref service. One would need to |
@@ -349,7 +354,8 @@ ExtensionService* TestingProfile::CreateExtensionService( |
extension_prefs_.reset( |
new ExtensionPrefs(GetPrefs(), |
install_directory, |
- extension_pref_value_map_.get())); |
+ extension_pref_value_map_.get(), |
+ extensions_disabled)); |
extension_service_.reset(new ExtensionService(this, |
command_line, |
install_directory, |