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

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

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/content/public/test/test_browser_context.cc
===================================================================
--- trunk/src/content/public/test/test_browser_context.cc (revision 219785)
+++ trunk/src/content/public/test/test_browser_context.cc (working copy)
@@ -6,8 +6,6 @@
#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"
@@ -72,7 +70,10 @@
}
net::URLRequestContextGetter* TestBrowserContext::GetRequestContext() {
- return GetDefaultStoragePartition(this)->GetURLRequestContext();
+ if (!request_context_.get()) {
+ request_context_ = new TestContextURLRequestContextGetter();
+ }
+ return request_context_.get();
}
net::URLRequestContextGetter*
@@ -108,7 +109,8 @@
ResourceContext* TestBrowserContext::GetResourceContext() {
if (!resource_context_)
- resource_context_.reset(new MockResourceContext());
+ resource_context_.reset(new MockResourceContext(
+ GetRequestContext()->GetURLRequestContext()));
return resource_context_.get();
}
« no previous file with comments | « trunk/src/content/public/test/mock_resource_context.cc ('k') | trunk/src/content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698