304 Commits

Author SHA1 Message Date
deadbeef
e84cd2eaca Cache a ClientHello received before the DTLS handshake has started.
In some cases, the DTLS ClientHello may arrive before the server's
transport is writable (before it receives a STUN ping response), or
even before it receives a remote fingerprint. If this packet is
discarded, it may take a second for a it to be sent again.

So, this CL caches it instead of dropping it, and feeds it into
the SSL library once the handshake has been started.

BUG=webrtc:5789

Review-Url: https://codereview.webrtc.org/1912323002
Cr-Commit-Position: refs/heads/master@{#12634}
2016-05-05 00:16:39 +00:00
Honghai Zhang
5a2463796e Do not stop a session unless the candidate of a writable connection belongs to the
latest generation.

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

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

Cr-Commit-Position: refs/heads/master@{#12599}
2016-05-03 00:28:42 +00:00
nisse
1bffc1d1a4 Rename rtc::Time64 --> rtc::TimeMillis.
In the discussion on https://codereview.webrtc.org/1888593004/, a more
decriptive name was suggested for Time64.

BUG=webrtc:5740

Review-Url: https://codereview.webrtc.org/1923213002
Cr-Commit-Position: refs/heads/master@{#12594}
2016-05-02 15:19:00 +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
nisse
ef8b61e110 Enable -Winconsistent-missing-override flag.
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
2016-04-29 13:09:23 +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
jbauch
555604a746 Replace scoped_ptr with unique_ptr in webrtc/base/
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12501}
2016-04-26 10:13:28 +00:00
Taylor Brandstetter
0a1bc53758 Update prflx candidates' generation when setting ICE credentials.
If a STUN ping arrives before the remote description does, a prflx
candidate will be created with an unknown generation.

Once the remote description does arrive, the candidate's generation
should be set so it can be sorted properly, and replaced by a non-prflx
candidate once the candidate is signaled.

BUG=webrtc:5752
R=honghaiz@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12433}
2016-04-20 01:03:35 +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
zhihuang
3ba4d53379 Remove the if condition block in the function Transport::ConnectChannels. It will not be triggered anymore.
Review URL: https://codereview.webrtc.org/1844133002

Cr-Commit-Position: refs/heads/master@{#12321}
2016-04-11 22:10:57 +00:00
kwiberg
b4d01c4ded A bunch of interfaces: Return scoped_ptr<SSLCertificate>
Instead of using a raw pointer output parameter. This affects

  SSLStreamAdapter::GetPeerCertificate
  Transport::GetRemoteSSLCertificate
  TransportChannel::GetRemoteSSLCertificate
  TransportController::GetRemoteSSLCertificate
  WebRtcSession::GetRemoteSSLCertificate

This is a good idea in general, but will also be very convenient when
scoped_ptr is gone, since unique_ptr doesn't have an .accept() method.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12262}
2016-04-06 12:15:11 +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
kjellander
00984ff688 Reland of move {media,p2p,pc,xmllite,xmpp}_tests.gypi files. (patchset #1 id:1 of https://codereview.webrtc.org/1846693002/ )
The re-land moves the isolate build targets for media.gyp
and pc.gyp into the include_tests==1 condition.
This has been tested in a Chromium checkout and no longer
causes the error that was seen after landing
https://codereview.webrtc.org/1839763004/

Original issue's description:
> Revert of Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files. (patchset #1 id:1 of https://codereview.webrtc.org/1839763004/ )
>
> Reason for revert:
> Breaks Chromium: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/11313/steps/gclient%20runhooks/logs/stdio:
>
> Updating projects from gyp files...
> Using overrides found in /Users/chrome-bot/.gyp/include.gypi
> Traceback (most recent call last):
>   File "src/build/gyp_chromium", line 12, in <module>
>     execfile(__file__ + '.py')
>   File "src/build/gyp_chromium.py", line 341, in <module>
>     sys.exit(main())
>   File "src/build/gyp_chromium.py", line 328, in main
>     gyp_rc = gyp.main(args)
>   File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 538, in main
>     return gyp_main(args)
>   File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
>     options.duplicate_basename_check)
>   File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 130, in Load
>     params['parallel'], params['root_targets'])
>   File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 2800, in Load
>     RemoveLinkDependenciesFromNoneTargets(targets)
>   File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 1510, in RemoveLinkDependenciesFromNoneTargets
>     if targets[t].get('variables', {}).get('link_dependency', 0):
> KeyError: '/b/build/slave/Mac_Builder/build/src/third_party/webrtc/media/media.gyp:rtc_media_unittests#target'
> Error: Command '/usr/bin/python src/build/gyp_chromium' returned non-zero exit status 1 in /b/build/slave/Mac_Builder/build
> Hook '/usr/bin/python src/build/gyp_chromium' took 20.29 secs
>
> Original issue's description:
> > Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files.
> >
> > These contributes to circular dependency problems in WebRTC
> > since one have to depend on webrtc.gyp in order to depend on
> > a target in them.
> >
> > This reduces the number of cyclic dependencies in WebRTC from 21
> > to 16.
> >
> > BUG=webrtc:4243
> > NOTRY=True
> > NOPRESUBMIT=True
> >
> > Committed: https://crrev.com/231b69f28dd22f4e2d98e5048f8eaae7b20915e6
> > Cr-Commit-Position: refs/heads/master@{#12166}
>
> TBR=pthatcher@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4243
>
> Committed: https://crrev.com/72644d2cf6b14bbc4a107f79158eaa225f3196b5
> Cr-Commit-Position: refs/heads/master@{#12167}

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

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

Cr-Commit-Position: refs/heads/master@{#12180}
2016-03-31 14:23:52 +00:00
Honghai Zhang
82f132c90a Signal ready-to-send when switching to a writable connection.
BUG=webrtc:5705
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12168}
2016-03-30 19:55:25 +00:00
kjellander
72644d2cf6 Revert of Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files. (patchset #1 id:1 of https://codereview.webrtc.org/1839763004/ )
Reason for revert:
Breaks Chromium: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/11313/steps/gclient%20runhooks/logs/stdio:

Updating projects from gyp files...
Using overrides found in /Users/chrome-bot/.gyp/include.gypi
Traceback (most recent call last):
  File "src/build/gyp_chromium", line 12, in <module>
    execfile(__file__ + '.py')
  File "src/build/gyp_chromium.py", line 341, in <module>
    sys.exit(main())
  File "src/build/gyp_chromium.py", line 328, in main
    gyp_rc = gyp.main(args)
  File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 2800, in Load
    RemoveLinkDependenciesFromNoneTargets(targets)
  File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 1510, in RemoveLinkDependenciesFromNoneTargets
    if targets[t].get('variables', {}).get('link_dependency', 0):
KeyError: '/b/build/slave/Mac_Builder/build/src/third_party/webrtc/media/media.gyp:rtc_media_unittests#target'
Error: Command '/usr/bin/python src/build/gyp_chromium' returned non-zero exit status 1 in /b/build/slave/Mac_Builder/build
Hook '/usr/bin/python src/build/gyp_chromium' took 20.29 secs

Original issue's description:
> Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files.
>
> These contributes to circular dependency problems in WebRTC
> since one have to depend on webrtc.gyp in order to depend on
> a target in them.
>
> This reduces the number of cyclic dependencies in WebRTC from 21
> to 16.
>
> BUG=webrtc:4243
> NOTRY=True
> NOPRESUBMIT=True
>
> Committed: https://crrev.com/231b69f28dd22f4e2d98e5048f8eaae7b20915e6
> Cr-Commit-Position: refs/heads/master@{#12166}

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

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

Cr-Commit-Position: refs/heads/master@{#12167}
2016-03-30 18:54:14 +00:00
kjellander
231b69f28d Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files.
These contributes to circular dependency problems in WebRTC
since one have to depend on webrtc.gyp in order to depend on
a target in them.

This reduces the number of cyclic dependencies in WebRTC from 21
to 16.

BUG=webrtc:4243
NOTRY=True
NOPRESUBMIT=True

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

Cr-Commit-Position: refs/heads/master@{#12166}
2016-03-30 18:40:38 +00:00
jbauch
f1f87203d7 Split ByteBuffer into writer/reader objects.
This allows the reader to reference data, thus avoiding unnecessary
allocations and memory copies.

BUG=webrtc:5155,webrtc:5670

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

Cr-Commit-Position: refs/heads/master@{#12160}
2016-03-30 13:43:44 +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
honghaiz
a0c44eaa82 Add 16-bit network id to the candidate signaling.
Also include that in the stun-ping request as part of the
network-info attribute.
Change the network cost to be 16 bits.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12110}
2016-03-23 23:07:54 +00:00
kwiberg
1d50ee44fd Stop using some scoped_ptr features that unique_ptr doesn't have
No operator== that accepts one unique_ptr<T> and one T*. No implicit
conversion to bool. No rtc_make_scoped_ptr function.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12048}
2016-03-18 05:54:49 +00:00
kjellander@webrtc.org
94a23f04af Reland "Add check_deps rules in DEPS files."
Relanding https://codereview.webrtc.org/1796413002/
without the change to the openmax_dl include path
(which broke downstream code).

TBR=tommi@webrtc.org
BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc

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

Cr-Commit-Position: refs/heads/master@{#12031}
2016-03-17 11:05:50 +00:00
honghaiz
34b11eb66e Using 64-bit timestamp to replace the 32-bit one in webrtc/p2p.
Also changed from unsigned to signed integer per the style guide.
By the way, I kept all delta-times to be 32-bit int.

The only things left in the p2p dir are
1. proberprober/main.cc where Time() is used as the input for a random number.
2. pseudotcp.cc: where 32-bit time info is sent over the wire.

BUG=webrtc:5636

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

Cr-Commit-Position: refs/heads/master@{#12019}
2016-03-16 15:55:48 +00:00
kjellander
56cf60e717 Revert of Add check_deps rules in DEPS files. (patchset #2 id:60001 of https://codereview.webrtc.org/1796413002/ )
Reason for revert:
The openmax_dl include change breaks downstream projects.

Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}

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

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

Cr-Commit-Position: refs/heads/master@{#12009}
2016-03-16 00:41:04 +00:00
kjellander@webrtc.org
086f851b7b Add check_deps rules in DEPS files.
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.

Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'

will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.

BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12008}
2016-03-16 00:22:53 +00:00
kwiberg
6baec0351a Port::GetStunMessage: Write to scoped_ptr instead of raw pointer
This is a good idea in general, because it makes ownership clearer,
but will also be very convenient when scoped_ptr is gone, since
unique_ptr doesn't have an .accept() method.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12002}
2016-03-15 18:09:59 +00:00
Honghai Zhang
7fb69db670 Reland the CL to remove candidates when doing continual gathering
When doing candidate re-gathering in the same ICE generation, signal the remote side to remove its remote candidates.

Fixed the pure virtual method in jsep.h

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

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

Cr-Commit-Position: refs/heads/master@{#11985}
2016-03-14 18:59:34 +00:00
tommi
6f59a4fc4f Revert of Remove candidates when doing continual gathering (patchset #15 id:560001 of https://codereview.webrtc.org/1648813004/ )
Reason for revert:
Breaks the build.  Suggest we reland with a default implementation of the new method, update Chrome, land a change that changes |{}| -> |= 0;|

Here's the error:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=262839-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DOSX -DWEBRTC_MAC -DWEBRTC_POSIX -DXML_STATIC -DWEBRTC_CHROMIUM_BUILD -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/khronos -I../../gpu -I../../skia/config -Igen/angle -I../../third_party/WebKit/Source -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -Igen/ui/resources -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/WebKit -I../../ipc -I../../third_party/opus/src/include -I../../third_party/WebKit -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../v8/include -I../../third_party/webrtc_overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../third_party -I../../third_party/expat/files/lib -I../../third_party/libvpx/source/libvpx -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -fcolor-diagnostics -fno-strict-aliasing  -c ../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc -o obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o
../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc:404:14: error: allocating an object of abstract class type 'content::MockSessionDescription'
  return new MockSessionDescription(type, sdp);
             ^
../../third_party/webrtc/api/jsep.h💯18: note: unimplemented pure virtual method 'RemoveCandidates' in 'MockSessionDescription'
  virtual size_t RemoveCandidates(
                 ^
1 error generated.
ninja: build stopped: subcommand failed.

Original issue's description:
> When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
> and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.
>
> BUG=
>
> Committed: https://crrev.com/84430da6817ce69c53bfad088be5c9df8b420f01
> Cr-Commit-Position: refs/heads/master@{#11958}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,glaznev@webrtc.org,honghaiz@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/1785613011

Cr-Commit-Position: refs/heads/master@{#11960}
2016-03-11 22:05:15 +00:00
honghaiz
84430da681 When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11958}
2016-03-11 21:28:12 +00:00
torbjorng
43166b8adf Add IsAcceptableCipher, use instead of GetDefaultCipher.
The old code insists on exact cipher suite matches with hardwired expectations. It does this matching parameterized with key type (RSA vs ECDSA) and TLS version (DTLS vs TLS and version 1.0 vs 1.2).

This CL changes things to check against a white-list of cipher suites, with the check parameterized with key type (again RSA vs ECDSA). Then separately checks TLS version since the old implicit check of TLS version by means of resulting cipher suite was too blunt.

Using a white list for cipher suites isn't perfect, but it is safe and requires minimal maintenance. It allows compatibility with not just one exact version of underlying crypto lib, but any version with reasonable defaults.

The CL also re-enables critical tests which had to be disabled recently to allow a boringssl roll.

BUG=webrtc:5634

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

Cr-Commit-Position: refs/heads/master@{#11951}
2016-03-11 08:06:55 +00:00
kjellander
43942d1f1e Roll chromium_revision 508edd3..35d57a0 (379249:379535)
Change log: 508edd3..35d57a0
Full diff: 508edd3..35d57a0

Changed dependencies:
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/708db16..58218b6
DEPS diff: 508edd3..35d57a0/DEPS

No update to Clang.

TBR=torbjorng@webrtc.org
BUG=webrtc:5634
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11890}
2016-03-07 21:59:15 +00:00
Honghai Zhang
049fbb1883 Renaming variables in p2ptransportchannel to be consistent.
Also change the type of "time interval" to int from uint32.
Fixed a few TODO therein. I think we should have the following convention:
1. All time delay/intervals should have type int although the time instant should have time uint32_t.
2. "interval" is preferred to "delay" if the delay will be repeated (like rescheduling).

BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11888}
2016-03-07 19:13:15 +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
honghaiz
e2af9ef638 Keep on sending stun binding requests on zero-cost networks.
This is useful to keep the NAT binding alive on backup connections.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11862}
2016-03-03 16:27:53 +00:00
guoweis
36f0137fd5 Implement Turn/Turn first logic for connection selection.
This feature is off by default and can be turned on by setting IceConfig. When turned on, we'll choose a Turn/Turn (UDP takes higher priroity) over the other types of connections while no any connection is writable. However, when there is best connection or there is pending triggered check, those will take higher priority.

BUG=webrtc:4591

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

Cr-Commit-Position: refs/heads/master@{#11850}
2016-03-03 02:02:58 +00:00
kjellander
f475277547 Rename constants files in webrtc/{media,p2p}
Multiple sources with the same names forces ugly GYP hacks in
Chromium's libjingle.gyp. Rename the sources in WebRTC to
enable cleaning this up in Chromium.

To summarize:
webrtc/media/base/constants.{cc,h} -> mediaconstants.{cc,h}
webrtc/p2p/base/constants.{cc,h} -> p2pconstants.{cc,h}

This CL will require coordinating landing a roll in Chromium.

BUG=webrtc:4256
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11842}
2016-03-02 13:42:35 +00:00
guoweis
4cc9f98e4c Fix bug 574524: DtlsTransportChannel crashes after SSL closes remotely
When remote side closes, opensslstreamadapter could return SR_EOS which will not trigger upper layer to clean up what's left in the StreamInterfaceChannel. The result of this is when there are more packets coming in, the Write on the StreamInterfaceChannel will overflow the buffer.

The fix here is that when receiving the remote side close signal, we also close the underneath StreamInterfaceChannel which will clean up the queue to prevent overflow.

BUG=574524
TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11751}
2016-02-24 19:10:09 +00:00
deadbeef
0ed85b2ee3 Track pending ICE restarts independently for different media sections.
RFC 5245 allows an ICE restart to occur on only one media section.
However, before this CL, if an endpoint attempted to do this, we would
change our local ICE ufrag/pwd in every media section.

Also did some refactoring, turning the transport options from
mediasesion.h into a map.

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

Cr-Commit-Position: refs/heads/master@{#11728}
2016-02-24 01:24:59 +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
honghaiz
e3c6c82717 When doing continual gathering, remove the local ports when a corresponding network is dropped.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11660}
2016-02-17 21:00:35 +00:00
honghaiz
e1a0c942d6 Add network cost as part of the connection ranking.
For now, the network cost is purely based on the network type (cellular has cost 0xFFFF and everything else has cost 0).
Add cost to the candidate signaling and the stun request signaling (which is needed for peer reflexive candidates).
BUG=webrtc:4325

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

Cr-Commit-Position: refs/heads/master@{#11642}
2016-02-16 22:55:01 +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
honghaiz
c463e20069 Reset TURN port NONCE when a new socket is created.
For example, when the TURN port has an ALLOCATE_MISMATCH error.

BUG=webrtc:5432

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

Cr-Commit-Position: refs/heads/master@{#11453}
2016-02-01 23:19:24 +00:00