Chromium Code Reviews| Index: webkit/glue/websocketstreamhandle_impl.cc |
| diff --git a/webkit/glue/websocketstreamhandle_impl.cc b/webkit/glue/websocketstreamhandle_impl.cc |
| index b7a95e87ba468a4a91a27acc29a0fe6efdff214f..2663d2f97bedad9e22b91ec89e3b3e9a9901dbe6 100644 |
| --- a/webkit/glue/websocketstreamhandle_impl.cc |
| +++ b/webkit/glue/websocketstreamhandle_impl.cc |
| @@ -12,7 +12,9 @@ |
| #include "base/logging.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/string16.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
| +#include "third_party/WebKit/Source/Platform/chromium/public/WebSocketStreamError.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebSocketStreamHandleClient.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
| #include "webkit/glue/webkitplatformsupport_impl.h" |
| @@ -20,6 +22,7 @@ |
| #include "webkit/glue/websocketstreamhandle_delegate.h" |
| using WebKit::WebData; |
| +using WebKit::WebSocketStreamError; |
| using WebKit::WebSocketStreamHandle; |
| using WebKit::WebSocketStreamHandleClient; |
| using WebKit::WebURL; |
| @@ -54,6 +57,7 @@ class WebSocketStreamHandleImpl::Context |
| const char*, |
| int) OVERRIDE; |
| virtual void DidClose(WebSocketStreamHandle*) OVERRIDE; |
| + virtual void DidFail(WebSocketStreamHandle*, int, const string16&); |
| private: |
| friend class base::RefCounted<Context>; |
| @@ -145,6 +149,18 @@ void WebSocketStreamHandleImpl::Context::DidClose( |
| Release(); |
| } |
| +void WebSocketStreamHandleImpl::Context::DidFail( |
| + WebSocketStreamHandle* web_handle, |
| + int error_code, |
| + const string16& error_msg) { |
| + VLOG(1) << "DidFail"; |
|
kinuko
2013/04/23 10:15:47
nit: is this useful? maybe it might be better to o
tyoshino (SeeGerritForStatus)
2013/04/23 16:04:07
The other VLOGs also should print more info to be
|
| + if (client_) { |
| + client_->didFail( |
| + handle_, |
| + WebSocketStreamError(error_code, error_msg)); |
| + } |
| +} |
| + |
| // WebSocketStreamHandleImpl ------------------------------------------------ |
| WebSocketStreamHandleImpl::WebSocketStreamHandleImpl( |