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/org_chromium_net_UrlRequest.h" | 5 #include "components/cronet/android/org_chromium_net_UrlRequest.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/cronet/android/url_request_context_peer.h" | 10 #include "components/cronet/android/url_request_context_peer.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 jobject object, | 102 jobject object, |
103 jlong urlRequestContextPeer, | 103 jlong urlRequestContextPeer, |
104 jstring url_string, | 104 jstring url_string, |
105 jint priority) { | 105 jint priority) { |
106 URLRequestContextPeer* context = | 106 URLRequestContextPeer* context = |
107 reinterpret_cast<URLRequestContextPeer*>(urlRequestContextPeer); | 107 reinterpret_cast<URLRequestContextPeer*>(urlRequestContextPeer); |
108 DCHECK(context != NULL); | 108 DCHECK(context != NULL); |
109 | 109 |
110 const char* url_utf8 = env->GetStringUTFChars(url_string, NULL); | 110 const char* url_utf8 = env->GetStringUTFChars(url_string, NULL); |
111 | 111 |
112 DVLOG(context->logging_level()) | 112 VLOG(1) << "New chromium network request. URL:" << url_utf8; |
113 << "New chromium network request. URL:" << url_utf8; | |
114 | 113 |
115 GURL url(url_utf8); | 114 GURL url(url_utf8); |
116 | 115 |
117 env->ReleaseStringUTFChars(url_string, url_utf8); | 116 env->ReleaseStringUTFChars(url_string, url_utf8); |
118 | 117 |
119 URLRequestPeer* peer = | 118 URLRequestPeer* peer = |
120 new URLRequestPeer(context, | 119 new URLRequestPeer(context, |
121 new JniURLRequestPeerDelegate(env, object), | 120 new JniURLRequestPeerDelegate(env, object), |
122 url, | 121 url, |
123 ConvertRequestPriority(priority)); | 122 ConvertRequestPriority(priority)); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 333 |
335 // Some implementations (notably HttpURLConnection) include a mapping for the | 334 // Some implementations (notably HttpURLConnection) include a mapping for the |
336 // null key; in HTTP's case, this maps to the HTTP status line. | 335 // null key; in HTTP's case, this maps to the HTTP status line. |
337 ScopedJavaLocalRef<jstring> status_line = | 336 ScopedJavaLocalRef<jstring> status_line = |
338 ConvertUTF8ToJavaString(env, headers->GetStatusLine()); | 337 ConvertUTF8ToJavaString(env, headers->GetStatusLine()); |
339 Java_UrlRequest_onAppendResponseHeader( | 338 Java_UrlRequest_onAppendResponseHeader( |
340 env, object, headersMap, NULL, status_line.Release()); | 339 env, object, headersMap, NULL, status_line.Release()); |
341 } | 340 } |
342 | 341 |
343 } // namespace cronet | 342 } // namespace cronet |
OLD | NEW |