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. |