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

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

Issue 2069303002: Add new Cronet exception class for QUIC errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header Created 4 years, 6 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
Index: components/cronet/android/cronet_bidirectional_stream_adapter.cc
diff --git a/components/cronet/android/cronet_bidirectional_stream_adapter.cc b/components/cronet/android/cronet_bidirectional_stream_adapter.cc
index 557c8f47eebc4608e9f2987099d6065dd2542ae6..fde1abccfcc378fe86325ad23569d8fcf5bb051f 100644
--- a/components/cronet/android/cronet_bidirectional_stream_adapter.cc
+++ b/components/cronet/android/cronet_bidirectional_stream_adapter.cc
@@ -23,6 +23,7 @@
#include "net/http/http_status_code.h"
#include "net/http/http_transaction_factory.h"
#include "net/http/http_util.h"
+#include "net/quic/quic_protocol.h"
#include "net/spdy/spdy_header_block.h"
#include "net/ssl/ssl_info.h"
#include "net/url_request/http_user_agent_settings.h"
@@ -315,8 +316,10 @@ void CronetBidirectionalStreamAdapter::OnFailed(int error) {
DCHECK(context_->IsOnNetworkThread());
stream_failed_ = true;
JNIEnv* env = base::android::AttachCurrentThread();
+ // TODO(mgersh): Add support for NetErrorDetails (http://crbug.com/624942)
cronet::Java_CronetBidirectionalStream_onError(
env, owner_.obj(), NetErrorToUrlRequestError(error), error,
+ net::QUIC_NO_ERROR,
ConvertUTF8ToJavaString(env, net::ErrorToString(error)).obj(),
bidi_stream_->GetTotalReceivedBytes());
}

Powered by Google App Engine
This is Rietveld 408576698