1073 Commits

Author SHA1 Message Date
kjellander
ed754e71ae Enable GN check for webrtc/base
It's not possible to enable it for the rtc_base_approved
target but since a larger refactoring is ongoing for webrtc/base
this CL doesn't attempt to fix that.

Changes made:
* Move webrtc/system_wrappers/include/stringize_macros.h into
  webrtc/base:rtc_base_approved_unittests (and corresponding
  unit test to rtc_base_approved_unittests).
* Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
* Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
  webrtc/base.
* Remove unused use include of webrtc/base/fileutils.h in
  webrtc/base/pathutils.cc

BUG=webrtc:6828, webrtc:3806, webrtc:7480
NOTRY=True

Review-Url: https://codereview.webrtc.org/2717083002
Cr-Commit-Position: refs/heads/master@{#17766}
2017-04-19 15:37:36 +00:00
kwiberg
d0d81485f2 base/testutils.h: Use namespace webrtc::testing instead of plain testing
We shouldn't pollute the global namespace.

BUG=webrtc:7484

Review-Url: https://codereview.webrtc.org/2819473004
Cr-Commit-Position: refs/heads/master@{#17735}
2017-04-18 10:18:22 +00:00
magjed
282d49f0ca Reland of Android Logging.java: Load native library only when needed (patchset #1 id:1 of https://codereview.webrtc.org/2814133002/ )
Reason for revert:
Fix bug in original CL.

Original issue's description:
> Revert of Android Logging.java: Load native library only when needed (patchset #2 id:2 of https://codereview.webrtc.org/2817593003/ )
>
> Reason for revert:
> Change in Logging.java breaking compilation (incorrect reference to enum)
>
> Original issue's description:
> > Reland of Android Logging.java: Load native library only when needed (patchset #1 id:1 of https://codereview.webrtc.org/2816753002/ )
> >
> > Reason for revert:
> > Fix bug in original CL.
> >
> > Original issue's description:
> > > Revert of Android Logging.java: Load native library only when needed (patchset #3 id:40001 of https://codereview.webrtc.org/2803203002/ )
> > >
> > > Reason for revert:
> > > Breaks C++ logs in Java apps.
> > >
> > > Original issue's description:
> > > > Android Logging.java: Load native library only when needed
> > > >
> > > > Logging.java currently always tries to load jingle_peerconnection_so in
> > > > the static section, but some clients don't want to use it. This CL loads
> > > > jingle_peerconnection_so only when a client requests it by calling one
> > > > of:
> > > >  * Logging.enableLogThreads
> > > >  * Logging.enableLogTimeStamps
> > > >  * Logging.enableTracing
> > > >  * Logging.enableLogToDebugOutput
> > > >
> > > > BUG=b/36410678
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2803203002
> > > > Cr-Commit-Position: refs/heads/master@{#17647}
> > > > Committed: dee5eb14e1
> > >
> > > TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,magjed@webrtc.org
> > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > BUG=b/36410678
> > >
> > > Review-Url: https://codereview.webrtc.org/2816753002
> > > Cr-Commit-Position: refs/heads/master@{#17676}
> > > Committed: 6e4a4427dc
> >
> > TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=b/36410678
> >
> > Review-Url: https://codereview.webrtc.org/2817593003
> > Cr-Commit-Position: refs/heads/master@{#17677}
> > Committed: 297714619f
>
> TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org,magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=b/36410678
>
> Review-Url: https://codereview.webrtc.org/2814133002
> Cr-Commit-Position: refs/heads/master@{#17678}
> Committed: 06034c7d64

TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org,lliuu@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
BUG=b/36410678

Review-Url: https://codereview.webrtc.org/2813363004
Cr-Commit-Position: refs/heads/master@{#17694}
2017-04-13 11:17:02 +00:00
lliuu
06034c7d64 Revert of Android Logging.java: Load native library only when needed (patchset #2 id:2 of https://codereview.webrtc.org/2817593003/ )
Reason for revert:
Change in Logging.java breaking compilation (incorrect reference to enum)

Original issue's description:
> Reland of Android Logging.java: Load native library only when needed (patchset #1 id:1 of https://codereview.webrtc.org/2816753002/ )
>
> Reason for revert:
> Fix bug in original CL.
>
> Original issue's description:
> > Revert of Android Logging.java: Load native library only when needed (patchset #3 id:40001 of https://codereview.webrtc.org/2803203002/ )
> >
> > Reason for revert:
> > Breaks C++ logs in Java apps.
> >
> > Original issue's description:
> > > Android Logging.java: Load native library only when needed
> > >
> > > Logging.java currently always tries to load jingle_peerconnection_so in
> > > the static section, but some clients don't want to use it. This CL loads
> > > jingle_peerconnection_so only when a client requests it by calling one
> > > of:
> > >  * Logging.enableLogThreads
> > >  * Logging.enableLogTimeStamps
> > >  * Logging.enableTracing
> > >  * Logging.enableLogToDebugOutput
> > >
> > > BUG=b/36410678
> > >
> > > Review-Url: https://codereview.webrtc.org/2803203002
> > > Cr-Commit-Position: refs/heads/master@{#17647}
> > > Committed: dee5eb14e1
> >
> > TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,magjed@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=b/36410678
> >
> > Review-Url: https://codereview.webrtc.org/2816753002
> > Cr-Commit-Position: refs/heads/master@{#17676}
> > Committed: 6e4a4427dc
>
> TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=b/36410678
>
> Review-Url: https://codereview.webrtc.org/2817593003
> Cr-Commit-Position: refs/heads/master@{#17677}
> Committed: 297714619f

TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org,magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=b/36410678

Review-Url: https://codereview.webrtc.org/2814133002
Cr-Commit-Position: refs/heads/master@{#17678}
2017-04-12 17:13:21 +00:00
magjed
297714619f Reland of Android Logging.java: Load native library only when needed (patchset #1 id:1 of https://codereview.webrtc.org/2816753002/ )
Reason for revert:
Fix bug in original CL.

Original issue's description:
> Revert of Android Logging.java: Load native library only when needed (patchset #3 id:40001 of https://codereview.webrtc.org/2803203002/ )
>
> Reason for revert:
> Breaks C++ logs in Java apps.
>
> Original issue's description:
> > Android Logging.java: Load native library only when needed
> >
> > Logging.java currently always tries to load jingle_peerconnection_so in
> > the static section, but some clients don't want to use it. This CL loads
> > jingle_peerconnection_so only when a client requests it by calling one
> > of:
> >  * Logging.enableLogThreads
> >  * Logging.enableLogTimeStamps
> >  * Logging.enableTracing
> >  * Logging.enableLogToDebugOutput
> >
> > BUG=b/36410678
> >
> > Review-Url: https://codereview.webrtc.org/2803203002
> > Cr-Commit-Position: refs/heads/master@{#17647}
> > Committed: dee5eb14e1
>
> TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,magjed@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=b/36410678
>
> Review-Url: https://codereview.webrtc.org/2816753002
> Cr-Commit-Position: refs/heads/master@{#17676}
> Committed: 6e4a4427dc

TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,brandtr@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=b/36410678

Review-Url: https://codereview.webrtc.org/2817593003
Cr-Commit-Position: refs/heads/master@{#17677}
2017-04-12 17:03:32 +00:00
brandtr
6e4a4427dc Revert of Android Logging.java: Load native library only when needed (patchset #3 id:40001 of https://codereview.webrtc.org/2803203002/ )
Reason for revert:
Breaks C++ logs in Java apps.

Original issue's description:
> Android Logging.java: Load native library only when needed
>
> Logging.java currently always tries to load jingle_peerconnection_so in
> the static section, but some clients don't want to use it. This CL loads
> jingle_peerconnection_so only when a client requests it by calling one
> of:
>  * Logging.enableLogThreads
>  * Logging.enableLogTimeStamps
>  * Logging.enableTracing
>  * Logging.enableLogToDebugOutput
>
> BUG=b/36410678
>
> Review-Url: https://codereview.webrtc.org/2803203002
> Cr-Commit-Position: refs/heads/master@{#17647}
> Committed: dee5eb14e1

TBR=sakal@webrtc.org,glaznev@webrtc.org,noahric@chromium.org,magjed@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=b/36410678

Review-Url: https://codereview.webrtc.org/2816753002
Cr-Commit-Position: refs/heads/master@{#17676}
2017-04-12 16:28:24 +00:00
magjed
dee5eb14e1 Android Logging.java: Load native library only when needed
Logging.java currently always tries to load jingle_peerconnection_so in
the static section, but some clients don't want to use it. This CL loads
jingle_peerconnection_so only when a client requests it by calling one
of:
 * Logging.enableLogThreads
 * Logging.enableLogTimeStamps
 * Logging.enableTracing
 * Logging.enableLogToDebugOutput

BUG=b/36410678

Review-Url: https://codereview.webrtc.org/2803203002
Cr-Commit-Position: refs/heads/master@{#17647}
2017-04-11 11:21:50 +00:00
kwiberg
0d4e068d0a Make safe_cmp::* constexpr
Because it's easy and generally useful, and because a later CL in this
series needs it.

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2808603002
Cr-Commit-Position: refs/heads/master@{#17633}
2017-04-11 05:44:07 +00:00
kwiberg
b0f7e39fd4 Move IsIntlike to type_traits.h
I'll start using it outside safe_compare.h soon.

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2809513002
Cr-Commit-Position: refs/heads/master@{#17620}
2017-04-10 13:56:58 +00:00
nisse
2042c16be0 Revert of Delete class ScopedPtrCollection. Replaced with vector of unique_ptr. (patchset #1 id:1 of https://codereview.webrtc.org/2808463002/ )
Reason for revert:
Deleting scopedptrcollection.h broke an internal project.

Original issue's description:
> Delete class ScopedPtrCollection. Replaced with vector of unique_ptr.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2808463002
> Cr-Commit-Position: refs/heads/master@{#17605}
> Committed: 188596f20f

TBR=pthatcher@webrtc.org,kwiberg@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/2812553002
Cr-Commit-Position: refs/heads/master@{#17607}
2017-04-10 07:31:33 +00:00
nisse
188596f20f Delete class ScopedPtrCollection. Replaced with vector of unique_ptr.
BUG=None

Review-Url: https://codereview.webrtc.org/2808463002
Cr-Commit-Position: refs/heads/master@{#17605}
2017-04-10 07:02:52 +00:00
mbonadei
7c2c8438f1 Reland of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #1 id:1 of https://codereview.webrtc.org/2786363002/ )
Reason for revert:
Trying to re-land after solving some related issues.

There are no changes compared to the original CL.

Original issue's description:
> Revert of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #16 id:300001 of https://codereview.webrtc.org/2747863003/ )
>
> Reason for revert:
> I will try to reland next week because it is causing some problems.
>
> Original issue's description:
> > To accommodate some downstream WebRTC users we need to loosen
> > the coupling between our code and the //third_party/protobuf.
> >
> > This includes using typedefs to define strings instead of
> > assuming std::string.
> >
> > After this refactoring it will be possible to link with other
> > protobuf implementations than the current one.
> >
> > We moved the PRESUBMIT check to another CL [1]. The goal of this
> > presubmit is to avoid the direct usage of google::protobuf outside
> > of the webrtc/base/protobuf_utils.h header file.
> >
> > [1] - https://codereview.webrtc.org/2753823003/
> >
> > BUG=webrtc:7340
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2747863003
> > Cr-Commit-Position: refs/heads/master@{#17466}
> > Committed: 16ab93b952
>
> TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7340
>
> Review-Url: https://codereview.webrtc.org/2786363002
> Cr-Commit-Position: refs/heads/master@{#17483}
> Committed: d00aad5eb2

TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340
NOTRY=True

Review-Url: https://codereview.webrtc.org/2791963003
Cr-Commit-Position: refs/heads/master@{#17584}
2017-04-07 07:59:12 +00:00
kwiberg
388fe425c7 Make WARN_UNUSED_RESULT a no-op on gcc
Because on gcc, cast to void doesn't silence the warning. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Also add an RTC_ prefix to the macro instead of only defining it if it
wasn't already defined, to ensure that we always get our own version.

BUG=none

Review-Url: https://codereview.webrtc.org/2797983003
Cr-Commit-Position: refs/heads/master@{#17563}
2017-04-06 11:32:27 +00:00
ossu
a280f7c026 Added integer parsing functions in base/string_to_number.h
They provide parsing of numbers from char* and std::string into any of
the fundamental integer types. Values are returned
in an rtc::Optional, which is left empty if parsing was unsuccessful.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2696003004
Cr-Commit-Position: refs/heads/master@{#17557}
2017-04-06 09:02:15 +00:00
kwiberg
1ba21eb063 Add [c]begin() and [c]end() member functions to rtc::Buffer
I can't believe it's been this long before I found out we didn't have
them...

BUG=none

Review-Url: https://codereview.webrtc.org/2804673002
Cr-Commit-Position: refs/heads/master@{#17544}
2017-04-05 14:38:06 +00:00
mbonadei
d00aad5eb2 Revert of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #16 id:300001 of https://codereview.webrtc.org/2747863003/ )
Reason for revert:
I will try to reland next week because it is causing some problems.

Original issue's description:
> To accommodate some downstream WebRTC users we need to loosen
> the coupling between our code and the //third_party/protobuf.
>
> This includes using typedefs to define strings instead of
> assuming std::string.
>
> After this refactoring it will be possible to link with other
> protobuf implementations than the current one.
>
> We moved the PRESUBMIT check to another CL [1]. The goal of this
> presubmit is to avoid the direct usage of google::protobuf outside
> of the webrtc/base/protobuf_utils.h header file.
>
> [1] - https://codereview.webrtc.org/2753823003/
>
> BUG=webrtc:7340
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2747863003
> Cr-Commit-Position: refs/heads/master@{#17466}
> Committed: 16ab93b952

TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340

Review-Url: https://codereview.webrtc.org/2786363002
Cr-Commit-Position: refs/heads/master@{#17483}
2017-03-31 10:08:07 +00:00
jbauch
5533bd36fe Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ )
Reason for revert:
The problem with the internal project has been solved according to mbonadei@

Original issue's description:
> Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ )
>
> Reason for revert:
> Breaks internal project.
>
> Original issue's description:
> > Reland: Use native (optimized) functions for byte order conversion.
> >
> > Instead of manually copying single bytes, the native functions like "htobe32"
> > are used.
> >
> > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in
> > https://codereview.webrtc.org/2757703002/
> >
> > Reland with the compilation errors fixed.
> >
> > BUG=None
> >
> > Review-Url: https://codereview.webrtc.org/2751403003
> > Cr-Commit-Position: refs/heads/master@{#17280}
> > Committed: c8a4c1f24c
>
> TBR=tommi@webrtc.org,jbauch@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/2755103002
> Cr-Commit-Position: refs/heads/master@{#17282}
> Committed: 44122bd0f9

TBR=tommi@webrtc.org,kthelgason@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=None

Review-Url: https://codereview.webrtc.org/2786993003
Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 08:42:09 +00:00
mbonadei
16ab93b952 To accommodate some downstream WebRTC users we need to loosen
the coupling between our code and the //third_party/protobuf.

This includes using typedefs to define strings instead of
assuming std::string.

After this refactoring it will be possible to link with other
protobuf implementations than the current one.

We moved the PRESUBMIT check to another CL [1]. The goal of this
presubmit is to avoid the direct usage of google::protobuf outside
of the webrtc/base/protobuf_utils.h header file.

[1] - https://codereview.webrtc.org/2753823003/

BUG=webrtc:7340
NOTRY=True

Review-Url: https://codereview.webrtc.org/2747863003
Cr-Commit-Position: refs/heads/master@{#17466}
2017-03-30 08:24:20 +00:00
kthelgason
61abe15829 Add Darwin thread.h implementation.
Due to quirks of the Cocoa runtime several platform-specific fixes were
in place. See the deleted files maccocoathreadhelper and
scoped_autorelease_pool for examples. There is no way to do a stack-based
RAII autoreleasepool that is compatible with ARC, and autoreleasepool
blocks can't be used with c++. The solution was to separate out the
implementation of some methods in thread.h to an ObjC++ file for Darwin
platforms, allowing us to get rid of the helper classes and enable ARC
everywhere.

BUG=webrtc:6412

Review-Url: https://codereview.webrtc.org/2784483002
Cr-Commit-Position: refs/heads/master@{#17436}
2017-03-29 09:32:36 +00:00
zstein
f42cc9d8d9 Add MakeUnique from chromium and change StunMessage::AddAttribute to take a unique_ptr.
BUG=NONE

Review-Url: https://codereview.webrtc.org/2757893003
Cr-Commit-Position: refs/heads/master@{#17403}
2017-03-27 23:17:19 +00:00
nisse
0be49d8d10 Delete unused Pathname methods.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2745073004
Cr-Commit-Position: refs/heads/master@{#17388}
2017-03-27 11:37:14 +00:00
deadbeef
f137e97adb Revert of Removing HTTPS and SOCKS proxy server code. (patchset #2 id:20001 of https://codereview.webrtc.org/2731673002/ )
Also needed to revert these CLs, which removed code used by the
code being un-removed:
https://codereview.webrtc.org/2745523004
https://codereview.webrtc.org/2754033003
https://codereview.webrtc.org/2758943002

Reason for revert:
This code is still being used by native application developers, so we should send a PSA announcing the deprecation and suggest an alternative before removing it.

Original issue's description:
> Removing HTTPS and SOCKS proxy server code.
>
> This isn't used any more so there's no point in maintaining it.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2731673002
> Cr-Commit-Position: refs/heads/master@{#17016}
> Committed: a1991c5175

TBR=pthatcher@webrtc.org
NOPRESUBMIT=true
NOTRY=true
BUG=None

Review-Url: https://codereview.webrtc.org/2766063005
Cr-Commit-Position: refs/heads/master@{#17369}
2017-03-23 22:45:49 +00:00
nisse
7b3ce5b872 Delete FilesystemInterface::CopyFile.
Only use of this method was to implement the cross-device case of
MoveFile on unix systems.

In turn, only use of the MoveFile method is in
FileRotatingStream::RotateFiles. Since file rotation should never
involve any copying of log data, the MoveFile fallback to copying can
be deleted.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2747373003
Cr-Commit-Position: refs/heads/master@{#17364}
2017-03-23 17:54:16 +00:00
tommi
7c3da27141 Add a missing DCHECK to PlatformThread::SetPriority.
This DCHECK is for the 'new and improved' way of setting thread priority.
What could happen is that code that's migrating over to the new method
might still have a lingering SetPriority call, that could incorrectly bind the
'spawned_thread_checker_' to the construction thread.

BUG=none

Review-Url: https://codereview.webrtc.org/2753423002
Cr-Commit-Position: refs/heads/master@{#17305}
2017-03-20 10:47:17 +00:00
kthelgason
44122bd0f9 Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ )
Reason for revert:
Breaks internal project.

Original issue's description:
> Reland: Use native (optimized) functions for byte order conversion.
>
> Instead of manually copying single bytes, the native functions like "htobe32"
> are used.
>
> The previous CL https://codereview.webrtc.org/2738063005/ got reverted in
> https://codereview.webrtc.org/2757703002/
>
> Reland with the compilation errors fixed.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2751403003
> Cr-Commit-Position: refs/heads/master@{#17280}
> Committed: c8a4c1f24c

TBR=tommi@webrtc.org,jbauch@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/2755103002
Cr-Commit-Position: refs/heads/master@{#17282}
2017-03-17 09:28:28 +00:00
kthelgason
e9ad37ca06 Delete unused classes from stream.cc
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2754033003
Cr-Commit-Position: refs/heads/master@{#17281}
2017-03-17 08:06:49 +00:00
jbauch
c8a4c1f24c Reland: Use native (optimized) functions for byte order conversion.
Instead of manually copying single bytes, the native functions like "htobe32"
are used.

The previous CL https://codereview.webrtc.org/2738063005/ got reverted in
https://codereview.webrtc.org/2757703002/

Reland with the compilation errors fixed.

BUG=None

Review-Url: https://codereview.webrtc.org/2751403003
Cr-Commit-Position: refs/heads/master@{#17280}
2017-03-17 05:49:50 +00:00
jbauch
8f05ab2621 Revert of Use native (optimized) functions for byte order conversion. (patchset #3 id:40001 of https://codereview.webrtc.org/2738063005/ )
Reason for revert:
Breaks Chromium FYI bots:
http://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/22469
http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/14885

FAILED: newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o
/b/c/goma_client/gomacc ../../native_client/toolchain/linux_x86/pnacl_newlib/bin/pnacl-clang++ -MMD -MF newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o.d -DNACL_TC_REV=62bfd122aee87d4eb4a7876950e18c793c626cd0 -Dtimezone=_timezone -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DUSE_WEBRTC_DEV_BRANCH -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DNO_MAIN_THREAD_WRAPPING -I../../third_party/boringssl/src/include -I../.. -Inewlib_pnacl/gen -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/boringssl/src/include -I../../native_client_sdk/src/libraries -I../../native_client_sdk/src/libraries/nacl_io/include -I../../native_client_sdk/src/libraries/third_party/newlib-extras -Wno-uninitialized -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Werror -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/webrtc/base/networkmonitor.cc -o newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o
In file included from ../../third_party/webrtc/base/networkmonitor.cc:11:
In file included from ../../third_party/webrtc/base/networkmonitor.h:16:
In file included from ../../third_party/webrtc/base/thread.h:25:
In file included from ../../third_party/webrtc/base/messagequeue.h:31:
In file included from ../../third_party/webrtc/base/socketserver.h:15:
In file included from ../../third_party/webrtc/base/socketfactory.h:14:
In file included from ../../third_party/webrtc/base/socket.h:30:
In file included from ../../third_party/webrtc/base/socketaddress.h:18:
In file included from ../../third_party/webrtc/base/ipaddress.h:29:
../../third_party/webrtc/base/byteorder.h:37:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^
1 error generated.

Original issue's description:
> Use native (optimized) functions for byte order conversion.
>
> Instead of manually copying single bytes, the native functions like "htobe32"
> are used.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2738063005
> Cr-Commit-Position: refs/heads/master@{#17277}
> Committed: 38fd44e51c

TBR=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/2757703002
Cr-Commit-Position: refs/heads/master@{#17278}
2017-03-16 17:34:37 +00:00
jbauch
38fd44e51c Use native (optimized) functions for byte order conversion.
Instead of manually copying single bytes, the native functions like "htobe32"
are used.

BUG=None

Review-Url: https://codereview.webrtc.org/2738063005
Cr-Commit-Position: refs/heads/master@{#17277}
2017-03-16 17:15:12 +00:00
sakal
996a83c4c8 Better handling of error condition in MediaCodecVideoEncoder.
BUG=b/36082499

Review-Url: https://codereview.webrtc.org/2748123002
Cr-Commit-Position: refs/heads/master@{#17246}
2017-03-15 12:53:14 +00:00
tommi
83722268d6 TaskQueue[Win] DOS handling
BUG=webrtc:7341

Review-Url: https://codereview.webrtc.org/2750853002
Cr-Commit-Position: refs/heads/master@{#17242}
2017-03-15 11:36:29 +00:00
tommi
0b942150d3 Refactor Windows TaskQueue code to only need a single high res timer.
BUG=webrtc:7151

Review-Url: https://codereview.webrtc.org/2733723002
Cr-Commit-Position: refs/heads/master@{#17170}
2017-03-10 17:33:53 +00:00
nisse
05a087802b Reland of Delete cryptstring.h and cryptstring.cc. (patchset #1 id:1 of https://codereview.webrtc.org/2742743002/ )
Reason for revert:
CryptString usage is now deleted in Chrome, see cl https://codereview.chromium.org/2738973004/

Original issue's description:
> Revert of Delete cryptstring.h and cryptstring.cc. (patchset #1 id:1 of https://codereview.webrtc.org/2740633003/ )
>
> Reason for revert:
> It turns out cryptstring was used by Chrome. In the xmpp code recently moved there from webrtc.
>
> So this code has to be moved too, it canät just be deleted.
>
> Original issue's description:
> > Delete cryptstring.h and cryptstring.cc.
> >
> > They became unused with cl https://codereview.webrtc.org/2731673002/
> >
> > BUG=webrtc:6424
> >
> > Review-Url: https://codereview.webrtc.org/2740633003
> > Cr-Commit-Position: refs/heads/master@{#17128}
> > Committed: 822638b481
>
> TBR=pthatcher@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2742743002
> Cr-Commit-Position: refs/heads/master@{#17130}
> Committed: d665207601

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

Review-Url: https://codereview.webrtc.org/2745523004
Cr-Commit-Position: refs/heads/master@{#17160}
2017-03-10 08:27:45 +00:00
jbauch
f8f457bd3f Return correct type from OpenSSLStreamAdapter::VerifyPeerCertificate.
The function signature expects to return a "bool" but in one code path it
returned "0".

BUG=None

Review-Url: https://codereview.webrtc.org/2742893002
Cr-Commit-Position: refs/heads/master@{#17156}
2017-03-10 00:24:57 +00:00
elad.alon
61ce37e2e0 Mark |Clock*| as |const Clock*| (for some CongestionController and BWE related modules)
BUG=None

Review-Url: https://codereview.webrtc.org/2735423002
Cr-Commit-Position: refs/heads/master@{#17148}
2017-03-09 15:09:31 +00:00
ilnik
3e530d20ca Fix CpuTimeTest to tolerate MSAN interference (some background test-related work).
BUG=none

Review-Url: https://codereview.webrtc.org/2739673003
Cr-Commit-Position: refs/heads/master@{#17132}
2017-03-09 08:41:31 +00:00
nisse
b05d9b292a Reland of Delete unused TaskRunner abstraction. (patchset #1 id:1 of https://codereview.webrtc.org/2732363004/ )
Reason for revert:
Chrome includes now updated, see cl https://codereview.chromium.org/2737133002/

Original issue's description:
> Revert of Delete unused TaskRunner abstraction. (patchset #2 id:20001 of https://codereview.webrtc.org/2622923002/ )
>
> Reason for revert:
> I had missed updating a few of Chrome's #includes, breaking the build.
>
> Original issue's description:
> > Delete unused TaskRunner abstraction.
> >
> > This is the fifth and final step in the process started in cl https://codereview.webrtc.org/2696703009/
> >
> > Depends on the landing of a copy of this code in Chrome (step 4), cl
> > https://codereview.chromium.org/2694903005/
> >
> > BUG=webrtc:6424
> >
> > Review-Url: https://codereview.webrtc.org/2622923002
> > Cr-Commit-Position: refs/heads/master@{#17107}
> > Committed: 2d15fdd91b
>
> TBR=pthatcher@webrtc.org,kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2732363004
> Cr-Commit-Position: refs/heads/master@{#17109}
> Committed: 9900be313c

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

Review-Url: https://codereview.webrtc.org/2740063002
Cr-Commit-Position: refs/heads/master@{#17131}
2017-03-09 08:37:26 +00:00
nisse
d665207601 Revert of Delete cryptstring.h and cryptstring.cc. (patchset #1 id:1 of https://codereview.webrtc.org/2740633003/ )
Reason for revert:
It turns out cryptstring was used by Chrome. In the xmpp code recently moved there from webrtc.

So this code has to be moved too, it canät just be deleted.

Original issue's description:
> Delete cryptstring.h and cryptstring.cc.
>
> They became unused with cl https://codereview.webrtc.org/2731673002/
>
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2740633003
> Cr-Commit-Position: refs/heads/master@{#17128}
> Committed: 822638b481

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

Review-Url: https://codereview.webrtc.org/2742743002
Cr-Commit-Position: refs/heads/master@{#17130}
2017-03-09 08:36:04 +00:00
nisse
822638b481 Delete cryptstring.h and cryptstring.cc.
They became unused with cl https://codereview.webrtc.org/2731673002/

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2740633003
Cr-Commit-Position: refs/heads/master@{#17128}
2017-03-09 07:45:48 +00:00
nisse
9900be313c Revert of Delete unused TaskRunner abstraction. (patchset #2 id:20001 of https://codereview.webrtc.org/2622923002/ )
Reason for revert:
I had missed updating a few of Chrome's #includes, breaking the build.

Original issue's description:
> Delete unused TaskRunner abstraction.
>
> This is the fifth and final step in the process started in cl https://codereview.webrtc.org/2696703009/
>
> Depends on the landing of a copy of this code in Chrome (step 4), cl
> https://codereview.chromium.org/2694903005/
>
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2622923002
> Cr-Commit-Position: refs/heads/master@{#17107}
> Committed: 2d15fdd91b

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

Review-Url: https://codereview.webrtc.org/2732363004
Cr-Commit-Position: refs/heads/master@{#17109}
2017-03-08 10:01:07 +00:00
nisse
2d15fdd91b Delete unused TaskRunner abstraction.
This is the fifth and final step in the process started in cl https://codereview.webrtc.org/2696703009/

Depends on the landing of a copy of this code in Chrome (step 4), cl
https://codereview.chromium.org/2694903005/

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2622923002
Cr-Commit-Position: refs/heads/master@{#17107}
2017-03-08 09:45:05 +00:00
deadbeef
b85a88853a Fixing race between CallbackCanceled and CancelCallback in AsyncInvoker.
Pointer was already protected by a critical section in two places but
not the third. Added thread annotations to prevent this from happening
in the future.

BUG=None

Review-Url: https://codereview.webrtc.org/2726263004
Cr-Commit-Position: refs/heads/master@{#17017}
2017-03-03 18:33:18 +00:00
deadbeef
a1991c5175 Removing HTTPS and SOCKS proxy server code.
This isn't used any more so there's no point in maintaining it.

BUG=None

Review-Url: https://codereview.webrtc.org/2731673002
Cr-Commit-Position: refs/heads/master@{#17016}
2017-03-03 18:23:08 +00:00
tommi
db23ea69b6 Add performance tracing for PlatformThread and parts of the video code.
BUG=webrtc:7219

Review-Url: https://codereview.webrtc.org/2729783004
Cr-Commit-Position: refs/heads/master@{#17009}
2017-03-03 15:21:18 +00:00
tommi
5bdee47ede Increase tick precision in TaskQueue on Windows 64.
Hopefully this will reduce the flakiness of PostDelayedTask.

BUG=none

Review-Url: https://codereview.webrtc.org/2728663008
Cr-Commit-Position: refs/heads/master@{#17001}
2017-03-03 13:20:12 +00:00
kwiberg
bfc7f02d79 ArrayView: Support compile-time constant sizes
BUG=none

Review-Url: https://codereview.webrtc.org/2667383006
Cr-Commit-Position: refs/heads/master@{#16981}
2017-03-02 20:33:50 +00:00
tommi
0473b1dc03 Go back to only using sched_yield on Mac (sigh)
Using sched_yield on Linux seems to be causing RestartingSendStreamPreservesRtpStatesWithRtx/0 to never complete.

BUG=webrtc:7187
TBR=solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2732443002
Cr-Commit-Position: refs/heads/master@{#16975}
2017-03-02 16:08:59 +00:00
tommi
500f1b7a32 Add a DCHECK for PlatformThread instances that are too busy.
This adds a simple mechanism that provides protection against
implementations that use the legacy callback type in PlatformThread
and are prone to entering a busy loop.

Enabled only in DCHECK enabled builds.

BUG=webrtc:7187

Review-Url: https://codereview.webrtc.org/2720223003
Cr-Commit-Position: refs/heads/master@{#16973}
2017-03-02 15:07:09 +00:00
kwiberg
d3edd770ad Introduce dchecked_cast, and start using it
It's the faster, less strict cousin of checked_cast.

BUG=none

Review-Url: https://codereview.webrtc.org/2714063002
Cr-Commit-Position: refs/heads/master@{#16958}
2017-03-02 02:52:48 +00:00
danilchap
275234763b Revert of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2725573002/ )
Reason for revert:
breaks linux_ubsan bots.

Original issue's description:
> Reland of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2712133003/ )
>
> Reason for revert:
> Relanding - using sched_yield() in PlatformThread on all posix platforms.
>
> Original issue's description:
> > Revert of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2716683002/ )
> >
> > Reason for revert:
> > Reverting this change since it didn't affect the perf regressions we were seeing and actually seems to have caused more regressions as per comment in the bug.
> >
> > Original issue's description:
> > > Use sched_yield on all POSIX platforms in PlatformThread.
> > > (not only MacOS)
> > >
> > > This is a test to see if perf regressions we're seeing may be related to the use of nanosleep().
> > >
> > > BUG=695438
> > > TBR=solenberg@webrtc.org
> > >
> > > Review-Url: https://codereview.webrtc.org/2716683002 .
> > > Cr-Commit-Position: refs/heads/master@{#16807}
> > > Committed: 384498abb5
> >
> > TBR=solenberg@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=695438
> >
> > Review-Url: https://codereview.webrtc.org/2712133003
> > Cr-Commit-Position: refs/heads/master@{#16833}
> > Committed: 3ba1a8cd1b
>
> TBR=solenberg@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=695438
>
> Review-Url: https://codereview.webrtc.org/2725573002
> Cr-Commit-Position: refs/heads/master@{#16899}
> Committed: 4974df4183

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

Review-Url: https://codereview.webrtc.org/2721893002
Cr-Commit-Position: refs/heads/master@{#16903}
2017-02-28 14:20:38 +00:00