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

Side by Side Diff: content/renderer/p2p/socket_client.h

Issue 7584011: Fix DCHECK in P2PSocketClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « content/renderer/p2p/ipc_socket_factory.cc ('k') | content/renderer/p2p/socket_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
6 #define CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_ 6 #define CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 28 matching lines...) Expand all
39 }; 39 };
40 40
41 explicit P2PSocketClient(P2PSocketDispatcher* dispatcher); 41 explicit P2PSocketClient(P2PSocketDispatcher* dispatcher);
42 42
43 // Initialize socket of the specified |type| and connected to the 43 // Initialize socket of the specified |type| and connected to the
44 // specified |address|. |address| matters only when |type| is set to 44 // specified |address|. |address| matters only when |type| is set to
45 // P2P_SOCKET_TCP_CLIENT. 45 // P2P_SOCKET_TCP_CLIENT.
46 void Init(P2PSocketType type, 46 void Init(P2PSocketType type,
47 const net::IPEndPoint& local_address, 47 const net::IPEndPoint& local_address,
48 const net::IPEndPoint& remote_address, 48 const net::IPEndPoint& remote_address,
49 Delegate* delegate, 49 Delegate* delegate);
50 scoped_refptr<base::MessageLoopProxy> delegate_loop);
51 50
52 // Send the |data| to the |address|. 51 // Send the |data| to the |address|.
53 void Send(const net::IPEndPoint& address, const std::vector<char>& data); 52 void Send(const net::IPEndPoint& address, const std::vector<char>& data);
54 53
55 // Must be called before the socket is destroyed. The delegate may 54 // Must be called before the socket is destroyed. The delegate may
56 // not be called after |closed_task| is executed. 55 // not be called after |closed_task| is executed.
57 void Close(); 56 void Close();
58 57
59 int socket_id() const { return socket_id_; } 58 int socket_id() const { return socket_id_; }
60 59
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 scoped_refptr<base::MessageLoopProxy> ipc_message_loop_; 101 scoped_refptr<base::MessageLoopProxy> ipc_message_loop_;
103 scoped_refptr<base::MessageLoopProxy> delegate_message_loop_; 102 scoped_refptr<base::MessageLoopProxy> delegate_message_loop_;
104 int socket_id_; 103 int socket_id_;
105 Delegate* delegate_; 104 Delegate* delegate_;
106 State state_; 105 State state_;
107 106
108 DISALLOW_COPY_AND_ASSIGN(P2PSocketClient); 107 DISALLOW_COPY_AND_ASSIGN(P2PSocketClient);
109 }; 108 };
110 109
111 #endif // CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_ 110 #endif // CONTENT_RENDERER_P2P_SOCKET_CLIENT_H_
OLDNEW
« no previous file with comments | « content/renderer/p2p/ipc_socket_factory.cc ('k') | content/renderer/p2p/socket_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698