This is step 2 of the plan below.
The modified plan
1. First land unmodified task_queue.h into webrtc_override in Chrome
2. Modify build files in the webrtc repo to include the task_queue.h and task_queue.cc from webrtc_overrides. This will breaks webrtc Chrome FYI.
3. Combine a roll of webrtc to Chrome and a the cl in https://codereview.chromium.org/2293913003/ into one cl.
The combined cl will roll in build files from 2 and add task_queue.cc in webrtc_overrides and build task_queue_unittest.cc as part of content_unittests to test task_queue.cc in webrtc_overrides.
4... Start using task queues in webrtc........
BUG=webrtc:5687
Review-Url: https://codereview.webrtc.org/2289203002
Cr-Commit-Position: refs/heads/master@{#13983}
Log the DTLS handshake error code in OpenSSLStreamAdapter.
Forward the error code to WebRTCSession with the Signals.
This part is only for the WebRTC native code.
To make it work, need another CL for Chromium.
BUG=webrtc:5959
Review-Url: https://codereview.webrtc.org/2167363002
Cr-Commit-Position: refs/heads/master@{#13940}
The code that extracts certificate stats from an SSLCertificate and its
certificate chain is moved into SSLCertificate::GetStats. The stats
collector code loops through the resulting SSLCertificateStats and
creates the StatsReports for those stats.
This will allow the new stats collector to reuse GetStats in a future
CL.
BUG=chromium:627816, chromium:629436
Review-Url: https://codereview.webrtc.org/2259283002
Cr-Commit-Position: refs/heads/master@{#13917}
So that we don't have to use assert(). Includes one sample call site.
NOTRY=true
BUG=chromium:617124
Review-Url: https://codereview.webrtc.org/2262173002
Cr-Commit-Position: refs/heads/master@{#13862}
tests.
Note: The webrtc/base/test/ folder is new.
Currently not used, I intend to use this in another CL.
BUG=chromium:627816
NOPRESUBMIT=TRUE
NOTRY=TRUE
Review-Url: https://codereview.webrtc.org/2238073003
Cr-Commit-Position: refs/heads/master@{#13750}
The test worked by sleeping a certain time, then checking that the
difference between recv timestamps before and after the sleep was
within some margin of the requested sleep time.
However, this means that imprecision of SleepMs makes the test flaky.
This source of flakiness can be removed by comparing to the actual
time slept instead of the requested time.
Also making the margin larger, to further reduce the likelihood of
flakiness.
R=pthatcher@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2111043004 .
Cr-Commit-Position: refs/heads/master@{#13733}
magjed@ is the author of two out of three files in webrtc/base/java
(ThreadUtils.java and Size.java). They were originally created in
webrtc/api/android/java, but were moved to base/ in order to be
accessible from e.g. webrtc/modules/audio_device/android/java.
TBR=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/2233793002 .
Cr-Commit-Position: refs/heads/master@{#13707}
This prevents biased modulo arithmetic when selecting a character for a
random value from the provided table.
BUG=webrtc:5870
Review-Url: https://codereview.webrtc.org/2115793003
Cr-Commit-Position: refs/heads/master@{#13683}
RTC_CHECK in functions that return the random value.
BUG=webrtc:6072
Review-Url: https://codereview.webrtc.org/2119003002
Cr-Commit-Position: refs/heads/master@{#13682}
GCM cipher suites are optional (disabled by default) and can be enabled
through "PeerConnectionFactoryInterface::Options".
If compiled with Chromium (i.e. "ENABLE_EXTERNAL_AUTH" is defined), no
GCM ciphers can be used yet (see https://crbug.com/628400).
BUG=webrtc:5222, 628400
Review-Url: https://codereview.webrtc.org/1528843005
Cr-Commit-Position: refs/heads/master@{#13635}
This change makes WebRTC no longer stop sending video when we receive an
EWOULDBLOCK error from the operating system. This was previously
causing calls on a slow link (where the first hop is slow) to rapidly
oscillate between starting and stopping video.
We still do need to stop sending packets if there is no known good
connection we can use for that. We used to generate a synthetic
EWOULDBLOCK error in that case. This CL replaces it with a different
code (ENOTCONN); EWOULDBLOCK no longer stops the stream but ENOTCONN
does.
I've updated all the places where we seemed to be generating EWOULDBLOCK
for reasons other than some buffer been full; please give it a thorough
look in case I missed something.
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2192963002 .
Cr-Commit-Position: refs/heads/master@{#13566}
This CL fixes a crash that could happen when JSON event tracing is
shutting down. The cause of the crash was the fact that the logger
thread function was returning 'true', causing the platform thread to run
it repeatedly even though that wasn't the intention.
Usually the EventLogger::Stop() function would set the event requesting
the logging thread to clean up and close the file, and then immediately
call PlatformThread::Stop() which would stop the outer loop. The Log()
function would only run once and everything behaves as expected.
However, if a context switch happens between the shutdown_event_.Set()
and logging_thread_.Stop() calls in EventLogger::Stop(), the logger
thread function would close the file and exit the Log() method, while
PlatformThread will rerun it again. So the Log() function runs twice,
and the second time output_file_ is NULL which either causes the DCHECK
to fail (in debug builds) or the fprintf() to crash with SIGSEGV (in
release builds).
The fix simply changes the return value of the thread function to false
so it never runs twice.
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2168283002 .
Cr-Commit-Position: refs/heads/master@{#13510}
Necessary when compiling this file on a case-sensitive file system.
BUG=chromium:495204,chromium:617318
Review-Url: https://codereview.webrtc.org/2145373004
Cr-Commit-Position: refs/heads/master@{#13488}
After disabling all of these, the rest of the tests pass, at least on
my Nexus 7 device.
BUG=webrtc:4364
Review-Url: https://codereview.webrtc.org/2151823002
Cr-Commit-Position: refs/heads/master@{#13485}
This it to avoid requiring targets that include header files that in turn use SequenceTaskedChecker, to also have to define the macros needed by TaskQueue.
BUG=webrtc:5687
Review-Url: https://codereview.webrtc.org/2145393003
Cr-Commit-Position: refs/heads/master@{#13482}
It causes an asan initialization-order-fiasco in trying to read the
names of other globally constructed data:
==21449==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x7f6f297bc5e8 at pc 0x7f6f26b332a7 bp 0x7ffd479f8cb0 sp 0x7ffd479f8ca8
READ of size 8 at 0x7f6f297bc5e8 thread T0
#0 0x7f6f26b332a6 in name
webrtc/base/flags.h:83:38
#1 0x7f6f26b332a6 in Lookup
webrtc/base/flags.cc:133
#2 0x7f6f26b332a6 in rtc::FlagList::Register(rtc::Flag*)
webrtc/base/flags.cc:260
#3 0x7f6f2529972b in __cxx_global_var_init.1
BUG=
Review-Url: https://codereview.webrtc.org/2110963004
Cr-Commit-Position: refs/heads/master@{#13479}
This updates how we initialize timer events to be the same way as we initialize non-timer events.
BUG=
Review-Url: https://codereview.webrtc.org/2147973002
Cr-Commit-Position: refs/heads/master@{#13468}
Reason for revert:
Upstream fixes in place, should be OK now.
Original issue's description:
> Revert of Refactor NACK bitrate allocation (patchset #16 id:300001 of https://codereview.webrtc.org/2061423003/ )
>
> Reason for revert:
> Breaks upstream code.
>
> Original issue's description:
> > Refactor NACK bitrate allocation
> >
> > Nack bitrate allocation should not be done on a per-rtp-module basis,
> > but rather shared bitrate pool per call. This CL moves allocation to the
> > pacer and cleans up a bunch if bitrate stats handling.
> >
> > BUG=
> > R=danilchap@webrtc.org, stefan@webrtc.org, tommi@webrtc.org
> >
> > Committed: 5fc59e810b
>
> TBR=tommi@webrtc.org,danilchap@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/e5dd44101eca485f5ad12e5f7ce6f6b0d204116b
> Cr-Commit-Position: refs/heads/master@{#13417}
TBR=tommi@webrtc.org,danilchap@webrtc.org,stefan@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=
Review-Url: https://codereview.webrtc.org/2146013002
Cr-Commit-Position: refs/heads/master@{#13465}
event_set() has been deprecated and doesn't allow passing the main loop to be passed to initialize the event. event_assign() is the method to call in Event2 when available. However, we still need to be compatible with Chromium's version of libevent, so there's an #ifdef check in the meantime.
BUG=
Review-Url: https://codereview.webrtc.org/2141193002
Cr-Commit-Position: refs/heads/master@{#13454}
SequencedTaskChecker is a helper class used to help verify that some methods
of a class are called on the same task queue or thread. A
SequencedTaskChecker is bound to a a task queue if the object is
created on a task queue, or a thread otherwise.
BUG=webrtc:5687
Review-Url: https://codereview.webrtc.org/2125113003
Cr-Commit-Position: refs/heads/master@{#13452}
The issue was that if the main entry routine of the thread would get called before the first APC, the thread would hang on a GetMessage() call and the APC sent to initialize the thread, would never run.
BUG=
Review-Url: https://codereview.webrtc.org/2139723003
Cr-Commit-Position: refs/heads/master@{#13438}
Reason for revert:
It keeps breaking upstream.
Original issue's description:
> Reland Issue 2061423003: Refactor NACK bitrate allocation
>
> This is a reland of https://codereview.webrtc.org/2061423003/
> Which was reverted in https://codereview.webrtc.org/2131913003/
>
> The reason for the revert was that some upstream code used
> RtpSender::SetTargetBitrate(). I've added that back as a no-op until we
> it's been brought up to date.
>
> TBR=tommi@webrtc.org
>
> Committed: 05ce4ae31fTBR=tommi@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.webrtc.org/2130423002
Cr-Commit-Position: refs/heads/master@{#13419}