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

Side by Side Diff: content/browser/renderer_host/socket_stream_dispatcher_host.cc

Issue 197043005: original change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix other build error Created 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 5 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/renderer_host/socket_stream_host.h" 10 #include "content/browser/renderer_host/socket_stream_host.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 if (hosts_.Lookup(socket_id)) { 219 if (hosts_.Lookup(socket_id)) {
220 DVLOG(1) << "socket_id=" << socket_id << " already registered."; 220 DVLOG(1) << "socket_id=" << socket_id << " already registered.";
221 return; 221 return;
222 } 222 }
223 223
224 // Note that the SocketStreamHost is responsible for checking that |url| 224 // Note that the SocketStreamHost is responsible for checking that |url|
225 // is valid. 225 // is valid.
226 SocketStreamHost* socket_stream_host = 226 SocketStreamHost* socket_stream_host =
227 new SocketStreamHost(this, render_frame_id, socket_id); 227 new SocketStreamHost(this, render_process_id_, render_frame_id,
228 socket_id);
228 hosts_.AddWithID(socket_stream_host, socket_id); 229 hosts_.AddWithID(socket_stream_host, socket_id);
229 socket_stream_host->Connect(url, GetURLRequestContext()); 230 socket_stream_host->Connect(url, GetURLRequestContext());
230 DVLOG(2) << "SocketStreamDispatcherHost::OnConnect -> " << socket_id; 231 DVLOG(2) << "SocketStreamDispatcherHost::OnConnect -> " << socket_id;
231 } 232 }
232 233
233 void SocketStreamDispatcherHost::OnSendData( 234 void SocketStreamDispatcherHost::OnSendData(
234 int socket_id, const std::vector<char>& data) { 235 int socket_id, const std::vector<char>& data) {
235 DVLOG(2) << "SocketStreamDispatcherHost::OnSendData socket_id=" << socket_id; 236 DVLOG(2) << "SocketStreamDispatcherHost::OnSendData socket_id=" << socket_id;
236 SocketStreamHost* socket_stream_host = hosts_.Lookup(socket_id); 237 SocketStreamHost* socket_stream_host = hosts_.Lookup(socket_id);
237 if (!socket_stream_host) { 238 if (!socket_stream_host) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 iter.Advance()) { 275 iter.Advance()) {
275 int socket_id = iter.GetCurrentKey(); 276 int socket_id = iter.GetCurrentKey();
276 const SocketStreamHost* socket_stream_host = iter.GetCurrentValue(); 277 const SocketStreamHost* socket_stream_host = iter.GetCurrentValue();
277 delete socket_stream_host; 278 delete socket_stream_host;
278 hosts_.Remove(socket_id); 279 hosts_.Remove(socket_id);
279 } 280 }
280 on_shutdown_ = true; 281 on_shutdown_ = true;
281 } 282 }
282 283
283 } // namespace content 284 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/browser/renderer_host/socket_stream_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698