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

Side by Side Diff: content/common/socket_stream_handle_data.cc

Issue 9677031: Bind RenderViewImpl routing_id to SocketStreamHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: static AddToHandle with render_view_id Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/socket_stream_handle_data.h"
6
7 #include "webkit/glue/websocketstreamhandle_impl.h"
8
9 using webkit_glue::WebSocketStreamHandleImpl;
10 using WebKit::WebSocketStreamHandle;
11
12 // static
13 void SocketStreamHandleData::AddToHandle(
14 WebSocketStreamHandle* handle, int render_view_id) {
15 DCHECK(handle);
darin (slow to review) 2012/03/20 20:01:00 nit: more conventional to use NOTREACHED here so y
Takashi Toyoshima 2012/03/21 00:57:17 Done.
16 if (!handle)
17 return;
18 WebSocketStreamHandleImpl* impl =
19 static_cast<WebSocketStreamHandleImpl*>(handle);
20 impl->SetUserData(handle, new SocketStreamHandleData(render_view_id));
21 }
22
23 // static
24 const SocketStreamHandleData* SocketStreamHandleData::ForHandle(
25 WebSocketStreamHandle* handle) {
26 if (!handle)
27 return NULL;
28 WebSocketStreamHandleImpl* impl =
29 static_cast<WebSocketStreamHandleImpl*>(handle);
30 return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle));
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698