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

Unified Diff: android_webview/native/aw_contents_statics.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 | « android_webview/browser/net/token_binding_manager.cc ('k') | blimp/engine/common/blimp_browser_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents_statics.cc
diff --git a/android_webview/native/aw_contents_statics.cc b/android_webview/native/aw_contents_statics.cc
index bca0a998fa1fb12d4028c867378cffddf7764498..e3c49efbd140029a756f5d9c3255aef2856d5038 100644
--- a/android_webview/native/aw_contents_statics.cc
+++ b/android_webview/native/aw_contents_statics.cc
@@ -12,6 +12,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/common/url_constants.h"
#include "jni/AwContentsStatics_jni.h"
#include "net/cert/cert_database.h"
@@ -58,13 +59,14 @@ void SetDataReductionProxyKey(JNIEnv* env,
const JavaParamRef<jstring>& key) {
AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
DCHECK(browser_context);
- DCHECK(browser_context->GetRequestContext());
// The following call to GetRequestContext() could possibly be the first such
// call, which means AwURLRequestContextGetter::InitializeURLRequestContext
// will be called on IO thread as a result.
AwURLRequestContextGetter* aw_url_request_context_getter =
static_cast<AwURLRequestContextGetter*>(
- browser_context->GetRequestContext());
+ content::BrowserContext::GetDefaultStoragePartition(browser_context)->
+ GetURLRequestContext());
+ DCHECK(aw_url_request_context_getter);
// This PostTask has to be called after GetRequestContext, because SetKeyOnIO
// needs a valid DataReductionProxyRequestOptions object.
« no previous file with comments | « android_webview/browser/net/token_binding_manager.cc ('k') | blimp/engine/common/blimp_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698