1153 Commits

Author SHA1 Message Date
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
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
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
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
eladalon
d6e9466e7e No compliation-flag-dependent members in CriticalSection
Having members in a class which only exist when certain compliation flags are turned on (unless relating to the target platform) means that those flags must be the same when compiling the module as when including its headers from other modules. This means that code outside of WebRTC runs the risk of misjudging the size of an rtc::CriticalSection, or any class which has an rtc::CriticalSection as a member. (This rule is applied recursively.) If a mismatch occurs, memory corruption is likely.

Having discussed this a bit, we have decided that the simplest solution is probably the best - always define those members, even when compilation flags (namely, CS_DEBUG_CHECKS) render it unused.

BUG=webrtc:7867

Review-Url: https://codereview.webrtc.org/2957753002
Cr-Commit-Position: refs/heads/master@{#18811}
2017-06-28 14:31:30 +00:00
Danil Chapovalov
1330166bc0 Add value_type alias to rtc::Buffer
It allows to use rtc::Buffer in templates that expect std container,
e.g. it can now be used as ::testing::ElementsAreArray parameter

Bug: None
Change-Id: I97d7ffb13393d02850ddb213f7a1d01129b10b05
Reviewed-on: https://chromium-review.googlesource.com/539635
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18809}
2017-06-28 13:59:40 +00:00
kwiberg
93ecc5dad0 Rename safe_cmp::{Eq,Ne,Lt,Le,Ge,Gt} to Safe{Eq,Ne,Lt,Le,Ge,Gt}
For consistency with SafeMin(), SafeMax(), and SafeClamp(). And so that we avoid introducing a namespace.

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2802423002
Cr-Commit-Position: refs/heads/master@{#18756}
2017-06-26 08:31:31 +00:00
Emad Omara
c6de0c98af Upgrade to (D)TLS1.2 using the new BoringSSL (D)TLSv1_2_method functions
Bug: webrtc:7865
Change-Id: I39344f385181132fe2e0f832eec1cf8fe0736dfe
Reviewed-on: https://chromium-review.googlesource.com/543795
Commit-Queue: Emad Omara <emadomara@google.com>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18706}
2017-06-22 00:30:04 +00:00
Emad Omara
dab1d2d34e Enable SNI in ssl adapter.
Bug: webrtc:6973
Change-Id: I13d28cf41c586880bd7fea523005233921794cdf
Reviewed-on: https://chromium-review.googlesource.com/523024
Reviewed-by: Zeke Chin <tkchin@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Justin Uberti <juberti@chromium.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Emad Omara <emadomara@google.com>
Cr-Commit-Position: refs/heads/master@{#18640}
2017-06-16 23:30:48 +00:00
terelius
f79dbadc09 Add has_value() and value() methods to rtc::Optional.
These methods have the same behavior as their counterparts in std::optional, except that rtc::Optional::value() requires that the value exists whereas std::optional::value() throws an exception.

BUG=webrtc:7843

Review-Url: https://codereview.webrtc.org/2942203002
Cr-Commit-Position: refs/heads/master@{#18631}
2017-06-16 13:48:13 +00:00
nisse
af99b6d67a Delete SignalSrtpError.
This became unused with cl https://codereview.webrtc.org/1362913004.

BUG=webrtc:4690,webrtc:6424

Review-Url: https://codereview.webrtc.org/2938013003
Cr-Commit-Position: refs/heads/master@{#18623}
2017-06-16 07:57:21 +00:00
Bjorn Mellem
6eb03b81bb Remove dependency on gunit headers in virtualsocketserver.
BUG=7810

Change-Id: I66d9aeaca2dd81c20f78052a15ea3680e23a1501
Reviewed-on: https://chromium-review.googlesource.com/534354
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18579}
2017-06-14 00:13:53 +00:00
deadbeef
1ee2125909 Adding PortAllocator option to support cases where sockets can't be bound.
This CL adds the flag "PORTALLOCATOR_ENABLE_ANY_ADDRESS_PORTS", which will
force the creation of ports not bound to any specific network interface.
These are normally only used when network enumeration fails or is disabled,
but in some circumstances (such as the one the test case adds), they're the
only thing that works.

This will result in extra ports being gathered, which is why it's only enabled
behind a flag for now. In the future, we could probably introduce more
sophisticated "pruning" logic that would lessen the impact of the extra ports
when they're redundant, and make the flag the default.

Some other minor changes that were required to make this use case work:

* Allow a TCPPort to be used for outgoing connections even if it tries and
  fails to create a server socket.
* Allow Bind to fail if being called before Connect, and the IP is an "any"
  address (0.0.0.0 or ::), since this bind would have been mostly pointless
  anyway.
* Prevent P2PTransprotChannel from keeping a "backup" candidate pair using
  an "any address" network; we only want this for actual networks.

BUG=webrtc:7798

Review-Url: https://codereview.webrtc.org/2936553003
Cr-Commit-Position: refs/heads/master@{#18578}
2017-06-13 22:49:45 +00:00
nisse
a65ad22939 Delete unused method FilesystemInterface::GetFileTime.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2926713007
Cr-Commit-Position: refs/heads/master@{#18564}
2017-06-13 12:37:44 +00:00
mbonadei
fdfeb8361e Declaring rtc_base_approved dep on webrtc_common
BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2941453003
Cr-Commit-Position: refs/heads/master@{#18562}
2017-06-13 11:53:27 +00:00
nisse
29f0d453aa Delete ApplicationName and OrganizationName.
Deleted FilesystemInterface methods:

  GetOrganizationName
  SetOrganizationName
  GetApplicationName
  SetApplicationName

Unused since cl https://codereview.webrtc.org/2533213005.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2927983003
Cr-Commit-Position: refs/heads/master@{#18554}
2017-06-13 09:04:51 +00:00
nisse
687bc3e27b Delete unused method Win32Filesystem::GetAppPathname.
Unused since cl https://codereview.webrtc.org/2872283002.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2934483002
Cr-Commit-Position: refs/heads/master@{#18552}
2017-06-13 08:06:07 +00:00
nisse
f52ef71db7 Delete unused method FilesystemInterface::DeleteEmptyFolder.
It's left-over since cl https://codereview.webrtc.org/2887093002.

In addition, fix override declarations and formatting in
win32filesystem.h.

BUG=webrtc:7345,webrtc:6424

Review-Url: https://codereview.webrtc.org/2930023002
Cr-Commit-Position: refs/heads/master@{#18549}
2017-06-13 07:10:07 +00:00
deadbeef
22e0814d51 Update VirtualSocketServerTest to use a fake clock.
Since this is a test for a fake network, it's only natural that it uses
a fake clock as well. This makes the tests much faster, less flaky, and
lets them be moved out of  "webrtc_nonparallel_tests", since they no
longer have a dependency on any "real" thing (sockets, or time) and
can be run in parallel as easily as any other tests.

As part of this CL, added the fake clock as an argument to
VirtualSocketServer's and TestClient's constructors, since these classes
have methods that wait synchronously for something to occur, and if the
test is using a fake clock, they need to advance it in order to make
progress.

Lastly, added a DCHECK in Thread::ProcessMessages. If called with a
nonzero time while a fake clock is used, it will get stuck in an
infinite loop; a DCHECK is easier to notice than an infinite loop.

BUG=webrtc:7727, webrtc:2409

Review-Url: https://codereview.webrtc.org/2927413002
Cr-Commit-Position: refs/heads/master@{#18544}
2017-06-12 21:30:28 +00:00
kwiberg
0703856b53 Add SafeClamp(), which accepts args of different types
Specifically, just like SafeMin() and SafeMax() it handles all
combinations of integer and all
combinations of floating-point arguments by picking a
result type that is guaranteed to be able to hold the result.

This CL also replaces a bunch of std::min + std:max call pairs with
calls to SafeClamp()---the ones that could easily be found by grep
because "min" and "max" were on the same line. :-)

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2808513003
Cr-Commit-Position: refs/heads/master@{#18542}
2017-06-12 18:40:47 +00:00
perkj
39a41d92dd Split rtc_task_queue target. Add separate target for sequenced_task_checker and weak_ptr.
This is to make it possible to override the rtc_task_queue target only.

BUG=none

Review-Url: https://codereview.webrtc.org/2931273002
Cr-Commit-Position: refs/heads/master@{#18534}
2017-06-12 12:53:35 +00:00
kjellander
c131bf944e Enable webrtc_nonparallel_tests on iOS simulator
After landing https://chromium-review.googlesource.com/528173
only one test needs to be disabled: VirtualSocketServerTest.delay_v4

BUG=webrtc:7727
NOTRY=True
TESTED=gn gen out/x64-Debug --args='target_os="ios" ios_enable_code_signing=false is_component_build=false target_cpu="x64"'
ninja -C out/x64-Debug webrtc_nonparallel_tests
out/x64-Debug/iossim -d "iPhone 6s" -s 10.3 out/x64-Debug/webrtc_nonparallel_tests.app

Review-Url: https://codereview.webrtc.org/2909073002
Cr-Commit-Position: refs/heads/master@{#18519}
2017-06-09 19:59:11 +00:00
Kári Tristan Helgason
e2baffb055 Create a UIApplication when running tests on iOS.
Fix issue where running tests on iOS would get killed after a certain
time had passed. This seems to be due to springboard killing apps
that don't have a GUI running. Creating a UIApplication to wrap
the test suite seems to solve this problem in chromium.

This CL adds a class for this purpose. Most of the code was copied
from chromium with bits taken out.

Bug: webrtc:7161, webrtc:7758
Change-Id: I10f9bc8914e73f2870a9b0a2703cde496af8db2f
Reviewed-on: https://chromium-review.googlesource.com/528173
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Kári Tristan Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18509}
2017-06-09 10:24:33 +00:00
hugoh
6baee78bc9 Add missing #include <cerrno> in string_to_number.cc
One of our toolchains does not expose |errno| in the global namespace.

BUG=none

Review-Url: https://codereview.webrtc.org/2926273002
Cr-Commit-Position: refs/heads/master@{#18506}
2017-06-08 23:38:40 +00:00
mbonadei
2038df452c Deleting unused build target.
This build target was used by webrtc/base:webrtc_base which is not a
build target anymore. Instead we have webrtc/base:rtc_base which depends
directly on third_party/boringssl.

BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2926703003
Cr-Commit-Position: refs/heads/master@{#18472}
2017-06-07 11:50:13 +00:00
deadbeef
e5dce2b6b9 Replacing unnecessary conditional with DCHECK in OpenSSLAdapter
Follow-up from https://codereview.webrtc.org/2915243002/

BUG=None
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2917933003
Cr-Commit-Position: refs/heads/master@{#18418}
2017-06-02 18:52:06 +00:00
deadbeef
ed3b986d63 Fixing SSL error that occurs when underlying socket is blocked.
BoringSSL (or OpenSSL) require that when SSL_write fails due to the
underlying socket being blocked, it's retried with the same parameters
until it succeeds. But we weren't doing this, and our socket
abstraction doesn't have an equivalent requirement. So when this was
occurring, we would just end up trying to send the next RTP or STUN
packet (instead of the packet that couldn't be sent), and BoringSSL
doesn't like that.

So, when this condition occurs now, we'll simply enter a "pending write"
mode and buffer the data that couldn't be completely sent. When the
underlying socket becomes writable again, or if Send is called again
before that happens, we retry sending the buffered data. Making both
BoringSSL and the upper layer of code that expects normal TCP socket
behavior happy.

Also adding some more logging, and fixing an issue with VirtualSocketServer
that made it behave slightly differently than PhysicalSocketServer when a
TCP packet is only partially read.

BUG=webrtc:7753

Review-Url: https://codereview.webrtc.org/2915243002
Cr-Commit-Position: refs/heads/master@{#18416}
2017-06-02 17:33:16 +00:00
kwiberg
dbb497af84 SafeMin/SafeMax: Fix wrong return type when given two enum arguments
And add tests that catch it.

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2916083003
Cr-Commit-Position: refs/heads/master@{#18407}
2017-06-02 11:24:11 +00:00
jbauch
de4db11798 Support epoll in PhysicalSocketServer.
Only will be used if WEBRTC_POSIX and WEBRTC_LINUX are both defined and
"epoll_create" doesn't return an error. Otherwise the default "select"-based
IO loop will be used.

BUG=webrtc:7585

Review-Url: https://codereview.webrtc.org/2880923002
Cr-Commit-Position: refs/heads/master@{#18359}
2017-05-31 20:09:18 +00:00
nisse
210832696f Delete Filesystem::IterateDirectory and Filesystem::OpenFile.
BUG=webrtc:7345, webrtc:6424

Review-Url: https://codereview.webrtc.org/2894583002
Cr-Commit-Position: refs/heads/master@{#18344}
2017-05-31 09:07:21 +00:00
deadbeef
eae4564cb7 Disable SIGPIPE for sockets created on iOS.
This can occur (and by default, terminates the process) for apps that
don't use the "voip" UIBackgroundMode.

We're already doing a similar thing on Linux (using MSG_NOSIGNAL for every
packet sent).

BUG=webrtc:7686

Review-Url: https://codereview.webrtc.org/2903313002
Cr-Commit-Position: refs/heads/master@{#18277}
2017-05-26 23:27:09 +00:00
sakal
d7fdb8014d Reland of Removes usage of native base::android::GetApplicationContext()
The change is now compatible with the old JVM::Initialize API. The
context is passed to the ContextUtils class when calling its deprecated
signature.

BUG=webrtc:7665
NOTRY=True # Only comment changes since the last patchset.

Review-Url: https://codereview.webrtc.org/2903253004
Cr-Commit-Position: refs/heads/master@{#18268}
2017-05-26 08:51:53 +00:00
deadbeef
aea9293fd4 Revert of Fixing potential AsyncInvoker deadlock that occurs for "reentrant" invocations. (patchset #3 id:40001 of https://codereview.webrtc.org/2885143006/ )
Reason for revert:
Causes a new TSan race warning. Will reland after fixing. Note this is the same race as will be fixed by https://codereview.webrtc.org/2876273002/.

Original issue's description:
> Fixing potential AsyncInvoker deadlock that occurs for "reentrant" 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=None
>
> Review-Url: https://codereview.webrtc.org/2885143006
> Cr-Commit-Position: refs/heads/master@{#18225}
> Committed: ef37ca5fb3

TBR=nisse@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/2904543003
Cr-Commit-Position: refs/heads/master@{#18248}
2017-05-23 19:55:03 +00:00
deadbeef
ef37ca5fb3 Fixing potential AsyncInvoker deadlock that occurs for "reentrant" 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=None

Review-Url: https://codereview.webrtc.org/2885143006
Cr-Commit-Position: refs/heads/master@{#18225}
2017-05-22 22:32:51 +00:00
sakal
633e22ebbe Land ContextUtils separately.
External dependencies need to be updated to call ContextUtils.initialize
before rest of the CL can be landed.

BUG=webrtc:7665

Review-Url: https://codereview.webrtc.org/2893933003
Cr-Commit-Position: refs/heads/master@{#18208}
2017-05-19 08:29:10 +00:00
sakal
40d224814a Revert of Removes usage of native base::android::GetApplicationContext() (patchset #6 id:120001 of https://codereview.webrtc.org/2888093004/ )
Reason for revert:
Breaks bot on chromium.webrtc.fyi.

Original issue's description:
> Removes usage of native base::android::GetApplicationContext()
>
> BUG=webrtc:7665
>
> Review-Url: https://codereview.webrtc.org/2888093004
> Cr-Commit-Position: refs/heads/master@{#18195}
> Committed: bc83e2ee69

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

Review-Url: https://codereview.webrtc.org/2894593002
Cr-Commit-Position: refs/heads/master@{#18196}
2017-05-18 13:44:20 +00:00
sakal
bc83e2ee69 Removes usage of native base::android::GetApplicationContext()
BUG=webrtc:7665

Review-Url: https://codereview.webrtc.org/2888093004
Cr-Commit-Position: refs/heads/master@{#18195}
2017-05-18 13:28:45 +00:00
nisse
b243ee91c3 Delete FilesystemInterface::DeleteFolderAndContents and related methods.
Additional methods deleted:

  DeleteFolderContents
  IsTemporaryPath
  GetAppTempFolder

Unused since cl https://codereview.webrtc.org/2872283002/

BUG=webrtc:7345,webrtc:6424

Review-Url: https://codereview.webrtc.org/2887093002
Cr-Commit-Position: refs/heads/master@{#18194}
2017-05-18 12:49:58 +00:00
nisse
57efb038bb Reland of reduce dependencies on rtc::FileSystem in FileRotatingStream tests... (patchset #1 id:1 of https://codereview.webrtc.org/2885393002/ )
Reason for revert:
Downstream project now fixed.

Original issue's description:
> Revert of Reduce dependencies on rtc::FileSystem in FileRotatingStream tests, adding helpers in webrtc::test:: (patchset #7 id:120001 of https://codereview.webrtc.org/2872283002/ )
>
> Reason for revert:
> Fails to compile successfully.
>
>
> Original issue's description:
> > Reduce dependencies on rtc::FileSystem in FileRotatingStream tests.
> >
> > Use webrtc::test::OutputPath instead of Filesystem::GetAppTempFolder.
> > Added functions RemoveFile and RemoveDir in the webrtc::test namespace,
> > to replace use of Filesystem::DeleteFolderAndContents.
> >
> > This makes Filesystem::DeleteFolderAndContents unused, to be deleted
> > together with related code in a followup cl.
> >
> > BUG=webrtc:7345
> >
> > Review-Url: https://codereview.webrtc.org/2872283002
> > Cr-Commit-Position: refs/heads/master@{#18173}
> > Committed: dd7b5f32b5
>
> TBR=pthatcher@webrtc.org,kjellander@webrtc.org,tommi@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7345
>
> Review-Url: https://codereview.webrtc.org/2885393002
> Cr-Commit-Position: refs/heads/master@{#18180}
> Committed: deaa33d2f5

TBR=pthatcher@webrtc.org,kjellander@webrtc.org,tommi@webrtc.org,ehmaldonado@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7345

Review-Url: https://codereview.webrtc.org/2885413002
Cr-Commit-Position: refs/heads/master@{#18193}
2017-05-18 10:55:59 +00:00
jbauch
577f5dc60b Add methods to change enabled events in PhysicalSocket.
This is in preparation for "epoll" integration where additional code needs to
run when the enabled events change.

BUG=webrtc:7585

Review-Url: https://codereview.webrtc.org/2893723002
Cr-Commit-Position: refs/heads/master@{#18189}
2017-05-17 23:32:26 +00:00
ehmaldonado
deaa33d2f5 Revert of Reduce dependencies on rtc::FileSystem in FileRotatingStream tests, adding helpers in webrtc::test:: (patchset #7 id:120001 of https://codereview.webrtc.org/2872283002/ )
Reason for revert:
Fails to compile successfully.

Original issue's description:
> Reduce dependencies on rtc::FileSystem in FileRotatingStream tests.
>
> Use webrtc::test::OutputPath instead of Filesystem::GetAppTempFolder.
> Added functions RemoveFile and RemoveDir in the webrtc::test namespace,
> to replace use of Filesystem::DeleteFolderAndContents.
>
> This makes Filesystem::DeleteFolderAndContents unused, to be deleted
> together with related code in a followup cl.
>
> BUG=webrtc:7345
>
> Review-Url: https://codereview.webrtc.org/2872283002
> Cr-Commit-Position: refs/heads/master@{#18173}
> Committed: dd7b5f32b5

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

Review-Url: https://codereview.webrtc.org/2885393002
Cr-Commit-Position: refs/heads/master@{#18180}
2017-05-17 12:22:14 +00:00
nisse
dd7b5f32b5 Reduce dependencies on rtc::FileSystem in FileRotatingStream tests.
Use webrtc::test::OutputPath instead of Filesystem::GetAppTempFolder.
Added functions RemoveFile and RemoveDir in the webrtc::test namespace,
to replace use of Filesystem::DeleteFolderAndContents.

This makes Filesystem::DeleteFolderAndContents unused, to be deleted
together with related code in a followup cl.

BUG=webrtc:7345

Review-Url: https://codereview.webrtc.org/2872283002
Cr-Commit-Position: refs/heads/master@{#18173}
2017-05-17 08:08:35 +00:00
deadbeef
98e186c71c Remove VirtualSocketServer's dependency on PhysicalSocketServer.
The only thing the physical socket server was used for was
"Wait"/"WakeUp", but it could be replaced by a simple rtc::Event.

So, removing this dependency makes things less confusing; the fact that
VirtualSocketServer takes a PhysicalSocketServer may lead someone to
think it uses real sockets internally, when it doesn't.

BUG=None

Review-Url: https://codereview.webrtc.org/2883313003
Cr-Commit-Position: refs/heads/master@{#18172}
2017-05-17 01:00:06 +00:00
nisse
c4a3173db0 Delete unused features of AsyncInvoke.
Also eliminates its dependency on callback.h.

BUG=None

Review-Url: https://codereview.webrtc.org/2871403003
Cr-Commit-Position: refs/heads/master@{#18163}
2017-05-16 12:51:29 +00:00
deadbeef
9a6f4d4316 Get tests working on systems that only support IPv6.
For every failing test, the solution was either to do a "has IPv4" check
before the test is run, or avoid depending on real network interfaces
altogether.

This specifically fixes rtc_unittests, peerconnection_unittests, and
webrtc_nonparallel_tests.

BUG=None

Review-Url: https://codereview.webrtc.org/2881973002
Cr-Commit-Position: refs/heads/master@{#18155}
2017-05-16 02:43:33 +00:00