summaryrefslogtreecommitdiffstats
path: root/android_webview/native
diff options
context:
space:
mode:
authorbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-10 12:16:52 +0000
committerbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-10 12:16:52 +0000
commit7cd3143ee801550ede1ef9ddccb69bbc74d4ab1a (patch)
tree205df139093dfc1cf51b37e233ca00343113878e /android_webview/native
parent1b7050a10e5f2b17d603c34ac97fd3c43e445a9a (diff)
downloadchromium_src-7cd3143ee801550ede1ef9ddccb69bbc74d4ab1a.zip
chromium_src-7cd3143ee801550ede1ef9ddccb69bbc74d4ab1a.tar.gz
chromium_src-7cd3143ee801550ede1ef9ddccb69bbc74d4ab1a.tar.bz2
Use non-static set_key interface on DataReductionProxySettings
This removes the use of a static initializer and makes it possible for clients to pass a key without owning the memory where the key is stored (as would be the case if passed to a static const char*). BUG=371626, 371204 Review URL: https://codereview.chromium.org/279633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/native')
-rw-r--r--android_webview/native/aw_contents_statics.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/android_webview/native/aw_contents_statics.cc b/android_webview/native/aw_contents_statics.cc
index 41824c5..0cd4964 100644
--- a/android_webview/native/aw_contents_statics.cc
+++ b/android_webview/native/aw_contents_statics.cc
@@ -50,7 +50,12 @@ void ClearClientCertPreferences(JNIEnv* env, jclass, jobject callback) {
// static
void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) {
- DataReductionProxySettings::SetKey(ConvertJavaStringToUTF8(env, key));
+ AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
+ DCHECK(browser_context);
+ DataReductionProxySettings* drp_settings =
+ browser_context->GetDataReductionProxySettings();
+ DCHECK(drp_settings);
+ drp_settings->set_key(ConvertJavaStringToUTF8(env, key));
}
// static