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

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

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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/browser/browser_context.h ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index cbc38e2668a9ed2a050cf23e6d40efaee96adf94..0fc10f6e202c9c59240f1498282b8c669fd5b19b 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -41,6 +41,7 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
@@ -790,7 +791,8 @@ std::string GetCookies(BrowserContext* browser_context, const GURL& url) {
std::string cookies;
base::WaitableEvent event(true, false);
net::URLRequestContextGetter* context_getter =
- browser_context->GetRequestContext();
+ BrowserContext::GetDefaultStoragePartition(browser_context)->
+ GetURLRequestContext();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -806,7 +808,8 @@ bool SetCookie(BrowserContext* browser_context,
bool result = false;
base::WaitableEvent event(true, false);
net::URLRequestContextGetter* context_getter =
- browser_context->GetRequestContext();
+ BrowserContext::GetDefaultStoragePartition(browser_context)->
+ GetURLRequestContext();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698