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

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

Issue 430643002: Correcting the version field in the Chrome-Proxy header to be the chromium build and patch number. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trybot test fix Created 6 years, 4 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/aw_browser_context.cc ('k') | chrome/browser/io_thread.cc » ('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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 // static 53 // static
54 void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) { 54 void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) {
55 AwBrowserContext* browser_context = AwBrowserContext::GetDefault(); 55 AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
56 DCHECK(browser_context); 56 DCHECK(browser_context);
57 DataReductionProxyAuthRequestHandler* drp_auth_request_handler = 57 DataReductionProxyAuthRequestHandler* drp_auth_request_handler =
58 browser_context->GetDataReductionProxyAuthRequestHandler(); 58 browser_context->GetDataReductionProxyAuthRequestHandler();
59 if (drp_auth_request_handler) 59 if (drp_auth_request_handler)
60 drp_auth_request_handler->SetKey( 60 drp_auth_request_handler->SetKey(
61 ConvertJavaStringToUTF8(env, key), 61 ConvertJavaStringToUTF8(env, key));
62 data_reduction_proxy::kClientAndroidWebview,
63 data_reduction_proxy::kProtocolVersion);
64 } 62 }
65 63
66 // static 64 // static
67 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) { 65 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) {
68 AwBrowserContext::SetDataReductionProxyEnabled(enabled); 66 AwBrowserContext::SetDataReductionProxyEnabled(enabled);
69 } 67 }
70 68
71 // static 69 // static
72 jstring GetUnreachableWebDataUrl(JNIEnv* env, jclass) { 70 jstring GetUnreachableWebDataUrl(JNIEnv* env, jclass) {
73 return base::android::ConvertUTF8ToJavaString( 71 return base::android::ConvertUTF8ToJavaString(
74 env, content::kUnreachableWebDataURL).Release(); 72 env, content::kUnreachableWebDataURL).Release();
75 } 73 }
76 74
77 // static 75 // static
78 void SetRecordFullDocument(JNIEnv* env, jclass, jboolean record_full_document) { 76 void SetRecordFullDocument(JNIEnv* env, jclass, jboolean record_full_document) {
79 content::SynchronousCompositor::SetRecordFullDocument(record_full_document); 77 content::SynchronousCompositor::SetRecordFullDocument(record_full_document);
80 } 78 }
81 79
82 bool RegisterAwContentsStatics(JNIEnv* env) { 80 bool RegisterAwContentsStatics(JNIEnv* env) {
83 return RegisterNativesImpl(env); 81 return RegisterNativesImpl(env);
84 } 82 }
85 83
86 } // namespace android_webview 84 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698