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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 7604014: Renamed authorized_ to connected_ for p2p sockets host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comments 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 56d74a2fac4c052276813712a131664b59c3cc15..2c09a2eebc8f4c096d00639beb2a0304cf4a0e98 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -21,7 +21,7 @@ const int kPacketHeaderSize = sizeof(uint16);
P2PSocketHostTcp::P2PSocketHostTcp(IPC::Message::Sender* message_sender,
int routing_id, int id)
: P2PSocketHost(message_sender, routing_id, id),
- authorized_(false),
+ connected_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(
connect_callback_(this, &P2PSocketHostTcp::OnConnected)),
ALLOW_THIS_IN_INITIALIZER_LIST(
@@ -135,11 +135,11 @@ void P2PSocketHostTcp::OnRead(int result) {
}
void P2PSocketHostTcp::OnPacket(std::vector<char>& data) {
- if (!authorized_) {
+ if (!connected_) {
P2PSocketHost::StunMessageType type;
bool stun = GetStunPacketType(&*data.begin(), data.size(), &type);
if (stun && IsRequestOrResponse(type)) {
- authorized_ = true;
+ connected_ = true;
} else if (!stun || type == STUN_DATA_INDICATION) {
LOG(ERROR) << "Received unexpected data packet from "
<< remote_address_.ToString()
@@ -207,7 +207,7 @@ void P2PSocketHostTcp::Send(const net::IPEndPoint& to,
return;
}
- if (!authorized_) {
+ if (!connected_) {
P2PSocketHost::StunMessageType type;
bool stun = GetStunPacketType(&*data.begin(), data.size(), &type);
if (!stun || type == STUN_DATA_INDICATION) {
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.h ('k') | content/browser/renderer_host/p2p/socket_host_udp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698