Index: chrome/test/testing_profile.cc |
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc |
index 3c37562e4a1c261afd91672cd38f8df4f88beacc..9a007b46200f27cd02a8d6ffc34ef4c2f82cf1b8 100644 |
--- a/chrome/test/testing_profile.cc |
+++ b/chrome/test/testing_profile.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -30,6 +30,7 @@ |
#include "chrome/browser/net/pref_proxy_config_service.h" |
#include "chrome/browser/notifications/desktop_notification_service.h" |
#include "chrome/browser/prefs/browser_prefs.h" |
+#include "chrome/browser/prefs/testing_pref_store.h" |
#include "chrome/browser/search_engines/template_url_fetcher.h" |
#include "chrome/browser/search_engines/template_url_model.h" |
#include "chrome/browser/sessions/session_service.h" |
@@ -48,7 +49,6 @@ |
#include "net/url_request/url_request_unittest.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "webkit/database/database_tracker.h" |
- |
#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
#include "chrome/browser/gtk/gtk_theme_provider.h" |
#endif |
@@ -326,18 +326,27 @@ void TestingProfile::UseThemeProvider(BrowserThemeProvider* theme_provider) { |
theme_provider_.reset(theme_provider); |
} |
-scoped_refptr<ExtensionService> TestingProfile::CreateExtensionService( |
+ExtensionService* TestingProfile::CreateExtensionService( |
const CommandLine* command_line, |
const FilePath& install_directory) { |
- extension_pref_store_.reset(new ExtensionPrefStore); |
- extension_prefs_.reset(new ExtensionPrefs(GetPrefs(), |
- install_directory, |
- extension_pref_store_.get())); |
+ // Extension pref store, created for use by |extension_prefs_|. |
+ ExtensionPrefStore* extension_pref_store = NULL; |
+ ExtensionPrefStore* incognito_extension_pref_store = NULL; |
+ |
+ if (testing_prefs_) { |
Mattias Nissler (ping if slow)
2011/01/05 12:08:07
If have commented this before, just use GetPrefs()
battre
2011/01/05 20:23:08
I have commented this as well. ;-)
See http://code
|
+ extension_pref_store = testing_prefs_->GetExtensionPrefs(); |
+ incognito_extension_pref_store = new ExtensionPrefStore(true); |
+ } |
+ extension_prefs_.reset( |
+ new ExtensionPrefs(GetPrefs(), |
+ install_directory, |
+ extension_pref_store, |
+ incognito_extension_pref_store)); |
extensions_service_ = new ExtensionService(this, |
- command_line, |
- install_directory, |
- extension_prefs_.get(), |
- false); |
+ command_line, |
+ install_directory, |
+ extension_prefs_.get(), |
+ false); |
return extensions_service_; |
} |