Weakly bind JsonPrefStore's async read task to avoid it coming back after shutdown has been initiated.

BUG=393081

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285941 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add support for loading pak files from arbitrary file regions.

This is to support a new use case for Android: mmap a pak file
directly from the APK (where it will be stored uncompressed)
without extracting it first. This would save both precious space
on the flash and startup time on the first run.
This CL introduces:
 - the necessary changes to base::File to memory map arbitrary
  regions of a file.
 - The corresponding changes (plus unittests)  in DataPack and 
  ResourceBundle to take advantage of the new support.
At present state, this CL is not intended to introduce any
behavioral change.

BUG=394502

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285945 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Fix 2 warnings in the ASan tests.

TBR=thakis@chromium.org
BUG=

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285949 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Move base/data to base/test/data to be with the rest of the test data.

R=brettw@chromium.org

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285961 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Attempt to load system fonts using Custom Font interface of directwrite
instead of system font collection interface.
The theory is that system font collection may sometime appear to hang or just not load fonts on systems with
large number of fonts (in order of 1000+). With custom font collection we want to take control of font loading part and explore ways to improve it further.

This particular approach is loading all fonts inside renderer, we can potentially use this same code load fonts from browser side as and when required.

BUG=394164
R=cpu@chromium.org, jam@chromium.org, scottmg@chromium.org

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Move scoped_observer.h from base_unittests to base. It is not a test.

Found with 'gn check'.

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285985 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 285977 "Attempt to load system fonts using Custom Font in..."

> Attempt to load system fonts using Custom Font interface of directwrite
> instead of system font collection interface.
> The theory is that system font collection may sometime appear to hang or just not load fonts on systems with
> large number of fonts (in order of 1000+). With custom font collection we want to take control of font loading part and explore ways to improve it further.
> 
> This particular approach is loading all fonts inside renderer, we can potentially use this same code load fonts from browser side as and when required.
> 
> BUG=394164
> R=cpu@chromium.org, jam@chromium.org, scottmg@chromium.org
> 
> Review URL: https://codereview.chromium.org/406693003

TBR=shrikant@chromium.org

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@285994 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
[Android] Configurable instrumentation test runner + test SDK levels.

This patch:
  - extracts the instrumentation test runner from the
    AndroidManifest.xml file in the apk.
  - allows test authors to specify a minimum SDK level for
    instrumentation test classes via the MinAndroidSdkLevel annotation.
  - filters the list of instrumentation tests according to the sdk
    levels of all attached devices.
  - speeds up our proguard function by dumping to a temporary file.

BUG=

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@286014 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add beginnings of android_apk and unittest_apk templates

This adds two templates, android_apk and unittest_apk. unittest_apk is
a simple wrapper of android_apk for packaging gtests into apks.

android_apk currently just does the java compilation, processing
resources, and build_config stuff for apks.

BUG=359249

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

git-svn-id: https://src.chromium.org/svn/trunk/src/base@286031 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
[Mac] Fix ProcessUtilTest.FDRemapping for 10.9 and later.

OSX 10.9 introduced a kernel facility which allows tagging file
descriptors to prevent various operations unless the caller knows the
key.  libdispatch uses this facility to tag a file descriptor against
close() or dup(), and this test does both.  Unfortunately, the failure
case is to raise a kernel exception and hang the child process rather
than return an error code.

This change addresses this by attempting to set a guard.  If successful,
the guard is removed and the caller can close the file descriptor as
normal.  If unsuccessful, either the file descriptor is not valid, or it
is guarded and cannot be closed.  Either way, it is skipped.  The test
still succeeds by counting the file descriptors which can be closed.

BUG=338157

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

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