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

Unified Diff: components/cronet/android/cronet_url_request.cc

Issue 972213002: [Cronet] Implement batch read in CronetInputStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix findbug warning Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/urlconnection/CronetInputStream.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/cronet_url_request.cc
diff --git a/components/cronet/android/cronet_url_request.cc b/components/cronet/android/cronet_url_request.cc
index bc7b29fea313a72e6d5a580c8669b23e6f1647d0..04489bfce73fe7c108f2c4ee7517424f609f2fac 100644
--- a/components/cronet/android/cronet_url_request.cc
+++ b/components/cronet/android/cronet_url_request.cc
@@ -285,6 +285,8 @@ static jstring GetHttpStatusText(JNIEnv* env,
DCHECK(request_adapter->IsOnNetworkThread());
const net::HttpResponseHeaders* headers =
request_adapter->GetResponseHeaders();
+ if (headers == NULL)
+ return ConvertUTF8ToJavaString(env, "").Release();
return ConvertUTF8ToJavaString(env, headers->GetStatusText()).Release();
}
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/urlconnection/CronetInputStream.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698