31 Commits

Author SHA1 Message Date
johan
27c3d5b652 Restore thread name consistency for webrtc/p2p/ .
Thread variables were named worker_thread, while they actually
reference the network_thread introduced with the CLs below.

Original introduction of network_thread:
https://codereview.webrtc.org/1895813003
https://codereview.webrtc.org/1903393004

Renming of woker_thread_ to network_thread_ in P2PTransportChannel:
https://codereview.webrtc.org/2378573003

BUG=webrtc:6432

Review-Url: https://codereview.webrtc.org/2396513003
Cr-Commit-Position: refs/heads/master@{#14646}
2016-10-17 07:55:03 +00:00
Honghai Zhang
d93f50cd57 Add UMA metrics for ICE regathering reasons.
BUG=webrtc:6462
R=deadbeef@webrtc.org

Review URL: https://codereview.webrtc.org/2386783002 .

Cr-Commit-Position: refs/heads/master@{#14531}
2016-10-05 18:47:39 +00:00
Honghai Zhang
4cedf2b78c Add signaling to support ICE renomination.
By default, this will tell the remote side that I am supporting ICE renomination.
It does not use ICE renomination yet even if the remote side supports it.

R=deadbeef@webrtc.org, pthatcher@webrtc.org, skvlad@webrtc.org

Review URL: https://codereview.webrtc.org/2224563004 .

Cr-Commit-Position: refs/heads/master@{#13998}
2016-08-31 15:18:22 +00:00
zhihuang
9763d56464 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
Review-Url: https://codereview.webrtc.org/2166873002
Cr-Original-Commit-Position: refs/heads/master@{#13645}
Cr-Commit-Position: refs/heads/master@{#13657}
2016-08-05 18:14:54 +00:00
deadbeef
907abe4411 Revert of Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (patchset #8 id:280001 of https://codereview.webrtc.org/2166873002/ )
Reason for revert:
Reverting because it broke an RTP data channel test on the FYI bots.

Original issue's description:
> Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
>
> To allow end-to-end QuicDataChannel usage with a
> PeerConnection, RTCConfiguration has been modified to
> include a boolean for whether to do QUIC, since negotiation of
> QUIC is not implemented. If one peer does QUIC, then it will be
> assumed that the other peer must do QUIC or the connection
> will fail.
>
> PeerConnection has been modified to create data channels of type
> QuicDataChannel when the peer wants to do QUIC.
>
> WebRtcSession has ben modified to use a QuicDataTransport
> instead of a DtlsTransportChannelWrapper/DataChannel
> when QUIC should be used
>
> QuicDataTransport implements the generic functions of
> BaseChannel to manage the QuicTransportChannel.
>
> Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
> Cr-Commit-Position: refs/heads/master@{#13645}

TBR=pthatcher@webrtc.org,zhihuang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2206793007
Cr-Commit-Position: refs/heads/master@{#13647}
2016-08-04 19:22:22 +00:00
zhihuang
34b54c36a5 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Review-Url: https://codereview.webrtc.org/2166873002
Cr-Commit-Position: refs/heads/master@{#13645}
2016-08-04 18:06:58 +00:00
zhihuang
f2c2f8f20c Refactoring on QUIC related classes.
Merge with the latest webrtc native code.
Remove deprecated function Connect() in QuicTransportChannel.
Fix the compiling issue and broken unit tests by adding the network thread to QUIC related classes.

Review-Url: https://codereview.webrtc.org/2089553002
Cr-Commit-Position: refs/heads/master@{#13472}
2016-07-13 21:13:56 +00:00
deadbeef
a2cd636b3d Revert of Modify PeerConnection for end-to-end QuicDataChannel usage (patchset #4 id:60001 of https://codereview.webrtc.org/2089553002/ )
Reason for revert:
Reverting because description was inaccurate. Will reland after updating description.

Original issue's description:
> Modify PeerConnection for end-to-end QuicDataChannel usage
>
> To allow end-to-end QuicDataChannel usage with a
> PeerConnection, RTCConfiguration has been modified to
> include a boolean for whether to do QUIC, since negotiation of
> QUIC is not implemented. If one peer does QUIC, then it will be
> assumed that the other peer must do QUIC or the connection
> will fail.
>
> PeerConnection has been modified to create data channels of type
> QuicDataChannel when the peer wants to do QUIC.
>
> WebRtcSession has been modified to use a QuicTransportChannel
> instead of a DtlsTransportChannelWrapper/DataChannel
> when QUIC should be used.
>
> Modification of previous in-flight CL: https://codereview.chromium.org/1844803002/
>
> Committed: https://crrev.com/36c8d69ce188102ae6fd48c371cf1518f08698fb
> Cr-Commit-Position: refs/heads/master@{#13470}

TBR=pthatcher@webrtc.org,zhihuang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2146133002
Cr-Commit-Position: refs/heads/master@{#13471}
2016-07-13 20:57:41 +00:00
zhihuang
36c8d69ce1 Modify PeerConnection for end-to-end QuicDataChannel usage
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has been modified to use a QuicTransportChannel
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used.

Modification of previous in-flight CL: https://codereview.chromium.org/1844803002/

Review-Url: https://codereview.webrtc.org/2089553002
Cr-Commit-Position: refs/heads/master@{#13470}
2016-07-13 20:35:45 +00:00
Taylor Brandstetter
6bb1ef2b86 Fixing bug where Connection drops packets when presumed writable.
The "should I simulate EWOULDBLOCK?" determination now happens
solely in P2PTransportChannel. This also fixes a bug where the
"last packet id" was set even if no packet was sent.

R=honghaiz@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2099783002 .

Cr-Commit-Position: refs/heads/master@{#13307}
2016-06-28 01:09:10 +00:00
Taylor Brandstetter
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

R=pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2019423006 .

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
Honghai Zhang
1590c3937c Fire a signal when the transport channel state changes
This fixes an issue that sometimes the transport channel state changes but
the transportcontroller is not notified.

BUG=5907
R=deadbeef@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1996693002 .

Cr-Commit-Position: refs/heads/master@{#12880}
2016-05-24 20:15:14 +00:00
kwiberg
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00
kwiberg
6ab3db249b Revert of Remove webrtc/base/scoped_ptr.h (patchset #3 id:100001 of https://codereview.webrtc.org/1942823002/ )
Reason for revert:
Breaks user code. Said code needs to stop using scoped_ptr!

Original issue's description:
> Remove webrtc/base/scoped_ptr.h
>
> BUG=webrtc:5520
>
> NOTRY=True
>
> Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a
> Cr-Commit-Position: refs/heads/master@{#12684}

TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1965063003
Cr-Commit-Position: refs/heads/master@{#12686}
2016-05-11 12:07:33 +00:00
kwiberg
65fc62e9dd Remove webrtc/base/scoped_ptr.h
BUG=webrtc:5520

NOTRY=True

Review-Url: https://codereview.webrtc.org/1942823002
Cr-Commit-Position: refs/heads/master@{#12684}
2016-05-11 11:29:38 +00:00
kwiberg
bfefb03ec1 Replace scoped_ptr with unique_ptr everywhere
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1937693002
Cr-Commit-Position: refs/heads/master@{#12581}
2016-05-01 21:53:55 +00:00
mikescarlett
e7748674ee Allow TransportController to create a QuicTransportChannel
A QuicTransport is implemented that subclasses Transport
and takes ownership of the QuicTransportChannel/P2PTransportChannel.

Split from CL https://codereview.webrtc.org/1844803002/.

BUG=

Review-Url: https://codereview.webrtc.org/1856943002
Cr-Commit-Position: refs/heads/master@{#12575}
2016-04-30 03:21:04 +00:00
mikescarlett
70035cae4d Fix QuicSession to unbuffer data when the QuicTransportChannel reconnects
The QuicWriteBlockedList needs to register outgoing QUIC
streams so that when the QuicTransportChannel becomes
unwritable and QUIC streams have buffered data, they can
send data once the QuicTransportChannel becomes writable.

Otherwise the QUIC streams will remain write blocked
after the QuicTransportChannel is writable.

BUG=

Review-Url: https://codereview.webrtc.org/1888903002
Cr-Commit-Position: refs/heads/master@{#12573}
2016-04-30 01:14:47 +00:00
mikescarlett
8d37d2941e Update QuicTransportChannel to latest version of libquic (Chromium: f03d2c62)
These changes are necessary to incorporate the latest
changes to QUIC sessions and the QUIC crypto handshake.

BUG=

Review-Url: https://codereview.webrtc.org/1910633003
Cr-Commit-Position: refs/heads/master@{#12571}
2016-04-29 22:35:09 +00:00
kwiberg
3ec4679dd2 Replace scoped_ptr with unique_ptr in webrtc/p2p/
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1923163003

Cr-Commit-Position: refs/heads/master@{#12532}
2016-04-27 14:22:58 +00:00
kwiberg
4485ffb58d #include "webrtc/base/constructormagic.h" where appropriate
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.

Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1917043005

Cr-Commit-Position: refs/heads/master@{#12509}
2016-04-26 15:14:48 +00:00
mikescarlett
47e381b8c1 Make ReliableQuicStream::Write use base::StringPiece, not std::string
Minor change; necesary to eliminate an O(N) performance penalty every
time ReliableQuicStream::Write is called.

TBR=pthatcher@webrtc.org

BUG=

Review URL: https://codereview.webrtc.org/1886383002

Cr-Commit-Position: refs/heads/master@{#12367}
2016-04-14 18:12:51 +00:00
mikescarlett
18b67a59ea Add QuicTransportChannel methods for QUIC streams
The QuicTransportChannel now creates outgoing QUIC streams
for sending a message, and incoming QUIC streams for
receiving a message. It also signals when the QUIC connection
closes.

Split from CL https://codereview.webrtc.org/1844803002/.

BUG=

Review URL: https://codereview.webrtc.org/1856513002

Cr-Commit-Position: refs/heads/master@{#12323}
2016-04-11 23:56:26 +00:00
Honghai Zhang
52dce73fac Add the last_sent_packet_id to the candidate pair change signal
so that the call knows which packet ids were sent on the previous candidate pair.
Note that packet_id is actually 16bits, so we can use -1 for values that are not set.

Also moved the tests for candidate pair changes to TestSelectConnectionBeforeNomination.

BUG=
R=deadbeef@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1842093002 .

Cr-Commit-Position: refs/heads/master@{#12184}
2016-03-31 19:37:40 +00:00
Honghai Zhang
cc411c0599 Reset the BWE when the network changes.
Currently "Resetting the BWE" does nothing yet. This CL passes the correct signaling to the bandwidth estimator.

BUG=
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1803063004 .

Cr-Commit-Position: refs/heads/master@{#12154}
2016-03-30 00:27:36 +00:00
mikescarlett
f537768497 Update QuicTransportChannel to latest version of libquic
This CL integrates recent Chromium changes that were merged
into https://github.com/devsisters/libquic/tree/master.

It also performs minor cleanup, such as removing accidental
usage of Chromium logging symbols (e.g. LOG(INFO),
LOG(ERROR) instead of LOG(LS_INFO), LOG(LS_ERROR)) and
using Chromium's scoped_ptr instead of rtc::scoped_ptr.

BUG=

Review URL: https://codereview.webrtc.org/1834233002

Cr-Commit-Position: refs/heads/master@{#12146}
2016-03-29 19:15:03 +00:00
mikescarlett
6459f84766 Create QuicTransportChannel
This new class allows usage of a QuicSession to establish a QUIC handshake.

BUG=

Review URL: https://codereview.webrtc.org/1721673004

Cr-Commit-Position: refs/heads/master@{#11873}
2016-03-04 17:55:09 +00:00
mikescarlett
b9dd7c5b3a Remove GetTransport() from TransportChannelImpl
This appears to be dead code because GetTransport() is not used by WebRTC. It also adds dead code to DtlsTransportChannelWrapper and P2PTransportChannel.

BUG=

Committed: https://crrev.com/ee18220ddd783fad9812f1c1c195bf187a631c3a
Cr-Commit-Position: refs/heads/master@{#11662}

Review URL: https://codereview.webrtc.org/1691673002

Cr-Commit-Position: refs/heads/master@{#11695}
2016-02-20 04:43:49 +00:00
guidou
74db777d64 Revert of Remove GetTransport() from TransportChannelImpl (patchset #3 id:40001 of https://codereview.webrtc.org/1691673002/ )
Reason for revert:
This CL is breaking a lot of FYI bots.
The specific change that breaks bots is the removal of a constructor parameter.

See, for example: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/3572/steps/compile/logs/stdio

Original issue's description:
> Remove GetTransport() from TransportChannelImpl
>
> This appears to be dead code because GetTransport() is not used by WebRTC. It also adds dead code to DtlsTransportChannelWrapper and P2PTransportChannel.
>
> BUG=
>
> Committed: https://crrev.com/ee18220ddd783fad9812f1c1c195bf187a631c3a
> Cr-Commit-Position: refs/heads/master@{#11662}

TBR=pthatcher@webrtc.org,mikescarlett@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.webrtc.org/1709953002

Cr-Commit-Position: refs/heads/master@{#11665}
2016-02-18 09:57:56 +00:00
mikescarlett
ee18220ddd Remove GetTransport() from TransportChannelImpl
This appears to be dead code because GetTransport() is not used by WebRTC. It also adds dead code to DtlsTransportChannelWrapper and P2PTransportChannel.

BUG=

Review URL: https://codereview.webrtc.org/1691673002

Cr-Commit-Position: refs/heads/master@{#11662}
2016-02-17 23:20:22 +00:00
mikescarlett
cd0e4751b2 Create QuicSession
This CL depends on the unofficial libquic (https://github.com/devsisters/libquic), with subtle modifications.

BUG=

Review URL: https://codereview.webrtc.org/1648763002

Cr-Commit-Position: refs/heads/master@{#11530}
2016-02-09 01:35:55 +00:00