28 Commits

Author SHA1 Message Date
Emad Omara
cb79d23c9b Add common TLS extensions
Bug: webrtc:8019
Change-Id: Ic60e892f0acbe394472319c4d943690828446610
Reviewed-on: https://chromium-review.googlesource.com/580261
Commit-Queue: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19106}
2017-07-21 00:10:31 +00:00
ehmaldonado
f6a861ab6c Remove remains of webrtc/base
All downstream code have been updated to the new location.

In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS

Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn

BUG=webrtc:7634
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
2017-07-19 17:40:47 +00:00
Steve Anton
300bf8e14b Reinstate "API for periodically regathering ICE candidates"
Use rtc::SystemTimeNanos() instead of std::random_device() for PRNG seed
to avoid crashing when /dev/urandom is unavailable.

This reverts commit 3beb20720db349f651c2c04970c45b1b171c025c.

Bug: webrtc:7969
Change-Id: I5ed58a789939ee4caa99ac3abf9cab18e3e19c69
Reviewed-on: https://chromium-review.googlesource.com/572070
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19033}
2017-07-14 22:26:05 +00:00
tommi
e7251599a3 Reland of Make the default ctor of rtc::Thread, protected
This is a partial re-land. The change doesn't make the default Thread ctor protected anymore but it does mark it as deprecated and updates all use of it in WebRTC.

Original issue's description:

Make the default ctor of rtc::Thread, protected.
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.

The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.

BUG=none

Review-Url: https://codereview.webrtc.org/2977953002
Cr-Commit-Position: refs/heads/master@{#19031}
2017-07-14 21:44:46 +00:00
Magnus Jedvert
3beb20720d Revert "API for periodically regathering ICE candidates"
This reverts commit aa41f0cfa64ece911ae2ecee83fc3190d4a42935.

Reason for revert:
Apparently, use of std::random_device() causes chromium on Linux to fail with this error:
terminating with uncaught exception of type std::__1::system_error: random_device failed to open /dev/urandom: Operation not permitted

Link to bot with failure:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Tester/builds/37563

Original change's description:
> API for periodically regathering ICE candidates
> 
> Adds to the RTCConfiguration `ice_regather_interval_range` which, when
> set, specifies the randomized delay between automatic runs of ICE
> regathering. The regathering will occur on all networks and re-use the
> existing ICE ufrag/password. New connections are established once the
> candidates come back and WebRTC will automatically switch to the new
> connection that corresponds to the currently selected connection.
> 
> Bug: webrtc:7969
> Change-Id: I6bbf5439a48e285f704aed9f408631cba038c82b
> Reviewed-on: https://chromium-review.googlesource.com/562505
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18978}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,steveanton@webrtc.org

No-Try: true
Bug: webrtc:7969
Change-Id: I86ef99e9f1070d3ac265398831317b68f562c614
Reviewed-on: https://chromium-review.googlesource.com/571008
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19024}
2017-07-14 15:42:02 +00:00
charujain
a117b04113 Revert of Make the default ctor of rtc::Thread, protected (patchset #3 id:40001 of https://codereview.webrtc.org/2981623002/ )
Reason for revert:
Break projects.

Original issue's description:
> Make the default ctor of rtc::Thread, protected.
> The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.
>
> The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2981623002
> Cr-Commit-Position: refs/heads/master@{#19001}
> Committed: a8a3515997

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

Review-Url: https://codereview.webrtc.org/2979963002
Cr-Commit-Position: refs/heads/master@{#19003}
2017-07-13 14:06:39 +00:00
tommi
a8a3515997 Make the default ctor of rtc::Thread, protected.
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.

The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.

BUG=none

Review-Url: https://codereview.webrtc.org/2981623002
Cr-Commit-Position: refs/heads/master@{#19001}
2017-07-13 12:47:25 +00:00
deadbeef
be7e9c6047 Reland of Make "set_ignore_non_default_routes" actually use its argument. (patchset #1 id:1 of https://codereview.webrtc.org/2974193002/ )
Reason for revert:
Wasn't actually the source of the memcheck issue, so relanding.

Original issue's description:
> Revert of Make "set_ignore_non_default_routes" actually use its argument. (patchset #1 id:1 of https://codereview.webrtc.org/2974873002/ )
>
> Reason for revert:
> Breaks Linux memcheck bot.
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7973
>
> Original issue's description:
> > Make "set_ignore_non_default_routes" actually use its argument.
> >
> > It takes a bool argument, but unconditionally sets the flag to "true".
> > Since no comment is left to offer an explanation, I'm assuming this was
> > an accident.
> >
> > BUG=webrtc:7716
> > TBR=pthatcher@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2974873002
> > Cr-Commit-Position: refs/heads/master@{#18959}
> > Committed: 05314c3252
>
> TBR=pthatcher@webrtc.org,pthatcher@google.com,deadbeef@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7716
>
> Review-Url: https://codereview.webrtc.org/2974193002
> Cr-Commit-Position: refs/heads/master@{#18964}
> Committed: 1e50748d47

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

Review-Url: https://codereview.webrtc.org/2979803002
Cr-Commit-Position: refs/heads/master@{#18982}
2017-07-12 03:07:37 +00:00
deadbeef
8290ddfbce Revert of Delete SignalThread class. (patchset #20 id:380001 of https://codereview.webrtc.org/2915253002/ )
Reason for revert:
Seems to be causing new crashes, possibly because of changes to the "Destroy(false)" behavior. Will re-land after investigating these crashes more and addressing the root cause.

Original issue's description:
> Delete SignalThread class.
>
> Rewrite AsyncResolver to use PlatformThread directly, not
> SignalThread, and update includes of peerconnection client to not
> depend on signalthread.h.
>
> BUG=webrtc:6424,webrtc:7723
>
> Review-Url: https://codereview.webrtc.org/2915253002
> Cr-Commit-Position: refs/heads/master@{#18833}
> Committed: bc8feda1db

TBR=tommi@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
NOPRESUBMIT=true
NOTRY=true
BUG=webrtc:6424,webrtc:7723

Review-Url: https://codereview.webrtc.org/2979733002
Cr-Commit-Position: refs/heads/master@{#18980}
2017-07-11 23:56:05 +00:00
Steve Anton
aa41f0cfa6 API for periodically regathering ICE candidates
Adds to the RTCConfiguration `ice_regather_interval_range` which, when
set, specifies the randomized delay between automatic runs of ICE
regathering. The regathering will occur on all networks and re-use the
existing ICE ufrag/password. New connections are established once the
candidates come back and WebRTC will automatically switch to the new
connection that corresponds to the currently selected connection.

Bug: webrtc:7969
Change-Id: I6bbf5439a48e285f704aed9f408631cba038c82b
Reviewed-on: https://chromium-review.googlesource.com/562505
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18978}
2017-07-11 21:49:38 +00:00
sprang
1e50748d47 Revert of Make "set_ignore_non_default_routes" actually use its argument. (patchset #1 id:1 of https://codereview.webrtc.org/2974873002/ )
Reason for revert:
Breaks Linux memcheck bot.
https://bugs.chromium.org/p/webrtc/issues/detail?id=7973

Original issue's description:
> Make "set_ignore_non_default_routes" actually use its argument.
>
> It takes a bool argument, but unconditionally sets the flag to "true".
> Since no comment is left to offer an explanation, I'm assuming this was
> an accident.
>
> BUG=webrtc:7716
> TBR=pthatcher@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2974873002
> Cr-Commit-Position: refs/heads/master@{#18959}
> Committed: 05314c3252

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

Review-Url: https://codereview.webrtc.org/2974193002
Cr-Commit-Position: refs/heads/master@{#18964}
2017-07-11 10:45:59 +00:00
deadbeef
05314c3252 Make "set_ignore_non_default_routes" actually use its argument.
It takes a bool argument, but unconditionally sets the flag to "true".
Since no comment is left to offer an explanation, I'm assuming this was
an accident.

BUG=webrtc:7716
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2974873002
Cr-Commit-Position: refs/heads/master@{#18959}
2017-07-11 02:52:28 +00:00
ehmaldonado
370dd47973 Revert of Remove remains of webrtc/base (patchset #7 id:120001 of https://codereview.webrtc.org/2973183002/ )
Reason for revert:
Breaks lots of downstream projects.

Original issue's description:
> Remove remains of webrtc/base
>
> All downstream code have been updated to the new location.
>
> In PRESUBMIT.py:
> * Remove webrtc/rtc_base from CPP_BLACKLIST
> * Add webrtc/rtc_base to LEGACY_API_DIRS
>
> Fix some duplicated paths in
> webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
>
> BUG=webrtc:7634
> TBR=kwiberg@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2973183002
> Cr-Commit-Position: refs/heads/master@{#18948}
> Committed:
9483b49baf

TBR=kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7634

Review-Url: https://codereview.webrtc.org/2976633002
Cr-Commit-Position: refs/heads/master@{#18949}
2017-07-10 12:58:42 +00:00
ehmaldonado
9483b49baf Remove remains of webrtc/base
All downstream code have been updated to the new location.

In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS

Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn

BUG=webrtc:7634
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2973183002
Cr-Commit-Position: refs/heads/master@{#18948}
2017-07-10 11:50:54 +00:00
minyue-webrtc
0b249c24bf Refactor gunit for synergy to gtest.
BUG=webrtc:7958

Change-Id: I83ff689cef022967e6c58df5eaee8de6fc5cdba8
Reviewed-on: https://chromium-review.googlesource.com/563311
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18943}
2017-07-10 10:00:30 +00:00
jtteh
7480da4118 Trace loggging: Check for g_event_logger is not null before calling it.
BUG=webrtc:7868

Review-Url: https://codereview.webrtc.org/2961663002
Cr-Commit-Position: refs/heads/master@{#18933}
2017-07-07 18:02:15 +00:00
ehmaldonado
eaaae9e91b base->rtc_base: Update .c, .mm and .java files.
TBR=kwiberg@webrtc.org
BUG=webrtc:7634

Review-Url: https://codereview.webrtc.org/2974613003
Cr-Commit-Position: refs/heads/master@{#18926}
2017-07-07 10:09:51 +00:00
jbauch
5b361730d0 Support re-entrant calls to MessageQueueManager::Clear.
BUG=webrtc:7908

Review-Url: https://codereview.webrtc.org/2968753002
Cr-Commit-Position: refs/heads/master@{#18923}
2017-07-07 06:51:37 +00:00
kjellander
e96c45b662 Reland "Update includes for webrtc/{base => rtc_base} rename (3/3)"
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

Changes since last attempt: Some system headers were moved back to their original location since on Windows compilation breaks otherwise.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2966523003
Cr-Commit-Position: refs/heads/master@{#18868}
2017-06-30 17:45:21 +00:00
Henrik Kjellander
0072511073 Revert "Update includes for webrtc/{base => rtc_base} rename (3/3)"
This reverts commit https://codereview.webrtc.org/2963273002/
where the git cl format breaks include order on Windows.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2962303003 .
Cr-Commit-Position: refs/heads/master@{#18857}
2017-06-30 13:14:47 +00:00
kjellander
f1c5ebf829 Update includes for webrtc/{base => rtc_base} rename (3/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2963273002
Cr-Commit-Position: refs/heads/master@{#18856}
2017-06-30 12:27:14 +00:00
jbauch
5869f50f7a Support encrypted RTP extensions (RFC 6904)
Can be enabled by setting "enable_encrypted_rtp_header_extensions" in
"crypto_options" of "PeerConnectionFactoryInterface::Options" and will
only be used if both peers support it.

BUG=webrtc:3411

Review-Url: https://codereview.webrtc.org/2761143002
Cr-Commit-Position: refs/heads/master@{#18842}
2017-06-29 19:31:36 +00:00
nisse
bc8feda1db Delete SignalThread class.
Rewrite AsyncResolver to use PlatformThread directly, not
SignalThread, and update includes of peerconnection client to not
depend on signalthread.h.

BUG=webrtc:6424,webrtc:7723

Review-Url: https://codereview.webrtc.org/2915253002
Cr-Commit-Position: refs/heads/master@{#18833}
2017-06-29 13:21:20 +00:00
Henrik Kjellander
f4efb6fb3d Reland "Move webrtc/{base => rtc_base} (stub headers)
Add the stub headers from https://codereview.webrtc.org/2877023002
as a separate commit. This preserves git blame history of the moved files.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: Ic141abf11801fbfdeea5bcdb23608696ad449013
Reviewed-on: https://chromium-review.googlesource.com/554623
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18822}
2017-06-29 06:21:49 +00:00
Henrik Kjellander
c03627683f Reland "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
Reland the base->rtc_base without adding stub headers (will be
done in follow-up CL). This preserves git blame history of all files.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: Iea3bb6f3f67b8374c96337b63e8f5aa3e6181012
Reviewed-on: https://chromium-review.googlesource.com/554611
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18821}
2017-06-29 06:04:25 +00:00
Henrik Kjellander
ec78f1cebc Revert "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
Will reland in two different commits to preserve git blame history.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: I550da8525aeb9c5b8f96338fcf1c9714f3dcdab1
Reviewed-on: https://chromium-review.googlesource.com/554610
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18820}
2017-06-29 05:54:22 +00:00
Henrik Kjellander
6776518bea Move webrtc/{base => rtc_base}
This refactoring takes a careful approach to avoid rushing the change:
* stub headers are left in all the old locations of webrtc/base
* existing GN targets are kept and now just forward to the moved ones
  using public_deps.
The only exception to the above is the base_java target and its .java files,
which were moved to webrtc/rtc_base right away since it's not possible
to use public_deps for android_library.
To avoid breaking builds, a temporary Dummy.java file was added to
the new intermediate target in webrtc/rtc_base:base_java as well to avoid
hitting a GN assert in the android_library template.

The above approach should make the transition smooth without breaking
downstream.

A helper script was created (https://codereview.webrtc.org/2879203002/)
and was run like this:
stub-headers.py -s webrtc/base -d webrtc/rtc_base -i 7634
stub-headers.py -s webrtc/base/numerics -d webrtc/rtc_base/numerics -i 7634

Fixed invalid header guards in the following files:
webrtc/base/base64.h
webrtc/base/cryptstring.h
webrtc/base/event.h
webrtc/base/flags.h
webrtc/base/httpbase.h
webrtc/base/httpcommon-inl.h
webrtc/base/httpcommon.h
webrtc/base/httpserver.h
webrtc/base/logsinks.h
webrtc/base/macutils.h
webrtc/base/nattypes.h
webrtc/base/openssladapter.h
webrtc/base/opensslstreamadapter.h
webrtc/base/pathutils.h
webrtc/base/physicalsocketserver.h
webrtc/base/proxyinfo.h
webrtc/base/sigslot.h
webrtc/base/sigslotrepeater.h
webrtc/base/socket.h
webrtc/base/socketaddresspair.h
webrtc/base/socketfactory.h
webrtc/base/stringutils.h
webrtc/base/testbase64.h
webrtc/base/testutils.h
webrtc/base/transformadapter.h
webrtc/base/win32filesystem.h

Added new header guards to:
sslroots.h
testbase64.h

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
R=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2877023002 .
Cr-Commit-Position: refs/heads/master@{#18816}
2017-06-28 18:58:10 +00:00
Henrik Kjellander
73e2180f94 Add webrtc/rtc_base skeleton.
Add webrtc/rtc_base in preparation for the larger rename
in https://codereview.webrtc.org/2877023002.
This is needed in order to make downstream projects update
their dependencies (since it's not possible to use public_deps
for android_library).

BUG=webrtc:7634
NOTRY=True

Change-Id: I90fa72c9ebbc4e69bb3133413c3258432a5a72b1
Reviewed-on: https://chromium-review.googlesource.com/541215
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18699}
2017-06-21 12:50:22 +00:00