OLD | NEW |
---|---|
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 "components/cronet/android/chromium_url_request_context.h" | 5 #include "components/cronet/android/chromium_url_request_context.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 | 140 |
141 // Stops recording NetLog. | 141 // Stops recording NetLog. |
142 static void StopNetLog(JNIEnv* env, | 142 static void StopNetLog(JNIEnv* env, |
143 jobject jcaller, | 143 jobject jcaller, |
144 jlong urlRequestContextAdapter) { | 144 jlong urlRequestContextAdapter) { |
145 URLRequestContextAdapter* adapter = | 145 URLRequestContextAdapter* adapter = |
146 reinterpret_cast<URLRequestContextAdapter*>(urlRequestContextAdapter); | 146 reinterpret_cast<URLRequestContextAdapter*>(urlRequestContextAdapter); |
147 adapter->StopNetLog(); | 147 adapter->StopNetLog(); |
148 } | 148 } |
149 | 149 |
150 // Called on application's main Java thread. | |
151 static void InitRequestContextOnMainThread(JNIEnv* env, | |
152 jobject jcaller, | |
153 jlong urlRequestContextAdapter) { | |
mef
2014/10/15 20:04:55
nit: may as well start using c++ argument naming c
xunjieli
2014/10/15 20:27:46
Done. Good catch thanks!
| |
154 URLRequestContextAdapter* adapter = | |
155 reinterpret_cast<URLRequestContextAdapter*>(urlRequestContextAdapter); | |
156 adapter->InitRequestContextOnMainThread(); | |
157 } | |
158 | |
150 } // namespace cronet | 159 } // namespace cronet |
OLD | NEW |