46 Commits

Author SHA1 Message Date
oprypin
1ea631f4a7 Fix a delete type mismatch (deleting a sockaddr_in6* as a sockaddr*)
This triggered ASan, saying "object passed to delete has wrong type".
This error is caused by allocating a `struct sockaddr_in6`, casting it
and deleting it as `struct sockaddr*` which has a smaller size.

BUG=None

Review-Url: https://codereview.webrtc.org/2999053002
Cr-Commit-Position: refs/heads/master@{#19401}
2017-08-18 07:15:19 +00:00
Steve Anton
786de70a59 Add TLS TURN tests.
This change extends the TurnPort tests to cover connections to
TURN servers over TLS.
As part of this, the TestTurnServer is extended to support
connections from clients over TLS.

Note that this also fixes the remaining bugs in webrtc:7562

Bug: webrtc:7584
Change-Id: If89ceae49d33417625464b5892d20eee4de7c3b5
Reviewed-on: https://chromium-review.googlesource.com/611520
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19397}
2017-08-17 23:03:04 +00:00
ehmaldonado
481c549b29 Reland of Make it possible for tests to set up trace event handlers. (patchset #1 id:1 of https://codereview.webrtc.org/2997963002/ )
Reason for revert:
This should fix it

Original issue's description:
> Revert of Make it possible for tests to set up trace event handlers. (patchset #4 id:60001 of https://codereview.webrtc.org/3002663002/ )
>
> Reason for revert:
> Breaks Chromium bots.
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/27340/steps/generate_build_files/logs/stdio
>
> Original issue's description:
> > Make it possible for tests to set up trace event handlers.
> >
> > As it is now, the first time a TRACE_EVENT... is called, the result from
> > the current handler is stored in a static const variable, and subsequent
> > calls will use that value regardless of changes to the handler.
> >
> > This is a problem if a test wants to use another handler.
> >
> > BUG=None
> >
> > Review-Url: https://codereview.webrtc.org/3002663002
> > Cr-Commit-Position: refs/heads/master@{#19382}
> > Committed: a973265622
>
> TBR=hbos@webrtc.org,kwiberg@webrtc.org,mbonadei@webrtc.org,kjellander@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/2997963002
> Cr-Commit-Position: refs/heads/master@{#19383}
> Committed: db758c2589

TBR=hbos@webrtc.org,kwiberg@webrtc.org,mbonadei@webrtc.org,kjellander@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/2995123002
Cr-Commit-Position: refs/heads/master@{#19386}
2017-08-17 14:59:54 +00:00
ehmaldonado
db758c2589 Revert of Make it possible for tests to set up trace event handlers. (patchset #4 id:60001 of https://codereview.webrtc.org/3002663002/ )
Reason for revert:
Breaks Chromium bots.
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/27340/steps/generate_build_files/logs/stdio

Original issue's description:
> Make it possible for tests to set up trace event handlers.
>
> As it is now, the first time a TRACE_EVENT... is called, the result from
> the current handler is stored in a static const variable, and subsequent
> calls will use that value regardless of changes to the handler.
>
> This is a problem if a test wants to use another handler.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/3002663002
> Cr-Commit-Position: refs/heads/master@{#19382}
> Committed: a973265622

TBR=hbos@webrtc.org,kwiberg@webrtc.org,mbonadei@webrtc.org,kjellander@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/2997963002
Cr-Commit-Position: refs/heads/master@{#19383}
2017-08-17 13:07:02 +00:00
ehmaldonado
a973265622 Make it possible for tests to set up trace event handlers.
As it is now, the first time a TRACE_EVENT... is called, the result from
the current handler is stored in a static const variable, and subsequent
calls will use that value regardless of changes to the handler.

This is a problem if a test wants to use another handler.

BUG=None

Review-Url: https://codereview.webrtc.org/3002663002
Cr-Commit-Position: refs/heads/master@{#19382}
2017-08-17 13:02:20 +00:00
Chris Mumford
0ed6de4cad Check for prior thread annotation macros before defining.
The macros in thread_annotations.h (LOCKABLE, SHARED_LOCKS_REQUIRED, etc.)
didn't check for an existing definition before defining a new one. This
conflicts with other libraries, specifically leveldb:

https://github.com/google/leveldb/blob/master/port/thread_annotations.h
Change-Id: Ic37b7b63a0fbf84f183e446ee8735ef997b7099d

BUG=8096

Change-Id: Ic37b7b63a0fbf84f183e446ee8735ef997b7099d
Reviewed-on: https://chromium-review.googlesource.com/614441
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19374}
2017-08-16 17:31:58 +00:00
kwiberg
5b9746ef10 When using clang, switch on -Wc++11-narrowing
See
https://clang.llvm.org/docs/DiagnosticsReference.html#wc-11-narrowing
for datails. This catches a narrowing bug that broke a downstream
project in https://codereview.webrtc.org/2995523002/.

BUG=none

Review-Url: https://codereview.webrtc.org/2995073002
Cr-Commit-Position: refs/heads/master@{#19366}
2017-08-16 11:52:35 +00:00
Jianjun Zhu
037f3e42f2 Replace absolute path with relative path for GN files.
Bug: webrtc:7952
Change-Id: I45d889bd976f58386f803d0dc27147ea00a52e56
Reviewed-on: https://chromium-review.googlesource.com/612786
Commit-Queue: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19357}
2017-08-15 15:57:36 +00:00
Justin Uberti
1d44550ddc Implementation of SSL caching; tests in separate CL.
This CL adds the ability for a SSLAdapter to resume a previous session, saving a roundtrip and significantly reducing the # of bytes needed to bring up the new session.

To do this, the sessions need to share state. This is addressed by introducing the SSLAdapterFactory object, which can maintain a SSL_CTX and session cache for multiple sessions.

This CL does not have unit tests in order to minimize the change size (i.e., to reduce the size of the CP). CL https://chromium-review.googlesource.com/c/558612 builds on this CL and adds tests, but makes some nontrivial changes to SSLStreamAdapter in order to get the test server to share a SSL_CTX across sessions. 

Bug: 7936
Change-Id: I677b73453d981d5b3a2e66ea9a5be722acd59475
Reviewed-on: https://chromium-review.googlesource.com/575910
Commit-Queue: Justin Uberti <juberti@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19342}
2017-08-15 00:37:05 +00:00
kwiberg
ee89e7870c Replace CHECK(x && y) with two separate CHECK() calls
That way, the debug printout will tell us which of x and y that was false.

BUG=none

Review-Url: https://codereview.webrtc.org/2988153003
Cr-Commit-Position: refs/heads/master@{#19297}
2017-08-10 00:22:01 +00:00
deadbeef
3af63b0dc9 Fixing race between ~AsyncInvoker and ~AsyncClosure, using ref-counting.
The AsyncInvoker destructor waits for all invoked tasks to be complete
(in other words, all AsyncClosures to be destructed). They were using an
event to wake up the destructor, but a race made it possible for this
event to be dereferenced after it's destroyed.

This CL makes the event reference counted, such that if the destructor
runs right after AsyncClosure decrements "pending_invocations_",
setting the event will be a no-op, and the event will be destructed
in the AsyncClosure destructor.

This CL also fixes a deadlock that may occur for "re-entrant"
invocations. The deadlock occurs if the AsyncInvoker is destroyed on
thread A while a task on thread B is running, which AsyncInvokes a task
back on thread A.

This was causing pending_invocations_ to end up negative, because
an AsyncClosure that's never added to a thread's message queue (due to
the "destroying_" flag) caused the count to be decremented but not
incremented.

BUG=webrtc:7656

Review-Url: https://codereview.webrtc.org/2885143005
Cr-Commit-Position: refs/heads/master@{#19278}
2017-08-09 00:59:47 +00:00
agrieve
26622d3ff8 Audit of kConstants missing the const qualifier
Found via supersize query:
size_info.symbols.WhereFullNameMatches(r'\bk[A-Z]').WhereInSection('d')

This moves 90 symbols from .data -> .data.rel.ro (5.50kb)

BUG=chromium:747064

Review-Url: https://codereview.webrtc.org/2986163002
Cr-Commit-Position: refs/heads/master@{#19274}
2017-08-08 17:48:15 +00:00
deadbeef
5c3c104ba0 Make Port (and subclasses) fully "Network"-based, instead of IP-based.
For ICE, we want sockets that are bound to specific network interfaces,
rather than to specific IP addresses. So, a while ago, we added a
"Network" class that gets passed into the Port constructor, in
addition to the IP address as before.

But we never finished the job of removing the IP address field, such that
a Port only guarantees something about the network interface it's
associated with, and not the specific IP address it ends up with.

This CL does that, and as a consequence, if a port ends up bound to
an IP address other than the "best" one (returned by Network::GetBestIP),
this *won't* be treated as an error.

This is relevant to Android, where even though we pass an IP address
into "Bind" as a way of identifying the network, the socket actually
gets bound using "android_setsocknetwork", which doesn't provide any
guarantees about the IP address. So, if a network interface has multiple
IPv6 addresses (for instance), we may not correctly predict the one
the OS will choose, and that's ok.

This CL also moves "SetAlternateLocalAddress" from VirtualSocket to
VirtualSocketServer, which makes for much more readable test code.

The next step, if there is one, is to pass along the Network class all
the way to SocketServer::Bind. Then the socket server could do smart
things with the network information. We could even stick a platform-
specific network handle in the Network object, such that the socket
server could use it for the binding, or for "sendmsg", for example.
See bug 7026 for more context about the sendmsg idea.

BUG=webrtc:7715

Review-Url: https://codereview.webrtc.org/2989303002
Cr-Commit-Position: refs/heads/master@{#19251}
2017-08-04 22:01:57 +00:00
deadbeef
4cd599f025 If adapter type is unknown and interface name is "ipsec", treat as VPN.
This will result in the ipsec interfaces being prioritized below Wi-Fi
and cell interfaces. This makes the most difference when we hit the
default limit for IPv6 interfaces (5), and there are lots of ipsec
interfaces for whatever reason, resulting in the "real" interfaces that
would actually succeed not being used. See the linked bug 7703.

BUG=webrtc:7703, webrtc:3149

Review-Url: https://codereview.webrtc.org/2985133002
Cr-Commit-Position: refs/heads/master@{#19175}
2017-07-27 22:05:29 +00:00
deadbeef
3427f538de Relanding: Move "max IPv6 networks" logic to BasicPortAllocator, and fix sorting.
Relanding because the broken chromium test has been fixed:
https://chromium-review.googlesource.com/582196

This CL moves the responsibility for restricting the number of IPv6
interfaces used for ICE to BasicPortAllocator. This is the right place
to do it in the first place; it's where all the rest of the filtering
occurs. And NetworkManager shouldn't need to know about ICE limitations;
only the ICE classes should.

Part of the reason I'm doing this is that I want to add a
"max_ipv6_networks" API to RTCConfiguration, so that applications can
override the default easily (see linked bug). But that means that
PeerConnection would need to be able to call "set_max_ipv6_networks" on
the underlying object that does the filtering, and that method isn't
available on the "NetworkManager" base class. So rather than adding
another method to a place it doesn't belong, I'm moving it to the place
it does belong.

In the process, I noticed that "CompareNetworks" is inconsistent with
"SortNetworks"; the former orders interfaces alphabetically, and the
latter reverse-alphabetically. I believe this was unintentional, and
results in undesirable behavior (like "eth1" being preferred over
"eth0"), so I'm fixing it and adding a test.

BUG=webrtc:7703

Review-Url: https://codereview.webrtc.org/2983213002
Cr-Original-Commit-Position: refs/heads/master@{#19112}
Committed: ad9561404c
Review-Url: https://codereview.webrtc.org/2983213002
Cr-Commit-Position: refs/heads/master@{#19159}
2017-07-26 23:09:33 +00:00
philipel
7956c0f2f6 Implemented a new sequence number unwrapper in sequence_number_util.h.
There is already an Unwrapper in webrtc/modules/include/module_common_types.h,
but we reimplemented it in sequence_number_util.h for a few reasons:
 - Such a class belongs in sequence_number_util.h.
 - It is a cleaner implementation since we can use the rest of
   sequence_number_util.h functionality.
 - You can choose at which number the unwrapped sequence should start,
   which is used to avoid the edge case when a backward wrap can happen
   as the first few numbers are unwrapped.
 - This unwrapper can unwrap numbers that does not wrap 8/16/32 bits.

BUG=None

Review-Url: https://codereview.webrtc.org/2977603002
Cr-Commit-Position: refs/heads/master@{#19154}
2017-07-26 14:48:15 +00:00
deadbeef
817c8af52a Revert of Move "max IPv6 networks" logic to BasicPortAllocator, and fix sorting. (patchset #2 id:20001 of https://codereview.webrtc.org/2983213002/ )
Reason for revert:
Breaks IpcNetworkManagerTest.TestMergeNetworkList, because it has built-in assumptions about network ordering that it shouldn't have. Will reland after fixing that test.

Original issue's description:
> Move "max IPv6 networks" logic to BasicPortAllocator, and fix sorting.
>
> This CL moves the responsibility for restricting the number of IPv6
> interfaces used for ICE to BasicPortAllocator. This is the right place
> to do it in the first place; it's where all the rest of the filtering
> occurs. And NetworkManager shouldn't need to know about ICE limitations;
> only the ICE classes should.
>
> Part of the reason I'm doing this is that I want to add a
> "max_ipv6_networks" API to RTCConfiguration, so that applications can
> override the default easily (see linked bug). But that means that
> PeerConnection would need to be able to call "set_max_ipv6_networks" on
> the underlying object that does the filtering, and that method isn't
> available on the "NetworkManager" base class. So rather than adding
> another method to a place it doesn't belong, I'm moving it to the place
> it does belong.
>
> In the process, I noticed that "CompareNetworks" is inconsistent with
> "SortNetworks"; the former orders interfaces alphabetically, and the
> latter reverse-alphabetically. I believe this was unintentional, and
> results in undesirable behavior (like "eth1" being preferred over
> "eth0"), so I'm fixing it and adding a test.
>
> BUG=webrtc:7703
>
> Review-Url: https://codereview.webrtc.org/2983213002
> Cr-Commit-Position: refs/heads/master@{#19112}
> Committed: ad9561404c

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

Review-Url: https://codereview.webrtc.org/2984853002
Cr-Commit-Position: refs/heads/master@{#19114}
2017-07-21 19:59:46 +00:00
deadbeef
ad9561404c Move "max IPv6 networks" logic to BasicPortAllocator, and fix sorting.
This CL moves the responsibility for restricting the number of IPv6
interfaces used for ICE to BasicPortAllocator. This is the right place
to do it in the first place; it's where all the rest of the filtering
occurs. And NetworkManager shouldn't need to know about ICE limitations;
only the ICE classes should.

Part of the reason I'm doing this is that I want to add a
"max_ipv6_networks" API to RTCConfiguration, so that applications can
override the default easily (see linked bug). But that means that
PeerConnection would need to be able to call "set_max_ipv6_networks" on
the underlying object that does the filtering, and that method isn't
available on the "NetworkManager" base class. So rather than adding
another method to a place it doesn't belong, I'm moving it to the place
it does belong.

In the process, I noticed that "CompareNetworks" is inconsistent with
"SortNetworks"; the former orders interfaces alphabetically, and the
latter reverse-alphabetically. I believe this was unintentional, and
results in undesirable behavior (like "eth1" being preferred over
"eth0"), so I'm fixing it and adding a test.

BUG=webrtc:7703

Review-Url: https://codereview.webrtc.org/2983213002
Cr-Commit-Position: refs/heads/master@{#19112}
2017-07-21 18:03:53 +00:00
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