Handle bionic in safe_strerror_posix as well as glibc.

Android's bionic C library is intending to adopt the same semantics as
glibc for strerror_r: define the version that returns char* if the
source is compiled with _GNU_SOURCE instead of the POSIX version which
returns int. Add __BIONIC__ to the condition for
USE_HISTORICAL_STRERRO_R so that Chromium will still work.

BUG=

Review URL: https://codereview.chromium.org/491893002

git-svn-id: http://src.chromium.org/svn/trunk/src/base@291050 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Make class lookup lazy in jni_generator when using lazy method lookup.

This removes the eager class registration from RegisterNatives when possible.

BUG=402003
TBR=sievers@chromium.org, brettw@chromium.org, torne@chromium.org

Review URL: https://codereview.chromium.org/491043002

git-svn-id: http://src.chromium.org/svn/trunk/src/base@291095 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Switch from local random address generation to kernel ASLR

The current random base address generation in the Android chromium linker is prone
to error.  It selects an address at random between 0x20000000 and 0x40000000 and
expects that this will be clear.  This is occasionally untrue for ARM, but very
often untrue for MIPS.  As a consequence, RELRO sharing is being turned off more
frequently than it could be.

This change removes the local random address generation code and instead replaces
it with code that speculatively maps a large region, captures the address returned
by mmap, then unmaps and returns the address.  The expectation is that this region
will remain free for use when the time comes for the crazy linker to map the browser
into it.  This generally holds because the time between these two actions is short
and little, if anything, loads or mmaps between them.  Worst case is that RELRO
sharing turns off as at present, but the probability of this happening should now
be much lower.

Note that capturing the address from mmap relies on Android ASLR being active for
mmap.  This is the default device state since ICS.  The revised random browser
load address is only as entropic as Android's ASLR.

BUG=397634

Review URL: https://codereview.chromium.org/470053003

git-svn-id: http://src.chromium.org/svn/trunk/src/base@291111 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Move default sanitizer options into build/ so that WebRTC can import them.

BUG=302040
TBR=noelallen@chromium.org

Review URL: https://codereview.chromium.org/357623003

git-svn-id: http://src.chromium.org/svn/trunk/src/base@291168 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester.

Design Doc (Googlers Only):
https://docs.google.com/a/google.com/document/d/1RUY0BcxBppdkwFP3T8qbQmQStBRFGsLmuR4WuIXhiCA/edit

BUG=384011
TBR=timsteele@chromium.org

Review URL: https://codereview.chromium.org/379283002

git-svn-id: http://src.chromium.org/svn/trunk/src/base@291207 4ff67af0-8c30-449e-8e8b-ad334ec8d88c