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

Side by Side Diff: android_webview/native/aw_contents_statics.cc

Issue 286013002: Added alternative configuration for the data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK fix Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « android_webview/browser/net/aw_url_request_context_getter.cc ('k') | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/aw_contents_statics.h" 5 #include "android_webview/native/aw_contents_statics.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 base::Bind(&NotifyClientCertificatesChanged), 47 base::Bind(&NotifyClientCertificatesChanged),
48 base::Bind(&ClientCertificatesCleared, base::Owned(j_callback))); 48 base::Bind(&ClientCertificatesCleared, base::Owned(j_callback)));
49 } 49 }
50 50
51 // static 51 // static
52 void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) { 52 void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) {
53 AwBrowserContext* browser_context = AwBrowserContext::GetDefault(); 53 AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
54 DCHECK(browser_context); 54 DCHECK(browser_context);
55 DataReductionProxySettings* drp_settings = 55 DataReductionProxySettings* drp_settings =
56 browser_context->GetDataReductionProxySettings(); 56 browser_context->GetDataReductionProxySettings();
57 DCHECK(drp_settings); 57 if (drp_settings)
58 drp_settings->set_key(ConvertJavaStringToUTF8(env, key)); 58 drp_settings->params()->set_key(ConvertJavaStringToUTF8(env, key));
59 } 59 }
60 60
61 // static 61 // static
62 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) { 62 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) {
63 AwBrowserContext::SetDataReductionProxyEnabled(enabled); 63 AwBrowserContext::SetDataReductionProxyEnabled(enabled);
64 } 64 }
65 65
66 bool RegisterAwContentsStatics(JNIEnv* env) { 66 bool RegisterAwContentsStatics(JNIEnv* env) {
67 return RegisterNativesImpl(env); 67 return RegisterNativesImpl(env);
68 } 68 }
69 69
70 } // namespace android_webview 70 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_url_request_context_getter.cc ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698