| Index: chrome/test/base/testing_profile.cc
|
| diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
|
| index 9570da03e3e207afaaea2ddd3fdd0b1dff5ceea8..183f7ce7f62e7535bc7bd0150a6814fee5b49e62 100644
|
| --- a/chrome/test/base/testing_profile.cc
|
| +++ b/chrome/test/base/testing_profile.cc
|
| @@ -62,6 +62,7 @@
|
| #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
|
| #include "components/user_prefs/user_prefs.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "content/public/browser/cookie_store_factory.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/storage_partition.h"
|
| @@ -111,38 +112,6 @@ class QuittingHistoryDBTask : public history::HistoryDBTask {
|
| DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask);
|
| };
|
|
|
| -class TestExtensionURLRequestContext : public net::URLRequestContext {
|
| - public:
|
| - TestExtensionURLRequestContext() {
|
| - net::CookieMonster* cookie_monster = new net::CookieMonster(NULL, NULL);
|
| - const char* schemes[] = {extensions::kExtensionScheme};
|
| - cookie_monster->SetCookieableSchemes(schemes, 1);
|
| - set_cookie_store(cookie_monster);
|
| - }
|
| -
|
| - virtual ~TestExtensionURLRequestContext() {}
|
| -};
|
| -
|
| -class TestExtensionURLRequestContextGetter
|
| - : public net::URLRequestContextGetter {
|
| - public:
|
| - virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE {
|
| - if (!context_.get())
|
| - context_.reset(new TestExtensionURLRequestContext());
|
| - return context_.get();
|
| - }
|
| - virtual scoped_refptr<base::SingleThreadTaskRunner>
|
| - GetNetworkTaskRunner() const OVERRIDE {
|
| - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
|
| - }
|
| -
|
| - protected:
|
| - virtual ~TestExtensionURLRequestContextGetter() {}
|
| -
|
| - private:
|
| - scoped_ptr<net::URLRequestContext> context_;
|
| -};
|
| -
|
| BrowserContextKeyedService* CreateTestDesktopNotificationService(
|
| content::BrowserContext* profile) {
|
| #if defined(ENABLE_NOTIFICATIONS)
|
| @@ -572,13 +541,6 @@ TestingProfile::GetExtensionSpecialStoragePolicy() {
|
| return extension_special_storage_policy_.get();
|
| }
|
|
|
| -net::CookieMonster* TestingProfile::GetCookieMonster() {
|
| - if (!GetRequestContext())
|
| - return NULL;
|
| - return GetRequestContext()->GetURLRequestContext()->cookie_store()->
|
| - GetCookieMonster();
|
| -}
|
| -
|
| void TestingProfile::CreateTestingPrefService() {
|
| DCHECK(!prefs_.get());
|
| testing_prefs_ = new TestingPrefServiceSyncable();
|
| @@ -666,12 +628,6 @@ void TestingProfile::RequestMIDISysExPermission(
|
| callback.Run(false);
|
| }
|
|
|
| -net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() {
|
| - if (!extensions_request_context_.get())
|
| - extensions_request_context_ = new TestExtensionURLRequestContextGetter();
|
| - return extensions_request_context_.get();
|
| -}
|
| -
|
| net::SSLConfigService* TestingProfile::GetSSLConfigService() {
|
| if (!GetRequestContext())
|
| return NULL;
|
| @@ -780,6 +736,10 @@ PrefService* TestingProfile::GetOffTheRecordPrefs() {
|
| return NULL;
|
| }
|
|
|
| +content::CookieStoreConfig TestingProfile::GetCookieStoreConfig() {
|
| + return content::CookieStoreConfig::InMemory();
|
| +}
|
| +
|
| quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
|
| return GetExtensionSpecialStoragePolicy();
|
| }
|
|
|