Disk cache: use mmap for cache index on x86.
We are pretty confident that mmap-ing the index would not hurt any existing x86
android devices, but we cannot be so sure about the variety of ARM devices. So
enable it for x86 only for now.
BUG=170344
TEST=instrument mapped_file_avoid_mmap_posix.cc:Flush() and make sure it is not
invoked when run on an x86 device
Review URL: https://chromiumcodereview.appspot.com/12317012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183610 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/net.gyp b/net/net.gyp
index 3419f86e..c890806 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -15,9 +15,12 @@
}, { # chromeos == 0
'use_kerberos%': 1,
}],
- ['OS=="android"', {
+ ['OS=="android" and target_arch != "ia32"', {
# The way the cache uses mmap() is inefficient on some Android devices.
# If this flag is set, we hackily avoid using mmap() in the disk cache.
+ # We are pretty confident that mmap-ing the index would not hurt any
+ # existing x86 android devices, but we cannot be so sure about the
+ # variety of ARM devices. So enable it for x86 only for now.
'posix_avoid_mmap%': 1,
}, {
'posix_avoid_mmap%': 0,