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

Issue 6474012: Create a path to deliver SocketStream errors to the renderer. (Closed)

Created:
9 years, 10 months ago by Yuta Kitamura
Modified:
7 years ago
Reviewers:
ukai
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, tyoshino (SeeGerritForStatus), Takashi Toyoshima, pam+watch_chromium.org, cbentzel+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Create a path to deliver SocketStream errors to the renderer. This patch overrides SocketStreamDispatcherHost::OnError() to receive SocketStream errors, and relay them to the renderer via process boundary (IPC), IPCWebSocketHandleBridge, and WebSocketStreamHandleImpl::Context. BUG=67662 TEST=none

Patch Set 1 #

Patch Set 2 : Remove unnecessary forward declaration #

Total comments: 1

Patch Set 3 : Add unit test and test_shell code #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -8 lines) Patch
M chrome/browser/renderer_host/socket_stream_dispatcher_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/socket_stream_dispatcher_host.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/socket_stream_host.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/socket_stream_host.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/socket_stream_dispatcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/socket_stream_dispatcher.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M net/socket_stream/socket_stream_unittest.cc View 1 2 9 chunks +26 lines, -5 lines 3 comments Download
M net/websockets/websocket_throttle_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/websocketstreamhandle_delegate.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/websocketstreamhandle_impl.cc View 5 chunks +19 lines, -1 line 3 comments Download
M webkit/tools/test_shell/simple_socket_stream_bridge.cc View 1 2 4 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Yuta Kitamura
This is Chromium's counterpart of <http://webkit.org/b/54226>. This patch should be committed *after* a patch in ...
9 years, 10 months ago (2011-02-10 21:36:59 UTC) #1
ukai
http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_stream_unittest.cc File net/socket_stream/socket_stream_unittest.cc (right): http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_stream_unittest.cc#newcode122 net/socket_stream/socket_stream_unittest.cc:122: // TODO(yutak): Need to figure out a way to ...
9 years, 7 months ago (2011-05-10 08:10:39 UTC) #2
Yuta Kitamura
http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_stream_unittest.cc File net/socket_stream/socket_stream_unittest.cc (right): http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_stream_unittest.cc#newcode122 net/socket_stream/socket_stream_unittest.cc:122: // TODO(yutak): Need to figure out a way to ...
9 years, 7 months ago (2011-05-10 09:01:22 UTC) #3
ukai
9 years, 7 months ago (2011-05-10 10:00:29 UTC) #4
http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_str...
File net/socket_stream/socket_stream_unittest.cc (right):

http://codereview.chromium.org/6474012/diff/9001/net/socket_stream/socket_str...
net/socket_stream/socket_stream_unittest.cc:122: // TODO(yutak): Need to figure
out a way to create SocketStreamEvent
On 2011/05/10 09:01:22, Yuta Kitamura wrote:
> No, because there are several uses of non-const member functions such as
> |event->socket->SendData()| or |event->socket->Close()|.

Hmm. then I think SocketStreamEvent should have net::SocketStream* and const
net::SocketStream*.

or it might be ok to change OnError passes non-const net::SocketStream*.

http://codereview.chromium.org/6474012/diff/9001/webkit/glue/websocketstreamh...
File webkit/glue/websocketstreamhandle_impl.cc (right):

http://codereview.chromium.org/6474012/diff/9001/webkit/glue/websocketstreamh...
webkit/glue/websocketstreamhandle_impl.cc:150: error_code,
On 2011/05/10 09:01:22, Yuta Kitamura wrote:
> In WebKit, SocketStreamError's errorCode is considered platform-dependent. The
> only purpose is to show it to users via Web Inspector.
> 
> For example, SocketStreamHandleCFNet uses error code returned from
> CFErrorGetCode.
>
http://trac.webkit.org/browser/trunk/Source/WebCore/platform/network/cf/Socke...

Hmm. then I think we should refrain from using errorCode in message to web
developer (as ResourceError)

Powered by Google App Engine
This is Rietveld 408576698