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

Unified Diff: content/public/test/test_browser_context.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android webview init fix merged in. Created 7 years, 4 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
« no previous file with comments | « content/public/test/mock_resource_context.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_browser_context.cc
diff --git a/content/public/test/test_browser_context.cc b/content/public/test/test_browser_context.cc
index 907f748323d33a3fa4d16b3cf09533d5081e7db5..b75817faa256292bc9a1c6d870756885f2f11588 100644
--- a/content/public/test/test_browser_context.cc
+++ b/content/public/test/test_browser_context.cc
@@ -6,6 +6,8 @@
#include "base/files/file_path.h"
#include "base/test/null_task_runner.h"
+#include "content/public/browser/cookie_store_factory.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/test/mock_resource_context.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -70,10 +72,7 @@ DownloadManagerDelegate* TestBrowserContext::GetDownloadManagerDelegate() {
}
net::URLRequestContextGetter* TestBrowserContext::GetRequestContext() {
- if (!request_context_.get()) {
- request_context_ = new TestContextURLRequestContextGetter();
- }
- return request_context_.get();
+ return GetDefaultStoragePartition(this)->GetURLRequestContext();
}
net::URLRequestContextGetter*
@@ -109,8 +108,7 @@ void TestBrowserContext::RequestMIDISysExPermission(
ResourceContext* TestBrowserContext::GetResourceContext() {
if (!resource_context_)
- resource_context_.reset(new MockResourceContext(
- GetRequestContext()->GetURLRequestContext()));
+ resource_context_.reset(new MockResourceContext());
return resource_context_.get();
}
« no previous file with comments | « content/public/test/mock_resource_context.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698