OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/android_protocol_handler.h" | 5 #include "android_webview/native/android_protocol_handler.h" |
6 | 6 |
7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" | 7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" |
8 #include "android_webview/browser/net/aw_url_request_job_factory.h" | 8 #include "android_webview/browser/net/aw_url_request_job_factory.h" |
9 #include "android_webview/common/url_constants.h" | 9 #include "android_webview/common/url_constants.h" |
10 #include "android_webview/native/input_stream_impl.h" | 10 #include "android_webview/native/input_stream_impl.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // the use of the standard application context. | 274 // the use of the standard application context. |
275 static void SetResourceContextForTesting(JNIEnv* env, jclass /*clazz*/, | 275 static void SetResourceContextForTesting(JNIEnv* env, jclass /*clazz*/, |
276 jobject context) { | 276 jobject context) { |
277 if (context) { | 277 if (context) { |
278 ResetResourceContext(new JavaObjectWeakGlobalRef(env, context)); | 278 ResetResourceContext(new JavaObjectWeakGlobalRef(env, context)); |
279 } else { | 279 } else { |
280 ResetResourceContext(NULL); | 280 ResetResourceContext(NULL); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 static ScopedJavaLocalRef<jstring> GetAndroidAssetPath(JNIEnv* env, | 284 static jstring GetAndroidAssetPath(JNIEnv* env, jclass /*clazz*/) { |
285 jclass /*clazz*/) { | 285 // OK to release, JNI binding. |
286 return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath); | 286 return ConvertUTF8ToJavaString( |
| 287 env, android_webview::kAndroidAssetPath).Release(); |
287 } | 288 } |
288 | 289 |
289 static ScopedJavaLocalRef<jstring> GetAndroidResourcePath(JNIEnv* env, | 290 static jstring GetAndroidResourcePath(JNIEnv* env, jclass /*clazz*/) { |
290 jclass /*clazz*/) { | 291 // OK to release, JNI binding. |
291 return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath); | 292 return ConvertUTF8ToJavaString( |
| 293 env, android_webview::kAndroidResourcePath).Release(); |
292 } | 294 } |
293 | 295 |
294 } // namespace android_webview | 296 } // namespace android_webview |
OLD | NEW |