summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-03-31 11:51:25 +0100
committerBen Murdoch <benm@google.com>2014-03-31 11:51:25 +0100
commiteffb81e5f8246d0db0270817048dc992db66e9fb (patch)
treecc45ced7dfde038c8f3d022ee1eeac207a68761e /base
parent4d26337013537c1acafbcb63b9b2b7e404c3adc9 (diff)
downloadchromium_org-effb81e5f8246d0db0270817048dc992db66e9fb.tar.gz
Merge from Chromium at DEPS revision 260458
This commit was generated by merge_to_master.py. Change-Id: I140fa91b7f09c8efba4424e99ccb87b94a11d022
Diffstat (limited to 'base')
-rw-r--r--base/BUILD.gn8
-rw-r--r--base/allocator/BUILD.gn1
-rw-r--r--base/allocator/allocator.gyp5
-rw-r--r--base/allocator/allocator_extension_thunks.target.darwin-arm.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.darwin-mips.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.darwin-x86.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.darwin-x86_64.mk260
-rw-r--r--base/allocator/allocator_extension_thunks.target.linux-arm.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.linux-mips.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.linux-x86.mk2
-rw-r--r--base/allocator/allocator_extension_thunks.target.linux-x86_64.mk260
-rw-r--r--base/allocator/allocator_shim.cc16
-rw-r--r--base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java57
-rw-r--r--base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHelper.java259
-rw-r--r--base/android/javatests/src/org/chromium/base/LibraryLoaderHelperTest.java53
-rwxr-xr-xbase/android/jni_generator/jni_generator.py7
-rwxr-xr-xbase/android/jni_generator/jni_generator_tests.py17
-rw-r--r--base/android/library_loader/library_loader_hooks.cc4
-rw-r--r--base/atomicops.h4
-rw-r--r--base/atomicops_internals_arm64_gcc.h360
-rw-r--r--base/base.gyp13
-rw-r--r--base/base.gypi22
-rw-r--r--base/base.target.darwin-arm.mk5
-rw-r--r--base/base.target.darwin-mips.mk5
-rw-r--r--base/base.target.darwin-x86.mk5
-rw-r--r--base/base.target.darwin-x86_64.mk501
-rw-r--r--base/base.target.linux-arm.mk5
-rw-r--r--base/base.target.linux-mips.mk5
-rw-r--r--base/base.target.linux-x86.mk5
-rw-r--r--base/base.target.linux-x86_64.mk501
-rw-r--r--base/base_i18n.target.darwin-arm.mk2
-rw-r--r--base/base_i18n.target.darwin-mips.mk2
-rw-r--r--base/base_i18n.target.darwin-x86.mk2
-rw-r--r--base/base_i18n.target.darwin-x86_64.mk291
-rw-r--r--base/base_i18n.target.linux-arm.mk2
-rw-r--r--base/base_i18n.target.linux-mips.mk2
-rw-r--r--base/base_i18n.target.linux-x86.mk2
-rw-r--r--base/base_i18n.target.linux-x86_64.mk291
-rw-r--r--base/base_java_application_state.target.darwin-arm.mk2
-rw-r--r--base/base_java_application_state.target.darwin-mips.mk2
-rw-r--r--base/base_java_application_state.target.darwin-x86.mk2
-rw-r--r--base/base_java_application_state.target.darwin-x86_64.mk233
-rw-r--r--base/base_java_application_state.target.linux-arm.mk2
-rw-r--r--base/base_java_application_state.target.linux-mips.mk2
-rw-r--r--base/base_java_application_state.target.linux-x86.mk2
-rw-r--r--base/base_java_application_state.target.linux-x86_64.mk233
-rw-r--r--base/base_java_memory_pressure_level_list.target.darwin-arm.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.darwin-mips.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.darwin-x86.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.darwin-x86_64.mk233
-rw-r--r--base/base_java_memory_pressure_level_list.target.linux-arm.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.linux-mips.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.linux-x86.mk2
-rw-r--r--base/base_java_memory_pressure_level_list.target.linux-x86_64.mk233
-rw-r--r--base/base_jni_headers.target.darwin-arm.mk2
-rw-r--r--base/base_jni_headers.target.darwin-mips.mk2
-rw-r--r--base/base_jni_headers.target.darwin-x86.mk2
-rw-r--r--base/base_jni_headers.target.darwin-x86_64.mk414
-rw-r--r--base/base_jni_headers.target.linux-arm.mk2
-rw-r--r--base/base_jni_headers.target.linux-mips.mk2
-rw-r--r--base/base_jni_headers.target.linux-x86.mk2
-rw-r--r--base/base_jni_headers.target.linux-x86_64.mk414
-rw-r--r--base/base_paths_win.cc7
-rw-r--r--base/base_paths_win.h1
-rw-r--r--base/base_prefs.target.darwin-arm.mk2
-rw-r--r--base/base_prefs.target.darwin-mips.mk2
-rw-r--r--base/base_prefs.target.darwin-x86.mk2
-rw-r--r--base/base_prefs.target.darwin-x86_64.mk275
-rw-r--r--base/base_prefs.target.linux-arm.mk2
-rw-r--r--base/base_prefs.target.linux-mips.mk2
-rw-r--r--base/base_prefs.target.linux-x86.mk2
-rw-r--r--base/base_prefs.target.linux-x86_64.mk275
-rw-r--r--base/base_static.target.darwin-arm.mk2
-rw-r--r--base/base_static.target.darwin-mips.mk2
-rw-r--r--base/base_static.target.darwin-x86.mk2
-rw-r--r--base/base_static.target.darwin-x86_64.mk257
-rw-r--r--base/base_static.target.linux-arm.mk2
-rw-r--r--base/base_static.target.linux-mips.mk2
-rw-r--r--base/base_static.target.linux-x86.mk2
-rw-r--r--base/base_static.target.linux-x86_64.mk257
-rw-r--r--base/bind_unittest.cc4
-rw-r--r--base/compiler_specific.h22
-rw-r--r--base/debug/proc_maps_linux.cc6
-rw-r--r--base/debug/proc_maps_linux_unittest.cc32
-rw-r--r--base/debug/stack_trace.h9
-rw-r--r--base/debug/stack_trace_posix.cc275
-rw-r--r--base/files/file.cc9
-rw-r--r--base/files/file.h3
-rw-r--r--base/files/file_unittest.cc11
-rw-r--r--base/memory/discardable_memory_allocator_android.cc18
-rw-r--r--base/memory/discardable_memory_emulated.cc18
-rw-r--r--base/memory/discardable_memory_manager.cc (renamed from base/memory/discardable_memory_provider.cc)44
-rw-r--r--base/memory/discardable_memory_manager.h (renamed from base/memory/discardable_memory_provider.h)28
-rw-r--r--base/memory/discardable_memory_manager_unittest.cc (renamed from base/memory/discardable_memory_provider_unittest.cc)94
-rw-r--r--base/memory/shared_memory.h4
-rw-r--r--base/memory/shared_memory_posix.cc3
-rw-r--r--base/message_loop/message_loop_unittest.cc25
-rw-r--r--base/metrics/user_metrics.h7
-rw-r--r--base/native_library.h24
-rw-r--r--base/native_library_mac.mm7
-rw-r--r--base/native_library_posix.cc8
-rw-r--r--base/native_library_win.cc15
-rw-r--r--base/prefs/overlay_user_pref_store_unittest.cc68
-rw-r--r--base/prefs/pref_notifier_impl_unittest.cc7
-rw-r--r--base/prefs/pref_service.cc4
-rw-r--r--base/prefs/pref_store_observer_mock.cc22
-rw-r--r--base/prefs/pref_store_observer_mock.h20
-rw-r--r--base/prefs/testing_pref_store.cc61
-rw-r--r--base/prefs/testing_pref_store.h28
-rw-r--r--base/process/memory.cc30
-rw-r--r--base/process/memory.h26
-rw-r--r--base/process/memory_linux.cc28
-rw-r--r--base/process/memory_mac.mm28
-rw-r--r--base/process/memory_unittest.cc85
-rw-r--r--base/process/memory_win.cc11
-rw-r--r--base/process/process_util_unittest.cc3
-rw-r--r--base/security_unittest.cc4
-rw-r--r--base/synchronization/condition_variable_unittest.cc5
-rw-r--r--base/test/BUILD.gn3
-rw-r--r--base/test/test_timeouts.cc2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-arm.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-mips.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86_64.mk259
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.linux-arm.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.linux-mips.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86.mk2
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86_64.mk259
-rw-r--r--base/third_party/nspr/BUILD.gn10
-rw-r--r--base/third_party/nspr/prcpucfg.h51
-rw-r--r--base/third_party/nspr/prcpucfg_freebsd.h337
-rw-r--r--base/third_party/nspr/prcpucfg_linux.h809
-rw-r--r--base/third_party/nspr/prcpucfg_mac.h197
-rw-r--r--base/third_party/nspr/prcpucfg_nacl.h291
-rw-r--r--base/third_party/nspr/prcpucfg_openbsd.h337
-rw-r--r--base/third_party/nspr/prcpucfg_solaris.h203
-rw-r--r--base/third_party/nspr/prcpucfg_win.h256
-rw-r--r--base/third_party/nspr/prtime.cc4
-rw-r--r--base/third_party/nspr/prtime.h18
-rw-r--r--base/third_party/nspr/prtypes.h558
-rw-r--r--base/third_party/symbolize/BUILD.gn1
-rw-r--r--base/third_party/xdg_user_dirs/BUILD.gn1
-rw-r--r--base/threading/platform_thread_mac.mm14
-rw-r--r--base/time/time.cc1
-rw-r--r--base/tools_sanity_unittest.cc14
-rw-r--r--base/win/iat_patch_function.cc5
-rw-r--r--base/win/iat_patch_function.h2
-rw-r--r--base/x11/edid_parser_x11.cc196
-rw-r--r--base/x11/edid_parser_x11.h54
-rw-r--r--base/x11/edid_parser_x11_unittest.cc167
150 files changed, 7182 insertions, 3851 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn
index d07e10b8bc..7aa8659b50 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -5,7 +5,6 @@
import("//build/config/ui.gni")
component("base") {
- external = true
sources = [
"../build/build_config.h",
"third_party/dmg_fp/dmg_fp.h",
@@ -272,15 +271,14 @@ component("base") {
"memory/discardable_memory_allocator_android.cc",
"memory/discardable_memory_allocator_android.h",
"memory/discardable_memory_android.cc",
- "memory/discardable_memory_android.h",
"memory/discardable_memory_emulated.cc",
"memory/discardable_memory_emulated.h",
"memory/discardable_memory_linux.cc",
"memory/discardable_memory_mac.cc",
"memory/discardable_memory_malloc.cc",
"memory/discardable_memory_malloc.h",
- "memory/discardable_memory_provider.cc",
- "memory/discardable_memory_provider.h",
+ "memory/discardable_memory_manager.cc",
+ "memory/discardable_memory_manager.h",
"memory/discardable_memory_win.cc",
"memory/linked_ptr.h",
"memory/manual_constructor.h",
@@ -843,7 +841,6 @@ component("base") {
# library. Note that this library cannot depend on base because base depends on
# base_static.
static_library("base_static") {
- external = true
sources = [
"base_switches.cc",
"base_switches.h",
@@ -853,7 +850,6 @@ static_library("base_static") {
}
component("base_i18n") {
- external = true
sources = [
"i18n/base_i18n_export.h",
"i18n/bidi_line_iterator.cc",
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
index 64d052d7ac..6766911463 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -3,7 +3,6 @@
# found in the LICENSE file.
static_library("allocator_extension_thunks") {
- external = true
sources = [
"allocator_extension_thunks.cc",
"allocator_extension_thunks.h",
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 4d95906153..632e072c08 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -408,11 +408,6 @@
'-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv',
]},
}],
- # Need to distinguish a non-SDK build for Android WebView
- # due to differences in C include files.
- ['OS=="android" and android_webview_build==1', {
- 'defines': ['ANDROID_NON_SDK_BUILD'],
- }],
[ 'use_vtable_verify==1', {
'cflags': [
'-fvtable-verify=preinit',
diff --git a/base/allocator/allocator_extension_thunks.target.darwin-arm.mk b/base/allocator/allocator_extension_thunks.target.darwin-arm.mk
index 8025ab01f1..e8ee3eb564 100644
--- a/base/allocator/allocator_extension_thunks.target.darwin-arm.mk
+++ b/base/allocator/allocator_extension_thunks.target.darwin-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.darwin-mips.mk b/base/allocator/allocator_extension_thunks.target.darwin-mips.mk
index dcb22cac4a..84b5ec20c3 100644
--- a/base/allocator/allocator_extension_thunks.target.darwin-mips.mk
+++ b/base/allocator/allocator_extension_thunks.target.darwin-mips.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.darwin-x86.mk b/base/allocator/allocator_extension_thunks.target.darwin-x86.mk
index 1a60871b53..8c3402b39f 100644
--- a/base/allocator/allocator_extension_thunks.target.darwin-x86.mk
+++ b/base/allocator/allocator_extension_thunks.target.darwin-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.darwin-x86_64.mk b/base/allocator/allocator_extension_thunks.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..e582e9f8ca
--- /dev/null
+++ b/base/allocator/allocator_extension_thunks.target.darwin-x86_64.mk
@@ -0,0 +1,260 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_allocator_allocator_extension_thunks_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/allocator/allocator_extension_thunks.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_allocator_allocator_extension_thunks_gyp
+
+# Alias gyp target name.
+.PHONY: allocator_extension_thunks
+allocator_extension_thunks: base_allocator_allocator_extension_thunks_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/allocator/allocator_extension_thunks.target.linux-arm.mk b/base/allocator/allocator_extension_thunks.target.linux-arm.mk
index 8025ab01f1..e8ee3eb564 100644
--- a/base/allocator/allocator_extension_thunks.target.linux-arm.mk
+++ b/base/allocator/allocator_extension_thunks.target.linux-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.linux-mips.mk b/base/allocator/allocator_extension_thunks.target.linux-mips.mk
index dcb22cac4a..84b5ec20c3 100644
--- a/base/allocator/allocator_extension_thunks.target.linux-mips.mk
+++ b/base/allocator/allocator_extension_thunks.target.linux-mips.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.linux-x86.mk b/base/allocator/allocator_extension_thunks.target.linux-x86.mk
index 1a60871b53..8c3402b39f 100644
--- a/base/allocator/allocator_extension_thunks.target.linux-x86.mk
+++ b/base/allocator/allocator_extension_thunks.target.linux-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/allocator/allocator_extension_thunks.target.linux-x86_64.mk b/base/allocator/allocator_extension_thunks.target.linux-x86_64.mk
new file mode 100644
index 0000000000..e582e9f8ca
--- /dev/null
+++ b/base/allocator/allocator_extension_thunks.target.linux-x86_64.mk
@@ -0,0 +1,260 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_allocator_allocator_extension_thunks_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/allocator/allocator_extension_thunks.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_allocator_allocator_extension_thunks_gyp
+
+# Alias gyp target name.
+.PHONY: allocator_extension_thunks
+allocator_extension_thunks: base_allocator_allocator_extension_thunks_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
index d2dd5a4f05..c0de36e6de 100644
--- a/base/allocator/allocator_shim.cc
+++ b/base/allocator/allocator_shim.cc
@@ -41,8 +41,8 @@ typedef enum {
// See SetupSubprocessAllocator() to specify a default secondary (subprocess)
// allocator.
// TODO(jar): Switch to using TCMALLOC for the renderer as well.
-#if (defined(ADDRESS_SANITIZER) && defined(OS_WIN))
-// The Windows implementation of Asan requires the use of "WINHEAP".
+#if defined(SYZYASAN)
+// SyzyASan requires the use of "WINHEAP".
static Allocator allocator = WINHEAP;
#else
static Allocator allocator = TCMALLOC;
@@ -228,9 +228,9 @@ static void release_free_memory_thunk() {
// The CRT heap initialization stub.
extern "C" int _heap_init() {
-// Don't use the environment variable if ADDRESS_SANITIZER is defined on
-// Windows, as the implementation requires Winheap to be the allocator.
-#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN))
+// Don't use the environment variable if SYZYASAN is defined, as the
+// implementation requires Winheap to be the allocator.
+#if !defined(SYZYASAN)
const char* environment_value = GetenvBeforeMain(primary_name);
if (environment_value) {
if (!stricmp(environment_value, "winheap"))
@@ -356,9 +356,9 @@ void SetupSubprocessAllocator() {
buffer[sizeof(buffer) - 1] = '\0';
if (secondary_length || !primary_length) {
- // Don't use the environment variable if ADDRESS_SANITIZER is defined on
- // Windows, as the implementation require Winheap to be the allocator.
-#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN))
+// Don't use the environment variable if SYZYASAN is defined, as the
+// implementation require Winheap to be the allocator.
+#if !defined(SYZYASAN)
const char* secondary_value = secondary_length ? buffer : "TCMALLOC";
// Force renderer (or other subprocesses) to use secondary_value.
#else
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
index 4e159553d7..c3b3b35fc5 100644
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
@@ -4,6 +4,7 @@
package org.chromium.base.library_loader;
+import android.content.Context;
import android.os.SystemClock;
import android.util.Log;
@@ -41,16 +42,42 @@ public class LibraryLoader {
// library_loader_hooks.cc).
private static boolean sInitialized = false;
+ // One-way switch becomes true if the system library loading failed,
+ // and the right native library was found and loaded by the hack.
+ // The flag is used to report UMA stats later.
+ private static boolean sNativeLibraryHackWasUsed = false;
+
+
/**
- * This method blocks until the library is fully loaded and initialized.
+ * TODO: http://crbug.com/354655
+ * remove this method once WebViewChromiumFactoryProvider.java
+ * changes the call to ensureInitialized(null).
*/
public static void ensureInitialized() throws ProcessInitException {
+ ensureInitialized(null);
+ }
+
+ /**
+ * This method blocks until the library is fully loaded and initialized.
+ *
+ * @param context The context in which the method is called, the caller
+ * may pass in a null context if it doesn't know in which context it
+ * is running, or it doesn't need to work around the issue
+ * http://b/13216167.
+ *
+ * When the context is not null and native library was not extracted
+ * by Android package manager, the LibraryLoader class
+ * will extract the native libraries from APK. This is a hack used to
+ * work around some Sony devices with the following platform bug:
+ * http://b/13216167.
+ */
+ public static void ensureInitialized(Context context) throws ProcessInitException {
synchronized (sLock) {
if (sInitialized) {
// Already initialized, nothing to do.
return;
}
- loadAlreadyLocked();
+ loadAlreadyLocked(context);
initializeAlreadyLocked(CommandLine.getJavaSwitchesOrNull());
}
}
@@ -73,9 +100,9 @@ public class LibraryLoader {
*
* @throws ProcessInitException if the native library failed to load.
*/
- public static void loadNow() throws ProcessInitException {
+ public static void loadNow(Context context) throws ProcessInitException {
synchronized (sLock) {
- loadAlreadyLocked();
+ loadAlreadyLocked(context);
}
}
@@ -93,7 +120,7 @@ public class LibraryLoader {
}
// Invoke System.loadLibrary(...), triggering JNI_OnLoad in native code
- private static void loadAlreadyLocked() throws ProcessInitException {
+ private static void loadAlreadyLocked(Context context) throws ProcessInitException {
try {
if (!sLoaded) {
assert !sInitialized;
@@ -108,7 +135,21 @@ public class LibraryLoader {
if (useChromiumLinker) {
Linker.loadLibrary(library);
} else {
- System.loadLibrary(library);
+ try {
+ System.loadLibrary(library);
+ if (context != null) {
+ LibraryLoaderHelper.deleteWorkaroundLibrariesAsynchronously(
+ context);
+ }
+ } catch (UnsatisfiedLinkError e) {
+ if (context != null
+ && LibraryLoaderHelper.tryLoadLibraryUsingWorkaround(context,
+ library)) {
+ sNativeLibraryHackWasUsed = true;
+ } else {
+ throw e;
+ }
+ }
}
}
if (useChromiumLinker) Linker.finishLibraryLoad();
@@ -154,6 +195,8 @@ public class LibraryLoader {
nativeRecordChromiumAndroidLinkerHistogram(Linker.loadAtFixedAddressFailed(),
SysUtils.isLowEndDevice());
}
+
+ nativeRecordNativeLibraryHack(sNativeLibraryHackWasUsed);
}
// Only methods needed before or during normal JNI registration are during System.OnLoad.
@@ -174,4 +217,6 @@ public class LibraryLoader {
// Get the version of the native library. This is needed so that we can check we
// have the right version before initializing the (rest of the) JNI.
private static native String nativeGetVersionNumber();
+
+ private static native void nativeRecordNativeLibraryHack(boolean usedHack);
}
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHelper.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHelper.java
new file mode 100644
index 0000000000..7eeb2c8c34
--- /dev/null
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHelper.java
@@ -0,0 +1,259 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+package org.chromium.base.library_loader;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.os.Build;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * The class provides helper functions to extract native libraries from APK,
+ * and load libraries from there.
+ *
+ * The class should be package-visible only, but made public for testing
+ * purpose.
+ */
+public class LibraryLoaderHelper {
+ private static final String TAG = "LibraryLoaderHelper";
+
+ private static final String LIB_DIR = "lib";
+
+ /**
+ * One-way switch becomes true if native libraries were unpacked
+ * from APK.
+ */
+ private static boolean sLibrariesWereUnpacked = false;
+
+ /**
+ * Loads native libraries using workaround only, skip the library in system
+ * lib path. The method exists only for testing purpose.
+ * Caller must ensure thread safety of this method.
+ * @param context
+ */
+ public static boolean loadNativeLibrariesUsingWorkaroundForTesting(Context context) {
+ // Although tryLoadLibraryUsingWorkaround might be called multiple times,
+ // libraries should only be unpacked once, this is guaranteed by
+ // sLibrariesWereUnpacked.
+ for (String library : NativeLibraries.LIBRARIES) {
+ if (!tryLoadLibraryUsingWorkaround(context, library)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Try to load a native library using a workaround of
+ * http://b/13216167.
+ *
+ * Workaround for b/13216167 was adapted from code in
+ * https://googleplex-android-review.git.corp.google.com/#/c/433061
+ *
+ * More details about http://b/13216167:
+ * PackageManager may fail to update shared library.
+ *
+ * Native library directory in an updated package is a symbolic link
+ * to a directory in /data/app-lib/<package name>, for example:
+ * /data/data/com.android.chrome/lib -> /data/app-lib/com.android.chrome[-1].
+ * When updating the application, the PackageManager create a new directory,
+ * e.g., /data/app-lib/com.android.chrome-2, and remove the old symlink and
+ * recreate one to the new directory. However, on some devices (e.g. Sony Xperia),
+ * the symlink was updated, but fails to extract new native libraries from
+ * the new apk.
+
+ * We make the following changes to alleviate the issue:
+ * 1) name the native library with apk version code, e.g.,
+ * libchrome.1750.136.so, 1750.136 is Chrome version number;
+ * 2) first try to load the library using System.loadLibrary,
+ * if that failed due to the library file was not found,
+ * search the named library in a /data/data/com.android.chrome/app_lib
+ * directory. Because of change 1), each version has a different native
+ * library name, so avoid mistakenly using the old native library.
+ *
+ * If named library is not in /data/data/com.android.chrome/app_lib directory,
+ * extract native libraries from apk and cache in the directory.
+ *
+ * This function doesn't throw UnsatisfiedLinkError, the caller needs to
+ * check the return value.
+ */
+ static boolean tryLoadLibraryUsingWorkaround(Context context, String library) {
+ assert context != null;
+ File libFile = getWorkaroundLibFile(context, library);
+ if (!libFile.exists() && !unpackLibrariesOnce(context)) {
+ return false;
+ }
+ try {
+ System.load(libFile.getAbsolutePath());
+ return true;
+ } catch (UnsatisfiedLinkError e) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the directory for holding extracted native libraries.
+ * It may create the directory if it doesn't exist.
+ *
+ * @param context
+ * @return the directory file object
+ */
+ public static File getWorkaroundLibDir(Context context) {
+ return context.getDir(LIB_DIR, Context.MODE_PRIVATE);
+ }
+
+ private static File getWorkaroundLibFile(Context context, String library) {
+ String libName = System.mapLibraryName(library);
+ return new File(getWorkaroundLibDir(context), libName);
+ }
+
+ /**
+ * Unpack native libraries from the APK file. The method is supposed to
+ * be called only once. It deletes existing files in unpacked directory
+ * before unpacking.
+ *
+ * @param context
+ * @return true when unpacking was successful, false when failed or called
+ * more than once.
+ */
+ private static boolean unpackLibrariesOnce(Context context) {
+ if (sLibrariesWereUnpacked) {
+ return false;
+ }
+ sLibrariesWereUnpacked = true;
+
+ File libDir = getWorkaroundLibDir(context);
+ if (libDir.exists()) {
+ assert libDir.isDirectory();
+ deleteDirectorySync(libDir);
+ }
+
+ try {
+ ApplicationInfo appInfo = context.getApplicationInfo();
+ ZipFile file = new ZipFile(new File(appInfo.sourceDir), ZipFile.OPEN_READ);
+ for (String libName : NativeLibraries.LIBRARIES) {
+ String jniNameInApk = "lib/" + Build.CPU_ABI + "/" +
+ System.mapLibraryName(libName);
+
+ final ZipEntry entry = file.getEntry(jniNameInApk);
+ if (entry == null) {
+ Log.e(TAG, appInfo.sourceDir + " doesn't have file " + jniNameInApk);
+ file.close();
+ deleteDirectorySync(libDir);
+ return false;
+ }
+
+ File outputFile = getWorkaroundLibFile(context, libName);
+
+ Log.i(TAG, "Extracting native libraries into " + outputFile.getAbsolutePath());
+
+ assert !outputFile.exists();
+
+ try {
+ if (!outputFile.createNewFile()) {
+ throw new IOException();
+ }
+
+ InputStream is = null;
+ FileOutputStream os = null;
+ try {
+ is = file.getInputStream(entry);
+ os = new FileOutputStream(outputFile);
+ int count = 0;
+ byte[] buffer = new byte[16 * 1024];
+ while ((count = is.read(buffer)) > 0) {
+ os.write(buffer, 0, count);
+ }
+ } finally {
+ try {
+ if (is != null) is.close();
+ } finally {
+ if (os != null) os.close();
+ }
+ }
+ // Change permission to rwxr-xr-x
+ outputFile.setReadable(true, false);
+ outputFile.setExecutable(true, false);
+ outputFile.setWritable(true);
+ } catch (IOException e) {
+ if (outputFile.exists()) {
+ if (!outputFile.delete()) {
+ Log.e(TAG, "Failed to delete " + outputFile.getAbsolutePath());
+ }
+ }
+ file.close();
+ throw e;
+ }
+ }
+ file.close();
+ return true;
+ } catch (IOException e) {
+ Log.e(TAG, "Failed to unpack native libraries", e);
+ deleteDirectorySync(libDir);
+ return false;
+ }
+ }
+
+ /**
+ * Delete old library files in the backup directory.
+ * The actual deletion is done in a background thread.
+ *
+ * @param context
+ */
+ static void deleteWorkaroundLibrariesAsynchronously(Context context) {
+ // Child process should not reach here.
+ final File libDir = getWorkaroundLibDir(context);
+ if (libDir.exists()) {
+ assert libDir.isDirectory();
+ // Async deletion
+ new Thread() {
+ @Override
+ public void run() {
+ deleteDirectorySync(libDir);
+ }
+ }.start();
+ }
+ }
+
+ /**
+ * Delete the workaround libraries and directory synchronously.
+ * For testing purpose only.
+ * @param context
+ */
+ public static void deleteWorkaroundLibrariesSynchronously(Context context) {
+ File libDir = getWorkaroundLibDir(context);
+ if (libDir.exists()) {
+ deleteDirectorySync(libDir);
+ }
+ }
+
+ private static void deleteDirectorySync(File dir) {
+ try {
+ File[] files = dir.listFiles();
+ if (files != null) {
+ for (File file : files) {
+ String fileName = file.getName();
+ if (!file.delete()) {
+ Log.e(TAG, "Failed to remove " + file.getAbsolutePath());
+ }
+ }
+ }
+ if (!dir.delete()) {
+ Log.w(TAG, "Failed to remove " + dir.getAbsolutePath());
+ }
+ return;
+ } catch (Exception e) {
+ Log.e(TAG, "Failed to remove old libs, ", e);
+ }
+ }
+}
diff --git a/base/android/javatests/src/org/chromium/base/LibraryLoaderHelperTest.java b/base/android/javatests/src/org/chromium/base/LibraryLoaderHelperTest.java
new file mode 100644
index 0000000000..85f4c77baf
--- /dev/null
+++ b/base/android/javatests/src/org/chromium/base/LibraryLoaderHelperTest.java
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base;
+
+import android.content.Context;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
+import org.chromium.base.library_loader.LibraryLoaderHelper;
+
+import java.io.File;
+
+/**
+ * Test class for the native library hack.
+ */
+public class LibraryLoaderHelperTest extends InstrumentationTestCase {
+ private static final String TAG = "LibraryLoaderHelperTest";
+
+ @Override
+ public void setUp() throws Exception {
+ Context context = getInstrumentation().getTargetContext();
+ LibraryLoaderHelper.deleteWorkaroundLibrariesSynchronously(context);
+ }
+
+ @MediumTest
+ public void testLoadNativeLibraries() {
+ getInstrumentation().runOnMainSync(new Runnable() {
+ @Override
+ public void run() {
+ Context context = getInstrumentation().getTargetContext();
+ File libDir = LibraryLoaderHelper.getWorkaroundLibDir(context);
+ assertTrue(libDir.exists());
+ assertTrue(libDir.isDirectory());
+ assertEquals(libDir.list().length, 0);
+
+ assertTrue(
+ LibraryLoaderHelper.loadNativeLibrariesUsingWorkaroundForTesting(
+ context));
+
+ assertTrue(libDir.list().length > 0);
+ }
+ });
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ Context context = getInstrumentation().getTargetContext();
+ LibraryLoaderHelper.deleteWorkaroundLibrariesSynchronously(context);
+ super.tearDown();
+ }
+}
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index f5aab86c07..2733583495 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -206,6 +206,7 @@ class JniParams(object):
if '/' in param:
# Coming from javap, use the fully qualified param directly.
return prefix + 'L' + JniParams.RemapClassName(param) + ';'
+
for qualified_name in (object_param_list +
[JniParams._fully_qualified_class] +
JniParams._inner_classes):
@@ -238,6 +239,12 @@ class JniParams(object):
if qualified_name.endswith('/' + outer):
return (prefix + JniParams.RemapClassName(qualified_name) +
'$' + inner + ';')
+ raise SyntaxError('Inner class (%s) can not be '
+ 'used directly by JNI. Please import the outer '
+ 'class, probably:\n'
+ 'import %s.%s;' %
+ (param, JniParams._package.replace('/', '.'),
+ outer.replace('/', '.')))
# Type not found, falling back to same package as this class.
return (prefix + 'L' +
diff --git a/base/android/jni_generator/jni_generator_tests.py b/base/android/jni_generator/jni_generator_tests.py
index 32fb4c6bb8..61d76c8d01 100755
--- a/base/android/jni_generator/jni_generator_tests.py
+++ b/base/android/jni_generator/jni_generator_tests.py
@@ -994,5 +994,22 @@ class Foo {
test_data, 'org/chromium/example/jni_generator/Test', options)
self.assertGoldenTextEquals(jni_from_java.GetContent())
+ def testOuterInnerRaises(self):
+ test_data = """
+ package org.chromium.media;
+
+ @CalledByNative
+ static int getCaptureFormatWidth(VideoCapture.CaptureFormat format) {
+ return format.getWidth();
+ }
+ """
+ def willRaise():
+ jni_generator.JNIFromJavaSource(
+ test_data,
+ 'org/chromium/media/VideoCaptureFactory',
+ TestOptions())
+ self.assertRaises(SyntaxError, willRaise)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/base/android/library_loader/library_loader_hooks.cc b/base/android/library_loader/library_loader_hooks.cc
index 8fa16df331..0145eabe1e 100644
--- a/base/android/library_loader/library_loader_hooks.cc
+++ b/base/android/library_loader/library_loader_hooks.cc
@@ -64,5 +64,9 @@ jstring GetVersionNumber(JNIEnv* env, jclass clazz) {
return env->NewStringUTF(g_library_version_number);
}
+static void RecordNativeLibraryHack(JNIEnv*, jclass, jboolean usedHack) {
+ UMA_HISTOGRAM_BOOLEAN("LibraryLoader.NativeLibraryHack", usedHack);
+}
+
} // namespace android
} // namespace base
diff --git a/base/atomicops.h b/base/atomicops.h
index 3d15e03211..d950581143 100644
--- a/base/atomicops.h
+++ b/base/atomicops.h
@@ -146,8 +146,10 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
#include "base/atomicops_internals_mac.h"
#elif defined(OS_NACL)
#include "base/atomicops_internals_gcc.h"
-#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARMEL)
#include "base/atomicops_internals_arm_gcc.h"
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM64)
+#include "base/atomicops_internals_arm64_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY)
diff --git a/base/atomicops_internals_arm64_gcc.h b/base/atomicops_internals_arm64_gcc.h
new file mode 100644
index 0000000000..a2b0abc1a4
--- /dev/null
+++ b/base/atomicops_internals_arm64_gcc.h
@@ -0,0 +1,360 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+// TODO(rmcilroy): Investigate whether we can use __sync__ intrinsics instead of
+// the hand coded assembly without introducing perf regressions.
+// TODO(rmcilroy): Investigate whether we can use acquire / release versions of
+// exclusive load / store assembly instructions and do away with
+// the barriers.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
+#define BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
+
+#if defined(OS_QNX)
+#include <sys/cpuinline.h>
+#endif
+
+namespace base {
+namespace subtle {
+
+inline void MemoryBarrier() {
+ __asm__ __volatile__ ( // NOLINT
+ "dmb ish \n\t" // Data memory barrier.
+ ::: "memory"
+ ); // NOLINT
+}
+
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[prev], %[ptr] \n\t" // Load the previous value.
+ "cmp %w[prev], %w[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ "1: \n\t"
+ "clrex \n\t" // In case we didn't swap.
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ Atomic32 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [new_value]"r" (new_value)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
+ "add %w[result], %w[result], %w[increment]\n\t"
+ "stxr %w[temp], %w[result], %[ptr] \n\t" // Try to store the result.
+ "cbnz %w[temp], 0b \n\t" // Retry on failure.
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [increment]"r" (increment)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ MemoryBarrier();
+ Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
+ MemoryBarrier();
+
+ return result;
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[prev], %[ptr] \n\t" // Load the previous value.
+ "cmp %w[prev], %w[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ "dmb ish \n\t" // Data memory barrier.
+ "1: \n\t"
+ // If the compare failed the 'dmb' is unnecessary, but we still need a
+ // 'clrex'.
+ "clrex \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev;
+ int32_t temp;
+
+ MemoryBarrier();
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[prev], %[ptr] \n\t" // Load the previous value.
+ "cmp %w[prev], %w[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ "1: \n\t"
+ // If the compare failed the we still need a 'clrex'.
+ "clrex \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+ MemoryBarrier();
+ *ptr = value;
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+ Atomic32 value = *ptr;
+ MemoryBarrier();
+ return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ MemoryBarrier();
+ return *ptr;
+}
+
+// 64-bit versions of the operations.
+// See the 32-bit versions for comments.
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[prev], %[ptr] \n\t"
+ "cmp %[prev], %[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ "1: \n\t"
+ "clrex \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
+ Atomic64 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[result], %[ptr] \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [new_value]"r" (new_value)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ Atomic64 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[result], %[ptr] \n\t"
+ "add %[result], %[result], %[increment] \n\t"
+ "stxr %w[temp], %[result], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [increment]"r" (increment)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ MemoryBarrier();
+ Atomic64 result = NoBarrier_AtomicIncrement(ptr, increment);
+ MemoryBarrier();
+
+ return result;
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[prev], %[ptr] \n\t"
+ "cmp %[prev], %[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ "dmb ish \n\t"
+ "1: \n\t"
+ "clrex \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 prev;
+ int32_t temp;
+
+ MemoryBarrier();
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[prev], %[ptr] \n\t"
+ "cmp %[prev], %[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ "1: \n\t"
+ "clrex \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"r" (old_value),
+ [new_value]"r" (new_value)
+ : "memory", "cc"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+ *ptr = value;
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+ MemoryBarrier();
+ *ptr = value;
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+ return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+ Atomic64 value = *ptr;
+ MemoryBarrier();
+ return value;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+ MemoryBarrier();
+ return *ptr;
+}
+
+} // namespace base::subtle
+} // namespace base
+
+#endif // BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
diff --git a/base/base.gyp b/base/base.gyp
index 963cd51f24..1e9ae28410 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -221,9 +221,6 @@
}],
],
'sources': [
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_win.h',
- 'third_party/nspr/prtypes.h',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
'async_socket_io_handler.h',
@@ -512,8 +509,8 @@
'md5_unittest.cc',
'memory/aligned_memory_unittest.cc',
'memory/discardable_memory_allocator_android_unittest.cc',
+ 'memory/discardable_memory_manager_unittest.cc',
'memory/discardable_memory_unittest.cc',
- 'memory/discardable_memory_provider_unittest.cc',
'memory/linked_ptr_unittest.cc',
'memory/ref_counted_memory_unittest.cc',
'memory/ref_counted_unittest.cc',
@@ -788,11 +785,6 @@
'../third_party/libevent/libevent.gyp:libevent'
],
}],
- ['use_aura==1 and use_x11==1', {
- 'sources': [
- 'x11/edid_parser_x11_unittest.cc',
- ],
- }],
], # conditions
'target_conditions': [
['OS == "ios" and _toolset != "host"', {
@@ -1091,9 +1083,6 @@
4267,
],
'sources': [
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_win.h',
- 'third_party/nspr/prtypes.h',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
'async_socket_io_handler.h',
diff --git a/base/base.gypi b/base/base.gypi
index d0ed5bb930..1d15b0a5bd 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -18,17 +18,8 @@
'third_party/dmg_fp/dtoa_wrapper.cc',
'third_party/icu/icu_utf.cc',
'third_party/icu/icu_utf.h',
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_freebsd.h',
- 'third_party/nspr/prcpucfg_linux.h',
- 'third_party/nspr/prcpucfg_mac.h',
- 'third_party/nspr/prcpucfg_nacl.h',
- 'third_party/nspr/prcpucfg_openbsd.h',
- 'third_party/nspr/prcpucfg_solaris.h',
- 'third_party/nspr/prcpucfg_win.h',
'third_party/nspr/prtime.cc',
'third_party/nspr/prtime.h',
- 'third_party/nspr/prtypes.h',
'third_party/superfasthash/superfasthash.c',
'third_party/xdg_mime/xdgmime.h',
'allocator/allocator_extension.cc',
@@ -323,8 +314,8 @@
'memory/discardable_memory_mac.cc',
'memory/discardable_memory_malloc.cc',
'memory/discardable_memory_malloc.h',
- 'memory/discardable_memory_provider.cc',
- 'memory/discardable_memory_provider.h',
+ 'memory/discardable_memory_manager.cc',
+ 'memory/discardable_memory_manager.h',
'memory/discardable_memory_win.cc',
'memory/linked_ptr.h',
'memory/manual_constructor.h',
@@ -454,6 +445,7 @@
'process/launch_posix.cc',
'process/launch_win.cc',
'process/memory.h',
+ 'process/memory.cc',
'process/memory_linux.cc',
'process/memory_mac.mm',
'process/memory_win.cc',
@@ -720,14 +712,6 @@
'win/wrapped_window_proc.cc',
'win/wrapped_window_proc.h',
],
- 'conditions': [
- ['use_aura==1 and use_x11==1', {
- 'sources': [
- 'x11/edid_parser_x11.cc',
- 'x11/edid_parser_x11.h',
- ],
- }],
- ],
'defines': [
'BASE_IMPLEMENTATION',
],
diff --git a/base/base.target.darwin-arm.mk b/base/base.target.darwin-arm.mk
index 965f904d08..3334a30c13 100644
--- a/base/base.target.darwin-arm.mk
+++ b/base/base.target.darwin-arm.mk
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -175,6 +175,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -311,6 +312,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -398,6 +400,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.darwin-mips.mk b/base/base.target.darwin-mips.mk
index 16c85181d5..93d926c657 100644
--- a/base/base.target.darwin-mips.mk
+++ b/base/base.target.darwin-mips.mk
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -175,6 +175,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -310,6 +311,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -396,6 +398,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.darwin-x86.mk b/base/base.target.darwin-x86.mk
index e514855a2d..dc6890cfbc 100644
--- a/base/base.target.darwin-x86.mk
+++ b/base/base.target.darwin-x86.mk
@@ -131,7 +131,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -176,6 +176,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -313,6 +314,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -400,6 +402,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.darwin-x86_64.mk b/base/base.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..7709e1076a
--- /dev/null
+++ b/base/base.target.darwin-x86_64.mk
@@ -0,0 +1,501 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \
+ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \
+ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/async_socket_io_handler_posix.cc \
+ base/event_recorder_stubs.cc \
+ base/linux_util.cc \
+ base/message_loop/message_pump_android.cc \
+ base/message_loop/message_pump_libevent.cc \
+ base/metrics/field_trial.cc \
+ base/posix/file_descriptor_shuffle.cc \
+ base/sync_socket_posix.cc \
+ base/third_party/dmg_fp/g_fmt.cc \
+ base/third_party/dmg_fp/dtoa_wrapper.cc \
+ base/third_party/icu/icu_utf.cc \
+ base/third_party/nspr/prtime.cc \
+ base/third_party/superfasthash/superfasthash.c \
+ base/allocator/allocator_extension.cc \
+ base/allocator/type_profiler_control.cc \
+ base/android/application_status_listener.cc \
+ base/android/base_jni_registrar.cc \
+ base/android/build_info.cc \
+ base/android/command_line_android.cc \
+ base/android/content_uri_utils.cc \
+ base/android/cpu_features.cc \
+ base/android/fifo_utils.cc \
+ base/android/important_file_writer_android.cc \
+ base/android/scoped_java_ref.cc \
+ base/android/jni_android.cc \
+ base/android/jni_array.cc \
+ base/android/jni_helper.cc \
+ base/android/jni_registrar.cc \
+ base/android/jni_string.cc \
+ base/android/library_loader/library_loader_hooks.cc \
+ base/android/memory_pressure_listener_android.cc \
+ base/android/java_handler_thread.cc \
+ base/android/path_service_android.cc \
+ base/android/path_utils.cc \
+ base/android/sys_utils.cc \
+ base/android/trace_event_binding.cc \
+ base/at_exit.cc \
+ base/atomicops_internals_x86_gcc.cc \
+ base/barrier_closure.cc \
+ base/base64.cc \
+ base/base_paths.cc \
+ base/base_paths_android.cc \
+ base/big_endian.cc \
+ base/bind_helpers.cc \
+ base/build_time.cc \
+ base/callback_helpers.cc \
+ base/callback_internal.cc \
+ base/command_line.cc \
+ base/cpu.cc \
+ base/debug/alias.cc \
+ base/debug/crash_logging.cc \
+ base/debug/debugger.cc \
+ base/debug/debugger_posix.cc \
+ base/debug/dump_without_crashing.cc \
+ base/debug/proc_maps_linux.cc \
+ base/debug/profiler.cc \
+ base/debug/stack_trace.cc \
+ base/debug/stack_trace_android.cc \
+ base/debug/trace_event_android.cc \
+ base/debug/trace_event_impl.cc \
+ base/debug/trace_event_impl_constants.cc \
+ base/debug/trace_event_synthetic_delay.cc \
+ base/debug/trace_event_system_stats_monitor.cc \
+ base/debug/trace_event_memory.cc \
+ base/deferred_sequenced_task_runner.cc \
+ base/environment.cc \
+ base/file_util.cc \
+ base/file_util_android.cc \
+ base/file_util_posix.cc \
+ base/files/file.cc \
+ base/files/file_enumerator.cc \
+ base/files/file_enumerator_posix.cc \
+ base/files/file_path.cc \
+ base/files/file_path_constants.cc \
+ base/files/file_path_watcher.cc \
+ base/files/file_path_watcher_linux.cc \
+ base/files/file_posix.cc \
+ base/files/file_proxy.cc \
+ base/files/file_util_proxy.cc \
+ base/files/important_file_writer.cc \
+ base/files/memory_mapped_file.cc \
+ base/files/memory_mapped_file_posix.cc \
+ base/files/scoped_file.cc \
+ base/files/scoped_platform_file_closer.cc \
+ base/files/scoped_temp_dir.cc \
+ base/guid.cc \
+ base/guid_posix.cc \
+ base/hash.cc \
+ base/ini_parser.cc \
+ base/json/json_file_value_serializer.cc \
+ base/json/json_parser.cc \
+ base/json/json_reader.cc \
+ base/json/json_string_value_serializer.cc \
+ base/json/json_writer.cc \
+ base/json/string_escape.cc \
+ base/lazy_instance.cc \
+ base/location.cc \
+ base/logging.cc \
+ base/md5.cc \
+ base/memory/aligned_memory.cc \
+ base/memory/discardable_memory.cc \
+ base/memory/discardable_memory_allocator_android.cc \
+ base/memory/discardable_memory_android.cc \
+ base/memory/discardable_memory_emulated.cc \
+ base/memory/discardable_memory_malloc.cc \
+ base/memory/discardable_memory_manager.cc \
+ base/memory/memory_pressure_listener.cc \
+ base/memory/ref_counted.cc \
+ base/memory/ref_counted_memory.cc \
+ base/memory/shared_memory_android.cc \
+ base/memory/shared_memory_posix.cc \
+ base/memory/singleton.cc \
+ base/memory/weak_ptr.cc \
+ base/message_loop/incoming_task_queue.cc \
+ base/message_loop/message_loop.cc \
+ base/message_loop/message_loop_proxy.cc \
+ base/message_loop/message_loop_proxy_impl.cc \
+ base/message_loop/message_pump.cc \
+ base/message_loop/message_pump_default.cc \
+ base/metrics/sample_map.cc \
+ base/metrics/sample_vector.cc \
+ base/metrics/bucket_ranges.cc \
+ base/metrics/histogram.cc \
+ base/metrics/histogram_base.cc \
+ base/metrics/histogram_delta_serialization.cc \
+ base/metrics/histogram_samples.cc \
+ base/metrics/histogram_snapshot_manager.cc \
+ base/metrics/sparse_histogram.cc \
+ base/metrics/statistics_recorder.cc \
+ base/metrics/stats_counters.cc \
+ base/metrics/stats_table.cc \
+ base/metrics/user_metrics.cc \
+ base/native_library_posix.cc \
+ base/os_compat_android.cc \
+ base/path_service.cc \
+ base/pending_task.cc \
+ base/pickle.cc \
+ base/platform_file.cc \
+ base/platform_file_posix.cc \
+ base/posix/global_descriptors.cc \
+ base/posix/unix_domain_socket_linux.cc \
+ base/power_monitor/power_monitor.cc \
+ base/power_monitor/power_monitor_device_source_android.cc \
+ base/power_monitor/power_monitor_device_source.cc \
+ base/power_monitor/power_monitor_source.cc \
+ base/process/internal_linux.cc \
+ base/process/kill.cc \
+ base/process/kill_posix.cc \
+ base/process/launch.cc \
+ base/process/launch_posix.cc \
+ base/process/memory.cc \
+ base/process/memory_linux.cc \
+ base/process/process_handle_linux.cc \
+ base/process/process_handle_posix.cc \
+ base/process/process_iterator.cc \
+ base/process/process_iterator_linux.cc \
+ base/process/process_metrics.cc \
+ base/process/process_metrics_linux.cc \
+ base/process/process_metrics_posix.cc \
+ base/process/process_posix.cc \
+ base/profiler/scoped_profile.cc \
+ base/profiler/alternate_timer.cc \
+ base/profiler/tracked_time.cc \
+ base/rand_util.cc \
+ base/rand_util_posix.cc \
+ base/run_loop.cc \
+ base/safe_strerror_posix.cc \
+ base/scoped_native_library.cc \
+ base/sequence_checker_impl.cc \
+ base/sequenced_task_runner.cc \
+ base/sha1_portable.cc \
+ base/strings/latin1_string_conversions.cc \
+ base/strings/nullable_string16.cc \
+ base/strings/safe_sprintf.cc \
+ base/strings/string16.cc \
+ base/strings/string_number_conversions.cc \
+ base/strings/string_split.cc \
+ base/strings/string_piece.cc \
+ base/strings/string_util.cc \
+ base/strings/string_util_constants.cc \
+ base/strings/stringprintf.cc \
+ base/strings/sys_string_conversions_posix.cc \
+ base/strings/utf_offset_string_conversions.cc \
+ base/strings/utf_string_conversion_utils.cc \
+ base/strings/utf_string_conversions.cc \
+ base/supports_user_data.cc \
+ base/synchronization/cancellation_flag.cc \
+ base/synchronization/condition_variable_posix.cc \
+ base/synchronization/lock.cc \
+ base/synchronization/lock_impl_posix.cc \
+ base/synchronization/waitable_event_posix.cc \
+ base/synchronization/waitable_event_watcher_posix.cc \
+ base/system_monitor/system_monitor.cc \
+ base/sys_info.cc \
+ base/sys_info_android.cc \
+ base/sys_info_linux.cc \
+ base/sys_info_posix.cc \
+ base/task/cancelable_task_tracker.cc \
+ base/task_runner.cc \
+ base/thread_task_runner_handle.cc \
+ base/threading/non_thread_safe_impl.cc \
+ base/threading/platform_thread_android.cc \
+ base/threading/platform_thread_posix.cc \
+ base/threading/post_task_and_reply_impl.cc \
+ base/threading/sequenced_worker_pool.cc \
+ base/threading/simple_thread.cc \
+ base/threading/thread.cc \
+ base/threading/thread_checker_impl.cc \
+ base/threading/thread_collision_warner.cc \
+ base/threading/thread_id_name_manager.cc \
+ base/threading/thread_local_posix.cc \
+ base/threading/thread_local_storage.cc \
+ base/threading/thread_local_storage_posix.cc \
+ base/threading/thread_restrictions.cc \
+ base/threading/watchdog.cc \
+ base/threading/worker_pool.cc \
+ base/threading/worker_pool_posix.cc \
+ base/time/clock.cc \
+ base/time/default_clock.cc \
+ base/time/default_tick_clock.cc \
+ base/time/tick_clock.cc \
+ base/time/time.cc \
+ base/time/time_posix.cc \
+ base/timer/elapsed_timer.cc \
+ base/timer/hi_res_timer_manager_posix.cc \
+ base/timer/mock_timer.cc \
+ base/timer/timer.cc \
+ base/tracked_objects.cc \
+ base/tracking_info.cc \
+ base/values.cc \
+ base/value_conversions.cc \
+ base/version.cc \
+ base/vlog.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_IMPLEMENTATION' \
+ '-DANDROID_SINCOS_PROVIDED' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir)/base \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_IMPLEMENTATION' \
+ '-DANDROID_SINCOS_PROVIDED' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir)/base \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES := \
+ cpufeatures
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_gyp
+
+# Alias gyp target name.
+.PHONY: base
+base: base_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base.target.linux-arm.mk b/base/base.target.linux-arm.mk
index 965f904d08..3334a30c13 100644
--- a/base/base.target.linux-arm.mk
+++ b/base/base.target.linux-arm.mk
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -175,6 +175,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -311,6 +312,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -398,6 +400,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.linux-mips.mk b/base/base.target.linux-mips.mk
index 16c85181d5..93d926c657 100644
--- a/base/base.target.linux-mips.mk
+++ b/base/base.target.linux-mips.mk
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -175,6 +175,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -310,6 +311,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -396,6 +398,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.linux-x86.mk b/base/base.target.linux-x86.mk
index e514855a2d..dc6890cfbc 100644
--- a/base/base.target.linux-x86.mk
+++ b/base/base.target.linux-x86.mk
@@ -131,7 +131,7 @@ LOCAL_SRC_FILES := \
base/memory/discardable_memory_android.cc \
base/memory/discardable_memory_emulated.cc \
base/memory/discardable_memory_malloc.cc \
- base/memory/discardable_memory_provider.cc \
+ base/memory/discardable_memory_manager.cc \
base/memory/memory_pressure_listener.cc \
base/memory/ref_counted.cc \
base/memory/ref_counted_memory.cc \
@@ -176,6 +176,7 @@ LOCAL_SRC_FILES := \
base/process/kill_posix.cc \
base/process/launch.cc \
base/process/launch_posix.cc \
+ base/process/memory.cc \
base/process/memory_linux.cc \
base/process/process_handle_linux.cc \
base/process/process_handle_posix.cc \
@@ -313,6 +314,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
@@ -400,6 +402,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_IMPLEMENTATION' \
diff --git a/base/base.target.linux-x86_64.mk b/base/base.target.linux-x86_64.mk
new file mode 100644
index 0000000000..7709e1076a
--- /dev/null
+++ b/base/base.target.linux-x86_64.mk
@@ -0,0 +1,501 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \
+ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \
+ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/async_socket_io_handler_posix.cc \
+ base/event_recorder_stubs.cc \
+ base/linux_util.cc \
+ base/message_loop/message_pump_android.cc \
+ base/message_loop/message_pump_libevent.cc \
+ base/metrics/field_trial.cc \
+ base/posix/file_descriptor_shuffle.cc \
+ base/sync_socket_posix.cc \
+ base/third_party/dmg_fp/g_fmt.cc \
+ base/third_party/dmg_fp/dtoa_wrapper.cc \
+ base/third_party/icu/icu_utf.cc \
+ base/third_party/nspr/prtime.cc \
+ base/third_party/superfasthash/superfasthash.c \
+ base/allocator/allocator_extension.cc \
+ base/allocator/type_profiler_control.cc \
+ base/android/application_status_listener.cc \
+ base/android/base_jni_registrar.cc \
+ base/android/build_info.cc \
+ base/android/command_line_android.cc \
+ base/android/content_uri_utils.cc \
+ base/android/cpu_features.cc \
+ base/android/fifo_utils.cc \
+ base/android/important_file_writer_android.cc \
+ base/android/scoped_java_ref.cc \
+ base/android/jni_android.cc \
+ base/android/jni_array.cc \
+ base/android/jni_helper.cc \
+ base/android/jni_registrar.cc \
+ base/android/jni_string.cc \
+ base/android/library_loader/library_loader_hooks.cc \
+ base/android/memory_pressure_listener_android.cc \
+ base/android/java_handler_thread.cc \
+ base/android/path_service_android.cc \
+ base/android/path_utils.cc \
+ base/android/sys_utils.cc \
+ base/android/trace_event_binding.cc \
+ base/at_exit.cc \
+ base/atomicops_internals_x86_gcc.cc \
+ base/barrier_closure.cc \
+ base/base64.cc \
+ base/base_paths.cc \
+ base/base_paths_android.cc \
+ base/big_endian.cc \
+ base/bind_helpers.cc \
+ base/build_time.cc \
+ base/callback_helpers.cc \
+ base/callback_internal.cc \
+ base/command_line.cc \
+ base/cpu.cc \
+ base/debug/alias.cc \
+ base/debug/crash_logging.cc \
+ base/debug/debugger.cc \
+ base/debug/debugger_posix.cc \
+ base/debug/dump_without_crashing.cc \
+ base/debug/proc_maps_linux.cc \
+ base/debug/profiler.cc \
+ base/debug/stack_trace.cc \
+ base/debug/stack_trace_android.cc \
+ base/debug/trace_event_android.cc \
+ base/debug/trace_event_impl.cc \
+ base/debug/trace_event_impl_constants.cc \
+ base/debug/trace_event_synthetic_delay.cc \
+ base/debug/trace_event_system_stats_monitor.cc \
+ base/debug/trace_event_memory.cc \
+ base/deferred_sequenced_task_runner.cc \
+ base/environment.cc \
+ base/file_util.cc \
+ base/file_util_android.cc \
+ base/file_util_posix.cc \
+ base/files/file.cc \
+ base/files/file_enumerator.cc \
+ base/files/file_enumerator_posix.cc \
+ base/files/file_path.cc \
+ base/files/file_path_constants.cc \
+ base/files/file_path_watcher.cc \
+ base/files/file_path_watcher_linux.cc \
+ base/files/file_posix.cc \
+ base/files/file_proxy.cc \
+ base/files/file_util_proxy.cc \
+ base/files/important_file_writer.cc \
+ base/files/memory_mapped_file.cc \
+ base/files/memory_mapped_file_posix.cc \
+ base/files/scoped_file.cc \
+ base/files/scoped_platform_file_closer.cc \
+ base/files/scoped_temp_dir.cc \
+ base/guid.cc \
+ base/guid_posix.cc \
+ base/hash.cc \
+ base/ini_parser.cc \
+ base/json/json_file_value_serializer.cc \
+ base/json/json_parser.cc \
+ base/json/json_reader.cc \
+ base/json/json_string_value_serializer.cc \
+ base/json/json_writer.cc \
+ base/json/string_escape.cc \
+ base/lazy_instance.cc \
+ base/location.cc \
+ base/logging.cc \
+ base/md5.cc \
+ base/memory/aligned_memory.cc \
+ base/memory/discardable_memory.cc \
+ base/memory/discardable_memory_allocator_android.cc \
+ base/memory/discardable_memory_android.cc \
+ base/memory/discardable_memory_emulated.cc \
+ base/memory/discardable_memory_malloc.cc \
+ base/memory/discardable_memory_manager.cc \
+ base/memory/memory_pressure_listener.cc \
+ base/memory/ref_counted.cc \
+ base/memory/ref_counted_memory.cc \
+ base/memory/shared_memory_android.cc \
+ base/memory/shared_memory_posix.cc \
+ base/memory/singleton.cc \
+ base/memory/weak_ptr.cc \
+ base/message_loop/incoming_task_queue.cc \
+ base/message_loop/message_loop.cc \
+ base/message_loop/message_loop_proxy.cc \
+ base/message_loop/message_loop_proxy_impl.cc \
+ base/message_loop/message_pump.cc \
+ base/message_loop/message_pump_default.cc \
+ base/metrics/sample_map.cc \
+ base/metrics/sample_vector.cc \
+ base/metrics/bucket_ranges.cc \
+ base/metrics/histogram.cc \
+ base/metrics/histogram_base.cc \
+ base/metrics/histogram_delta_serialization.cc \
+ base/metrics/histogram_samples.cc \
+ base/metrics/histogram_snapshot_manager.cc \
+ base/metrics/sparse_histogram.cc \
+ base/metrics/statistics_recorder.cc \
+ base/metrics/stats_counters.cc \
+ base/metrics/stats_table.cc \
+ base/metrics/user_metrics.cc \
+ base/native_library_posix.cc \
+ base/os_compat_android.cc \
+ base/path_service.cc \
+ base/pending_task.cc \
+ base/pickle.cc \
+ base/platform_file.cc \
+ base/platform_file_posix.cc \
+ base/posix/global_descriptors.cc \
+ base/posix/unix_domain_socket_linux.cc \
+ base/power_monitor/power_monitor.cc \
+ base/power_monitor/power_monitor_device_source_android.cc \
+ base/power_monitor/power_monitor_device_source.cc \
+ base/power_monitor/power_monitor_source.cc \
+ base/process/internal_linux.cc \
+ base/process/kill.cc \
+ base/process/kill_posix.cc \
+ base/process/launch.cc \
+ base/process/launch_posix.cc \
+ base/process/memory.cc \
+ base/process/memory_linux.cc \
+ base/process/process_handle_linux.cc \
+ base/process/process_handle_posix.cc \
+ base/process/process_iterator.cc \
+ base/process/process_iterator_linux.cc \
+ base/process/process_metrics.cc \
+ base/process/process_metrics_linux.cc \
+ base/process/process_metrics_posix.cc \
+ base/process/process_posix.cc \
+ base/profiler/scoped_profile.cc \
+ base/profiler/alternate_timer.cc \
+ base/profiler/tracked_time.cc \
+ base/rand_util.cc \
+ base/rand_util_posix.cc \
+ base/run_loop.cc \
+ base/safe_strerror_posix.cc \
+ base/scoped_native_library.cc \
+ base/sequence_checker_impl.cc \
+ base/sequenced_task_runner.cc \
+ base/sha1_portable.cc \
+ base/strings/latin1_string_conversions.cc \
+ base/strings/nullable_string16.cc \
+ base/strings/safe_sprintf.cc \
+ base/strings/string16.cc \
+ base/strings/string_number_conversions.cc \
+ base/strings/string_split.cc \
+ base/strings/string_piece.cc \
+ base/strings/string_util.cc \
+ base/strings/string_util_constants.cc \
+ base/strings/stringprintf.cc \
+ base/strings/sys_string_conversions_posix.cc \
+ base/strings/utf_offset_string_conversions.cc \
+ base/strings/utf_string_conversion_utils.cc \
+ base/strings/utf_string_conversions.cc \
+ base/supports_user_data.cc \
+ base/synchronization/cancellation_flag.cc \
+ base/synchronization/condition_variable_posix.cc \
+ base/synchronization/lock.cc \
+ base/synchronization/lock_impl_posix.cc \
+ base/synchronization/waitable_event_posix.cc \
+ base/synchronization/waitable_event_watcher_posix.cc \
+ base/system_monitor/system_monitor.cc \
+ base/sys_info.cc \
+ base/sys_info_android.cc \
+ base/sys_info_linux.cc \
+ base/sys_info_posix.cc \
+ base/task/cancelable_task_tracker.cc \
+ base/task_runner.cc \
+ base/thread_task_runner_handle.cc \
+ base/threading/non_thread_safe_impl.cc \
+ base/threading/platform_thread_android.cc \
+ base/threading/platform_thread_posix.cc \
+ base/threading/post_task_and_reply_impl.cc \
+ base/threading/sequenced_worker_pool.cc \
+ base/threading/simple_thread.cc \
+ base/threading/thread.cc \
+ base/threading/thread_checker_impl.cc \
+ base/threading/thread_collision_warner.cc \
+ base/threading/thread_id_name_manager.cc \
+ base/threading/thread_local_posix.cc \
+ base/threading/thread_local_storage.cc \
+ base/threading/thread_local_storage_posix.cc \
+ base/threading/thread_restrictions.cc \
+ base/threading/watchdog.cc \
+ base/threading/worker_pool.cc \
+ base/threading/worker_pool_posix.cc \
+ base/time/clock.cc \
+ base/time/default_clock.cc \
+ base/time/default_tick_clock.cc \
+ base/time/tick_clock.cc \
+ base/time/time.cc \
+ base/time/time_posix.cc \
+ base/timer/elapsed_timer.cc \
+ base/timer/hi_res_timer_manager_posix.cc \
+ base/timer/mock_timer.cc \
+ base/timer/timer.cc \
+ base/tracked_objects.cc \
+ base/tracking_info.cc \
+ base/values.cc \
+ base/value_conversions.cc \
+ base/version.cc \
+ base/vlog.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_IMPLEMENTATION' \
+ '-DANDROID_SINCOS_PROVIDED' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir)/base \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_IMPLEMENTATION' \
+ '-DANDROID_SINCOS_PROVIDED' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir)/base \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES := \
+ cpufeatures
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_gyp
+
+# Alias gyp target name.
+.PHONY: base
+base: base_base_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_i18n.target.darwin-arm.mk b/base/base_i18n.target.darwin-arm.mk
index 308e9cd463..4af0a7ad9d 100644
--- a/base/base_i18n.target.darwin-arm.mk
+++ b/base/base_i18n.target.darwin-arm.mk
@@ -98,6 +98,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -189,6 +190,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.darwin-mips.mk b/base/base_i18n.target.darwin-mips.mk
index 3bbe5f4b24..4ba95f2900 100644
--- a/base/base_i18n.target.darwin-mips.mk
+++ b/base/base_i18n.target.darwin-mips.mk
@@ -97,6 +97,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.darwin-x86.mk b/base/base_i18n.target.darwin-x86.mk
index 7692b3e02e..fbf8b1bc5b 100644
--- a/base/base_i18n.target.darwin-x86.mk
+++ b/base/base_i18n.target.darwin-x86.mk
@@ -99,6 +99,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -190,6 +191,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.darwin-x86_64.mk b/base/base_i18n.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..e6373bae04
--- /dev/null
+++ b/base/base_i18n.target.darwin-x86_64.mk
@@ -0,0 +1,291 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_i18n_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,GYP,third_party_icu_icui18n_gyp)/icui18n.stamp \
+ $(call intermediates-dir-for,GYP,third_party_icu_icuuc_gyp)/icuuc.stamp
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/i18n/bidi_line_iterator.cc \
+ base/i18n/break_iterator.cc \
+ base/i18n/case_conversion.cc \
+ base/i18n/char_iterator.cc \
+ base/i18n/file_util_icu.cc \
+ base/i18n/i18n_constants.cc \
+ base/i18n/icu_encoding_detection.cc \
+ base/i18n/icu_string_conversions.cc \
+ base/i18n/icu_util.cc \
+ base/i18n/number_formatting.cc \
+ base/i18n/rtl.cc \
+ base/i18n/streaming_utf8_validator.cc \
+ base/i18n/string_compare.cc \
+ base/i18n/string_search.cc \
+ base/i18n/time_formatting.cc \
+ base/i18n/timezone.cc \
+ base/i18n/utf8_validator_tables.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
+ '-DU_USING_ICU_NAMESPACE=0' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_I18N_IMPLEMENTATION' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/external/icu4c/common \
+ $(PWD)/external/icu4c/i18n \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
+ '-DU_USING_ICU_NAMESPACE=0' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_I18N_IMPLEMENTATION' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/external/icu4c/common \
+ $(PWD)/external/icu4c/i18n \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_i18n_gyp
+
+# Alias gyp target name.
+.PHONY: base_i18n
+base_i18n: base_base_i18n_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_i18n.target.linux-arm.mk b/base/base_i18n.target.linux-arm.mk
index 308e9cd463..4af0a7ad9d 100644
--- a/base/base_i18n.target.linux-arm.mk
+++ b/base/base_i18n.target.linux-arm.mk
@@ -98,6 +98,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -189,6 +190,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.linux-mips.mk b/base/base_i18n.target.linux-mips.mk
index 3bbe5f4b24..4ba95f2900 100644
--- a/base/base_i18n.target.linux-mips.mk
+++ b/base/base_i18n.target.linux-mips.mk
@@ -97,6 +97,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.linux-x86.mk b/base/base_i18n.target.linux-x86.mk
index 7692b3e02e..fbf8b1bc5b 100644
--- a/base/base_i18n.target.linux-x86.mk
+++ b/base/base_i18n.target.linux-x86.mk
@@ -99,6 +99,7 @@ MY_DEFS_Debug := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
@@ -190,6 +191,7 @@ MY_DEFS_Release := \
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
'-DU_USING_ICU_NAMESPACE=0' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DBASE_I18N_IMPLEMENTATION' \
diff --git a/base/base_i18n.target.linux-x86_64.mk b/base/base_i18n.target.linux-x86_64.mk
new file mode 100644
index 0000000000..e6373bae04
--- /dev/null
+++ b/base/base_i18n.target.linux-x86_64.mk
@@ -0,0 +1,291 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_i18n_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES := \
+ $(call intermediates-dir-for,GYP,third_party_icu_icui18n_gyp)/icui18n.stamp \
+ $(call intermediates-dir-for,GYP,third_party_icu_icuuc_gyp)/icuuc.stamp
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/i18n/bidi_line_iterator.cc \
+ base/i18n/break_iterator.cc \
+ base/i18n/case_conversion.cc \
+ base/i18n/char_iterator.cc \
+ base/i18n/file_util_icu.cc \
+ base/i18n/i18n_constants.cc \
+ base/i18n/icu_encoding_detection.cc \
+ base/i18n/icu_string_conversions.cc \
+ base/i18n/icu_util.cc \
+ base/i18n/number_formatting.cc \
+ base/i18n/rtl.cc \
+ base/i18n/streaming_utf8_validator.cc \
+ base/i18n/string_compare.cc \
+ base/i18n/string_search.cc \
+ base/i18n/time_formatting.cc \
+ base/i18n/timezone.cc \
+ base/i18n/utf8_validator_tables.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
+ '-DU_USING_ICU_NAMESPACE=0' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_I18N_IMPLEMENTATION' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/external/icu4c/common \
+ $(PWD)/external/icu4c/i18n \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' \
+ '-DU_USING_ICU_NAMESPACE=0' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DBASE_I18N_IMPLEMENTATION' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/external/icu4c/common \
+ $(PWD)/external/icu4c/i18n \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_i18n_gyp
+
+# Alias gyp target name.
+.PHONY: base_i18n
+base_i18n: base_base_i18n_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_java_application_state.target.darwin-arm.mk b/base/base_java_application_state.target.darwin-arm.mk
index 28953f7151..ed3ce479b1 100644
--- a/base/base_java_application_state.target.darwin-arm.mk
+++ b/base/base_java_application_state.target.darwin-arm.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.darwin-mips.mk b/base/base_java_application_state.target.darwin-mips.mk
index 16f15efc58..230ad2e170 100644
--- a/base/base_java_application_state.target.darwin-mips.mk
+++ b/base/base_java_application_state.target.darwin-mips.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.darwin-x86.mk b/base/base_java_application_state.target.darwin-x86.mk
index 12cbc8f8c3..cd1f59f790 100644
--- a/base/base_java_application_state.target.darwin-x86.mk
+++ b/base/base_java_application_state.target.darwin-x86.mk
@@ -95,6 +95,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -177,6 +178,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.darwin-x86_64.mk b/base/base_java_application_state.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..a0fed1cf6c
--- /dev/null
+++ b/base/base_java_application_state.target.darwin-x86_64.mk
@@ -0,0 +1,233 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_java_application_state_gyp
+LOCAL_MODULE_STEM := base_java_application_state
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_java_application_state_target_generate_java_constants":
+# "{'inputs': ['../build/android/gyp/util/build_utils.py', '../build/android/gyp/gcc_preprocess.py', 'android/application_state_list.h'], 'extension': 'template', 'outputs': ['$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'], 'variables': {'output_path': '$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'}, 'rule_name': 'generate_java_constants', 'rule_sources': ['android/java/src/org/chromium/base/ApplicationState.template'], 'action': ['python', '../build/android/gyp/gcc_preprocess.py', '--include-path=..', '--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java', '--template=$(RULE_SOURCES)'], 'message': 'Generating Java from cpp template $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ApplicationState.template $(LOCAL_PATH)/build/android/gyp/util/build_utils.py $(LOCAL_PATH)/build/android/gyp/gcc_preprocess.py $(LOCAL_PATH)/base/android/application_state_list.h $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/templates/org/chromium/base; cd $(gyp_local_path)/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java" "--template=android/java/src/org/chromium/base/ApplicationState.template"
+
+.PHONY: base_base_java_application_state_gyp_rule_trigger
+base_base_java_application_state_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ base_base_java_application_state_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_java_application_state_gyp
+
+# Alias gyp target name.
+.PHONY: base_java_application_state
+base_java_application_state: base_base_java_application_state_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_java_application_state.target.linux-arm.mk b/base/base_java_application_state.target.linux-arm.mk
index 28953f7151..ed3ce479b1 100644
--- a/base/base_java_application_state.target.linux-arm.mk
+++ b/base/base_java_application_state.target.linux-arm.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.linux-mips.mk b/base/base_java_application_state.target.linux-mips.mk
index 16f15efc58..230ad2e170 100644
--- a/base/base_java_application_state.target.linux-mips.mk
+++ b/base/base_java_application_state.target.linux-mips.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.linux-x86.mk b/base/base_java_application_state.target.linux-x86.mk
index 12cbc8f8c3..cd1f59f790 100644
--- a/base/base_java_application_state.target.linux-x86.mk
+++ b/base/base_java_application_state.target.linux-x86.mk
@@ -95,6 +95,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -177,6 +178,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_application_state.target.linux-x86_64.mk b/base/base_java_application_state.target.linux-x86_64.mk
new file mode 100644
index 0000000000..a0fed1cf6c
--- /dev/null
+++ b/base/base_java_application_state.target.linux-x86_64.mk
@@ -0,0 +1,233 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_java_application_state_gyp
+LOCAL_MODULE_STEM := base_java_application_state
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_java_application_state_target_generate_java_constants":
+# "{'inputs': ['../build/android/gyp/util/build_utils.py', '../build/android/gyp/gcc_preprocess.py', 'android/application_state_list.h'], 'extension': 'template', 'outputs': ['$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'], 'variables': {'output_path': '$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'}, 'rule_name': 'generate_java_constants', 'rule_sources': ['android/java/src/org/chromium/base/ApplicationState.template'], 'action': ['python', '../build/android/gyp/gcc_preprocess.py', '--include-path=..', '--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java', '--template=$(RULE_SOURCES)'], 'message': 'Generating Java from cpp template $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ApplicationState.template $(LOCAL_PATH)/build/android/gyp/util/build_utils.py $(LOCAL_PATH)/build/android/gyp/gcc_preprocess.py $(LOCAL_PATH)/base/android/application_state_list.h $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/templates/org/chromium/base; cd $(gyp_local_path)/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java" "--template=android/java/src/org/chromium/base/ApplicationState.template"
+
+.PHONY: base_base_java_application_state_gyp_rule_trigger
+base_base_java_application_state_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/templates/org/chromium/base/ApplicationState.java
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ base_base_java_application_state_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_java_application_state_gyp
+
+# Alias gyp target name.
+.PHONY: base_java_application_state
+base_java_application_state: base_base_java_application_state_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_java_memory_pressure_level_list.target.darwin-arm.mk b/base/base_java_memory_pressure_level_list.target.darwin-arm.mk
index ecf6444219..a3d4c70f7a 100644
--- a/base/base_java_memory_pressure_level_list.target.darwin-arm.mk
+++ b/base/base_java_memory_pressure_level_list.target.darwin-arm.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.darwin-mips.mk b/base/base_java_memory_pressure_level_list.target.darwin-mips.mk
index c829249d51..2ab63ca66d 100644
--- a/base/base_java_memory_pressure_level_list.target.darwin-mips.mk
+++ b/base/base_java_memory_pressure_level_list.target.darwin-mips.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.darwin-x86.mk b/base/base_java_memory_pressure_level_list.target.darwin-x86.mk
index 93daeeef17..cf46c276da 100644
--- a/base/base_java_memory_pressure_level_list.target.darwin-x86.mk
+++ b/base/base_java_memory_pressure_level_list.target.darwin-x86.mk
@@ -95,6 +95,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -177,6 +178,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.darwin-x86_64.mk b/base/base_java_memory_pressure_level_list.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..6a922c72d4
--- /dev/null
+++ b/base/base_java_memory_pressure_level_list.target.darwin-x86_64.mk
@@ -0,0 +1,233 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_java_memory_pressure_level_list_gyp
+LOCAL_MODULE_STEM := base_java_memory_pressure_level_list
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_java_memory_pressure_level_list_target_generate_java_constants":
+# "{'inputs': ['../build/android/gyp/util/build_utils.py', '../build/android/gyp/gcc_preprocess.py', 'memory/memory_pressure_level_list.h'], 'extension': 'template', 'outputs': ['$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'], 'variables': {'output_path': '$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'}, 'rule_name': 'generate_java_constants', 'rule_sources': ['android/java/src/org/chromium/base/MemoryPressureLevelList.template'], 'action': ['python', '../build/android/gyp/gcc_preprocess.py', '--include-path=..', '--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java', '--template=$(RULE_SOURCES)'], 'message': 'Generating Java from cpp template $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/MemoryPressureLevelList.template $(LOCAL_PATH)/build/android/gyp/util/build_utils.py $(LOCAL_PATH)/build/android/gyp/gcc_preprocess.py $(LOCAL_PATH)/base/memory/memory_pressure_level_list.h $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/templates/org/chromium/base; cd $(gyp_local_path)/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java" "--template=android/java/src/org/chromium/base/MemoryPressureLevelList.template"
+
+.PHONY: base_base_java_memory_pressure_level_list_gyp_rule_trigger
+base_base_java_memory_pressure_level_list_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ base_base_java_memory_pressure_level_list_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_java_memory_pressure_level_list_gyp
+
+# Alias gyp target name.
+.PHONY: base_java_memory_pressure_level_list
+base_java_memory_pressure_level_list: base_base_java_memory_pressure_level_list_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_java_memory_pressure_level_list.target.linux-arm.mk b/base/base_java_memory_pressure_level_list.target.linux-arm.mk
index ecf6444219..a3d4c70f7a 100644
--- a/base/base_java_memory_pressure_level_list.target.linux-arm.mk
+++ b/base/base_java_memory_pressure_level_list.target.linux-arm.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.linux-mips.mk b/base/base_java_memory_pressure_level_list.target.linux-mips.mk
index c829249d51..2ab63ca66d 100644
--- a/base/base_java_memory_pressure_level_list.target.linux-mips.mk
+++ b/base/base_java_memory_pressure_level_list.target.linux-mips.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.linux-x86.mk b/base/base_java_memory_pressure_level_list.target.linux-x86.mk
index 93daeeef17..cf46c276da 100644
--- a/base/base_java_memory_pressure_level_list.target.linux-x86.mk
+++ b/base/base_java_memory_pressure_level_list.target.linux-x86.mk
@@ -95,6 +95,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -177,6 +178,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_java_memory_pressure_level_list.target.linux-x86_64.mk b/base/base_java_memory_pressure_level_list.target.linux-x86_64.mk
new file mode 100644
index 0000000000..6a922c72d4
--- /dev/null
+++ b/base/base_java_memory_pressure_level_list.target.linux-x86_64.mk
@@ -0,0 +1,233 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_java_memory_pressure_level_list_gyp
+LOCAL_MODULE_STEM := base_java_memory_pressure_level_list
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_java_memory_pressure_level_list_target_generate_java_constants":
+# "{'inputs': ['../build/android/gyp/util/build_utils.py', '../build/android/gyp/gcc_preprocess.py', 'memory/memory_pressure_level_list.h'], 'extension': 'template', 'outputs': ['$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'], 'variables': {'output_path': '$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java'}, 'rule_name': 'generate_java_constants', 'rule_sources': ['android/java/src/org/chromium/base/MemoryPressureLevelList.template'], 'action': ['python', '../build/android/gyp/gcc_preprocess.py', '--include-path=..', '--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/%(INPUT_ROOT)s.java', '--template=$(RULE_SOURCES)'], 'message': 'Generating Java from cpp template $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/MemoryPressureLevelList.template $(LOCAL_PATH)/build/android/gyp/util/build_utils.py $(LOCAL_PATH)/build/android/gyp/gcc_preprocess.py $(LOCAL_PATH)/base/memory/memory_pressure_level_list.h $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/templates/org/chromium/base; cd $(gyp_local_path)/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=$(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java" "--template=android/java/src/org/chromium/base/MemoryPressureLevelList.template"
+
+.PHONY: base_base_java_memory_pressure_level_list_gyp_rule_trigger
+base_base_java_memory_pressure_level_list_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/templates/org/chromium/base/MemoryPressureLevelList.java
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ base_base_java_memory_pressure_level_list_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_java_memory_pressure_level_list_gyp
+
+# Alias gyp target name.
+.PHONY: base_java_memory_pressure_level_list
+base_java_memory_pressure_level_list: base_base_java_memory_pressure_level_list_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_jni_headers.target.darwin-arm.mk b/base/base_jni_headers.target.darwin-arm.mk
index 7786e83db2..90e433447a 100644
--- a/base/base_jni_headers.target.darwin-arm.mk
+++ b/base/base_jni_headers.target.darwin-arm.mk
@@ -275,6 +275,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -357,6 +358,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.darwin-mips.mk b/base/base_jni_headers.target.darwin-mips.mk
index dce720c5bd..789a1606bb 100644
--- a/base/base_jni_headers.target.darwin-mips.mk
+++ b/base/base_jni_headers.target.darwin-mips.mk
@@ -274,6 +274,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -355,6 +356,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.darwin-x86.mk b/base/base_jni_headers.target.darwin-x86.mk
index 33abfbce37..6ca134f3d1 100644
--- a/base/base_jni_headers.target.darwin-x86.mk
+++ b/base/base_jni_headers.target.darwin-x86.mk
@@ -276,6 +276,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -358,6 +359,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.darwin-x86_64.mk b/base/base_jni_headers.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..d41370d5f9
--- /dev/null
+++ b/base/base_jni_headers.target.darwin-x86_64.mk
@@ -0,0 +1,414 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_jni_headers_gyp
+LOCAL_MODULE_STEM := base_jni_headers
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_jni_headers_target_generate_jni_headers":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/base/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/base/ApplicationStatus.java', 'android/java/src/org/chromium/base/BuildInfo.java', 'android/java/src/org/chromium/base/CommandLine.java', 'android/java/src/org/chromium/base/ContentUriUtils.java', 'android/java/src/org/chromium/base/CpuFeatures.java', 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java', 'android/java/src/org/chromium/base/library_loader/LibraryLoader.java', 'android/java/src/org/chromium/base/MemoryPressureListener.java', 'android/java/src/org/chromium/base/JavaHandlerThread.java', 'android/java/src/org/chromium/base/PathService.java', 'android/java/src/org/chromium/base/PathUtils.java', 'android/java/src/org/chromium/base/PowerMonitor.java', 'android/java/src/org/chromium/base/SystemMessageHandler.java', 'android/java/src/org/chromium/base/SysUtils.java', 'android/java/src/org/chromium/base/ThreadUtils.java', 'android/java/src/org/chromium/base/TraceEvent.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/base/jni', '--includes', 'base/android/jni_generator/jni_generator_helper.h', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt', '--ptr_type', 'long'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ApplicationStatus.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ApplicationStatus.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/BuildInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/BuildInfo.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/CommandLine.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/CommandLine.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ContentUriUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ContentUriUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/CpuFeatures.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/CpuFeatures.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ImportantFileWriterAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ImportantFileWriterAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/library_loader/LibraryLoader.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/MemoryPressureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/MemoryPressureListener.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/JavaHandlerThread.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/JavaHandlerThread.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PathService.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PathService.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PathUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PathUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PowerMonitor.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PowerMonitor.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/SystemMessageHandler.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/SystemMessageHandler.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/SysUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/SysUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ThreadUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ThreadUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/TraceEvent.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/TraceEvent.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h \
+ base_base_jni_headers_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_jni_headers_gyp
+
+# Alias gyp target name.
+.PHONY: base_jni_headers
+base_jni_headers: base_base_jni_headers_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_jni_headers.target.linux-arm.mk b/base/base_jni_headers.target.linux-arm.mk
index 7786e83db2..90e433447a 100644
--- a/base/base_jni_headers.target.linux-arm.mk
+++ b/base/base_jni_headers.target.linux-arm.mk
@@ -275,6 +275,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -357,6 +358,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.linux-mips.mk b/base/base_jni_headers.target.linux-mips.mk
index dce720c5bd..789a1606bb 100644
--- a/base/base_jni_headers.target.linux-mips.mk
+++ b/base/base_jni_headers.target.linux-mips.mk
@@ -274,6 +274,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -355,6 +356,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.linux-x86.mk b/base/base_jni_headers.target.linux-x86.mk
index 33abfbce37..6ca134f3d1 100644
--- a/base/base_jni_headers.target.linux-x86.mk
+++ b/base/base_jni_headers.target.linux-x86.mk
@@ -276,6 +276,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -358,6 +359,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_jni_headers.target.linux-x86_64.mk b/base/base_jni_headers.target.linux-x86_64.mk
new file mode 100644
index 0000000000..d41370d5f9
--- /dev/null
+++ b/base/base_jni_headers.target.linux-x86_64.mk
@@ -0,0 +1,414 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := GYP
+LOCAL_MODULE := base_base_jni_headers_gyp
+LOCAL_MODULE_STEM := base_jni_headers
+LOCAL_MODULE_SUFFIX := .stamp
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+
+### Generated for rule "base_base_gyp_base_jni_headers_target_generate_jni_headers":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/base/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/base/ApplicationStatus.java', 'android/java/src/org/chromium/base/BuildInfo.java', 'android/java/src/org/chromium/base/CommandLine.java', 'android/java/src/org/chromium/base/ContentUriUtils.java', 'android/java/src/org/chromium/base/CpuFeatures.java', 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java', 'android/java/src/org/chromium/base/library_loader/LibraryLoader.java', 'android/java/src/org/chromium/base/MemoryPressureListener.java', 'android/java/src/org/chromium/base/JavaHandlerThread.java', 'android/java/src/org/chromium/base/PathService.java', 'android/java/src/org/chromium/base/PathUtils.java', 'android/java/src/org/chromium/base/PowerMonitor.java', 'android/java/src/org/chromium/base/SystemMessageHandler.java', 'android/java/src/org/chromium/base/SysUtils.java', 'android/java/src/org/chromium/base/ThreadUtils.java', 'android/java/src/org/chromium/base/TraceEvent.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/base/jni', '--includes', 'base/android/jni_generator/jni_generator_helper.h', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt', '--ptr_type', 'long'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ApplicationStatus.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ApplicationStatus.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/BuildInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/BuildInfo.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/CommandLine.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/CommandLine.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ContentUriUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ContentUriUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/CpuFeatures.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/CpuFeatures.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ImportantFileWriterAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ImportantFileWriterAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/library_loader/LibraryLoader.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/MemoryPressureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/MemoryPressureListener.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/JavaHandlerThread.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/JavaHandlerThread.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PathService.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PathService.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PathUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PathUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/PowerMonitor.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/PowerMonitor.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/SystemMessageHandler.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/SystemMessageHandler.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/SysUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/SysUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/ThreadUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/ThreadUtils.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h
+
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h: $(LOCAL_PATH)/base/android/java/src/org/chromium/base/TraceEvent.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/base/jni; cd $(gyp_local_path)/base; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/base/TraceEvent.java --output_dir "$(gyp_shared_intermediate_dir)/base/jni" --includes base/android/jni_generator/jni_generator_helper.h --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt --ptr_type long
+
+.PHONY: base_base_jni_headers_gyp_rule_trigger
+base_base_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h
+
+### Finished generating for all rules
+
+GYP_GENERATED_OUTPUTS := \
+ $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES := \
+ $(gyp_shared_intermediate_dir)/base/jni/ApplicationStatus_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/BuildInfo_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CommandLine_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ContentUriUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/CpuFeatures_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ImportantFileWriterAndroid_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/LibraryLoader_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/MemoryPressureListener_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/JavaHandlerThread_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathService_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PathUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/PowerMonitor_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SystemMessageHandler_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/SysUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/ThreadUtils_jni.h \
+ $(gyp_shared_intermediate_dir)/base/jni/TraceEvent_jni.h \
+ base_base_jni_headers_gyp_rule_trigger
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES :=
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_jni_headers_gyp
+
+# Alias gyp target name.
+.PHONY: base_jni_headers
+base_jni_headers: base_base_jni_headers_gyp
+
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(hide) echo "Gyp timestamp: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
index d4e11ae506..509d5fd7ef 100644
--- a/base/base_paths_win.cc
+++ b/base/base_paths_win.cc
@@ -191,6 +191,13 @@ bool PathProviderWin(int key, FilePath* result) {
cur = cur.AppendASCII("User Pinned");
cur = cur.AppendASCII("TaskBar");
break;
+ case base::DIR_WINDOWS_FONTS:
+ if (FAILED(SHGetFolderPath(
+ NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, system_buffer))) {
+ return false;
+ }
+ cur = FilePath(system_buffer);
+ break;
default:
return false;
}
diff --git a/base/base_paths_win.h b/base/base_paths_win.h
index 1c4457859b..b042d08737 100644
--- a/base/base_paths_win.h
+++ b/base/base_paths_win.h
@@ -41,6 +41,7 @@ enum {
// of the Default user.
DIR_TASKBAR_PINS, // Directory for the shortcuts pinned to taskbar via
// base::win::TaskbarPinShortcutLink().
+ DIR_WINDOWS_FONTS, // Usually C:\Windows\Fonts.
PATH_WIN_END
};
diff --git a/base/base_prefs.target.darwin-arm.mk b/base/base_prefs.target.darwin-arm.mk
index e4cf7d61fe..1c069d4899 100644
--- a/base/base_prefs.target.darwin-arm.mk
+++ b/base/base_prefs.target.darwin-arm.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -178,6 +179,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.darwin-mips.mk b/base/base_prefs.target.darwin-mips.mk
index 132c87ec11..c8ccbf7a9d 100644
--- a/base/base_prefs.target.darwin-mips.mk
+++ b/base/base_prefs.target.darwin-mips.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.darwin-x86.mk b/base/base_prefs.target.darwin-x86.mk
index cdb1bda83f..181ce24886 100644
--- a/base/base_prefs.target.darwin-x86.mk
+++ b/base/base_prefs.target.darwin-x86.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -179,6 +180,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.darwin-x86_64.mk b/base/base_prefs.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..ffab75e9c3
--- /dev/null
+++ b/base/base_prefs.target.darwin-x86_64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_prefs_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/prefs/default_pref_store.cc \
+ base/prefs/json_pref_store.cc \
+ base/prefs/overlay_user_pref_store.cc \
+ base/prefs/pref_change_registrar.cc \
+ base/prefs/pref_member.cc \
+ base/prefs/pref_notifier_impl.cc \
+ base/prefs/pref_registry.cc \
+ base/prefs/pref_registry_simple.cc \
+ base/prefs/pref_service.cc \
+ base/prefs/pref_service_factory.cc \
+ base/prefs/pref_store.cc \
+ base/prefs/pref_value_map.cc \
+ base/prefs/pref_value_store.cc \
+ base/prefs/scoped_user_pref_update.cc \
+ base/prefs/value_map_pref_store.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DBASE_PREFS_IMPLEMENTATION' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DBASE_PREFS_IMPLEMENTATION' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_prefs_gyp
+
+# Alias gyp target name.
+.PHONY: base_prefs
+base_prefs: base_base_prefs_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_prefs.target.linux-arm.mk b/base/base_prefs.target.linux-arm.mk
index e4cf7d61fe..1c069d4899 100644
--- a/base/base_prefs.target.linux-arm.mk
+++ b/base/base_prefs.target.linux-arm.mk
@@ -93,6 +93,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -178,6 +179,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.linux-mips.mk b/base/base_prefs.target.linux-mips.mk
index 132c87ec11..c8ccbf7a9d 100644
--- a/base/base_prefs.target.linux-mips.mk
+++ b/base/base_prefs.target.linux-mips.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -176,6 +177,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.linux-x86.mk b/base/base_prefs.target.linux-x86.mk
index cdb1bda83f..181ce24886 100644
--- a/base/base_prefs.target.linux-x86.mk
+++ b/base/base_prefs.target.linux-x86.mk
@@ -94,6 +94,7 @@ MY_DEFS_Debug := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -179,6 +180,7 @@ MY_DEFS_Release := \
'-DENABLE_MANAGED_USERS=1' \
'-DBASE_PREFS_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_prefs.target.linux-x86_64.mk b/base/base_prefs.target.linux-x86_64.mk
new file mode 100644
index 0000000000..ffab75e9c3
--- /dev/null
+++ b/base/base_prefs.target.linux-x86_64.mk
@@ -0,0 +1,275 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_prefs_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/prefs/default_pref_store.cc \
+ base/prefs/json_pref_store.cc \
+ base/prefs/overlay_user_pref_store.cc \
+ base/prefs/pref_change_registrar.cc \
+ base/prefs/pref_member.cc \
+ base/prefs/pref_notifier_impl.cc \
+ base/prefs/pref_registry.cc \
+ base/prefs/pref_registry_simple.cc \
+ base/prefs/pref_service.cc \
+ base/prefs/pref_service_factory.cc \
+ base/prefs/pref_store.cc \
+ base/prefs/pref_value_map.cc \
+ base/prefs/pref_value_store.cc \
+ base/prefs/scoped_user_pref_update.cc \
+ base/prefs/value_map_pref_store.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DBASE_PREFS_IMPLEMENTATION' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DBASE_PREFS_IMPLEMENTATION' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_prefs_gyp
+
+# Alias gyp target name.
+.PHONY: base_prefs
+base_prefs: base_base_prefs_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_static.target.darwin-arm.mk b/base/base_static.target.darwin-arm.mk
index b14c9db528..e7f0b83917 100644
--- a/base/base_static.target.darwin-arm.mk
+++ b/base/base_static.target.darwin-arm.mk
@@ -78,6 +78,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -161,6 +162,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.darwin-mips.mk b/base/base_static.target.darwin-mips.mk
index 9e9223c94d..7c88d0749c 100644
--- a/base/base_static.target.darwin-mips.mk
+++ b/base/base_static.target.darwin-mips.mk
@@ -77,6 +77,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -159,6 +160,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.darwin-x86.mk b/base/base_static.target.darwin-x86.mk
index 6d9790af11..5645d20885 100644
--- a/base/base_static.target.darwin-x86.mk
+++ b/base/base_static.target.darwin-x86.mk
@@ -79,6 +79,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -162,6 +163,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.darwin-x86_64.mk b/base/base_static.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..a303d71ffd
--- /dev/null
+++ b/base/base_static.target.darwin-x86_64.mk
@@ -0,0 +1,257 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_static_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/base_switches.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_static_gyp
+
+# Alias gyp target name.
+.PHONY: base_static
+base_static: base_base_static_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/base_static.target.linux-arm.mk b/base/base_static.target.linux-arm.mk
index b14c9db528..e7f0b83917 100644
--- a/base/base_static.target.linux-arm.mk
+++ b/base/base_static.target.linux-arm.mk
@@ -78,6 +78,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -161,6 +162,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.linux-mips.mk b/base/base_static.target.linux-mips.mk
index 9e9223c94d..7c88d0749c 100644
--- a/base/base_static.target.linux-mips.mk
+++ b/base/base_static.target.linux-mips.mk
@@ -77,6 +77,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -159,6 +160,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.linux-x86.mk b/base/base_static.target.linux-x86.mk
index 6d9790af11..5645d20885 100644
--- a/base/base_static.target.linux-x86.mk
+++ b/base/base_static.target.linux-x86.mk
@@ -79,6 +79,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
@@ -162,6 +163,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
'-D__STDC_FORMAT_MACROS' \
'-DANDROID' \
diff --git a/base/base_static.target.linux-x86_64.mk b/base/base_static.target.linux-x86_64.mk
new file mode 100644
index 0000000000..a303d71ffd
--- /dev/null
+++ b/base/base_static.target.linux-x86_64.mk
@@ -0,0 +1,257 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_base_static_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/base_switches.cc
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -Werror \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wall \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-D__STDC_CONSTANT_MACROS' \
+ '-D__STDC_FORMAT_MACROS' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
+ '-D_FORTIFY_SOURCE=2'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wsign-compare \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_base_static_gyp
+
+# Alias gyp target name.
+.PHONY: base_static
+base_static: base_base_static_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/bind_unittest.cc b/base/bind_unittest.cc
index 2c93d53ee4..e1f15cb201 100644
--- a/base/bind_unittest.cc
+++ b/base/bind_unittest.cc
@@ -127,10 +127,6 @@ class CopyCounter {
return *copies_;
}
- int assigns() const {
- return *assigns_;
- }
-
private:
int* copies_;
int* assigns_;
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index c83b6b56de..16837dff47 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -196,19 +196,6 @@
// If available, it would look like:
// __attribute__((format(wprintf, format_param, dots_param)))
-#if defined(__OBJC__)
-// Tell the compiler a function is using a +[NSString stringWithFormat:]
-// style format string. |format_param| is the one-based index of the format
-// string parameter; |dots_param| is the one-based index of the "..."
-// parameter. This should only be used when building Objective-C code.
-#if defined(COMPILER_GCC)
-#define NSSTRING_FORMAT(format_param, dots_param) \
- __attribute__((format(__NSString__, format_param, dots_param)))
-#else
-#define NSSTRING_FORMAT(format_param, dots_param)
-#endif // defined(COMPILER_GCC)
-#endif // defined(__OBJC__)
-
// MemorySanitizer annotations.
#if defined(MEMORY_SANITIZER) && !defined(OS_NACL)
#include <sanitizer/msan_interface.h>
@@ -230,15 +217,6 @@
#endif // defined(OS_WIN)
#endif // !defined(CDECL)
-// Macro for hinting that an expression is likely to be true.
-#if !defined(LIKELY)
-#if defined(COMPILER_GCC)
-#define LIKELY(x) __builtin_expect(!!(x), 1)
-#else
-#define LIKELY(x) (x)
-#endif // defined(COMPILER_GCC)
-#endif // !defined(LIKELY)
-
// Macro for hinting that an expression is likely to be false.
#if !defined(UNLIKELY)
#if defined(COMPILER_GCC)
diff --git a/base/debug/proc_maps_linux.cc b/base/debug/proc_maps_linux.cc
index d9ff8c5587..1e0209e9bf 100644
--- a/base/debug/proc_maps_linux.cc
+++ b/base/debug/proc_maps_linux.cc
@@ -91,6 +91,7 @@ bool ReadProcMaps(std::string* proc_maps) {
bool ParseProcMaps(const std::string& input,
std::vector<MappedMemoryRegion>* regions_out) {
+ CHECK(regions_out);
std::vector<MappedMemoryRegion> regions;
// This isn't async safe nor terribly efficient, but it doesn't need to be at
@@ -101,8 +102,10 @@ bool ParseProcMaps(const std::string& input,
for (size_t i = 0; i < lines.size(); ++i) {
// Due to splitting on '\n' the last line should be empty.
if (i == lines.size() - 1) {
- if (!lines[i].empty())
+ if (!lines[i].empty()) {
+ DLOG(WARNING) << "Last line not empty";
return false;
+ }
break;
}
@@ -125,6 +128,7 @@ bool ParseProcMaps(const std::string& input,
if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR " %4c %llx %hhx:%hhx %ld %n",
&region.start, &region.end, permissions, &region.offset,
&dev_major, &dev_minor, &inode, &path_index) < 7) {
+ DPLOG(WARNING) << "sscanf failed for line: " << line;
return false;
}
diff --git a/base/debug/proc_maps_linux_unittest.cc b/base/debug/proc_maps_linux_unittest.cc
index 7c2929f212..fc8ced6aa0 100644
--- a/base/debug/proc_maps_linux_unittest.cc
+++ b/base/debug/proc_maps_linux_unittest.cc
@@ -277,5 +277,37 @@ TEST(ProcMapsTest, InvalidInput) {
}
}
+TEST(ProcMapsTest, ParseProcMapsEmptyString) {
+ std::vector<MappedMemoryRegion> regions;
+ EXPECT_TRUE(ParseProcMaps("", &regions));
+ EXPECT_EQ(0ULL, regions.size());
+}
+
+// Testing a couple of remotely possible weird things in the input:
+// - Line ending with \r\n or \n\r.
+// - File name contains quotes.
+// - File name has whitespaces.
+TEST(ProcMapsTest, ParseProcMapsWeirdCorrectInput) {
+ std::vector<MappedMemoryRegion> regions;
+ const std::string kContents =
+ "00400000-0040b000 r-xp 00000000 fc:00 2106562 "
+ " /bin/cat\r\n"
+ "7f53b7dad000-7f53b7f62000 r-xp 00000000 fc:00 263011 "
+ " /lib/x86_64-linux-gnu/libc-2.15.so\n\r"
+ "7f53b816d000-7f53b818f000 r-xp 00000000 fc:00 264284 "
+ " /lib/x86_64-linux-gnu/ld-2.15.so\n"
+ "7fff9c7ff000-7fff9c800000 r-xp 00000000 00:00 0 "
+ " \"vd so\"\n"
+ "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 "
+ " [vsys call]\n";
+ EXPECT_TRUE(ParseProcMaps(kContents, &regions));
+ EXPECT_EQ(5ULL, regions.size());
+ EXPECT_EQ("/bin/cat", regions[0].path);
+ EXPECT_EQ("/lib/x86_64-linux-gnu/libc-2.15.so", regions[1].path);
+ EXPECT_EQ("/lib/x86_64-linux-gnu/ld-2.15.so", regions[2].path);
+ EXPECT_EQ("\"vd so\"", regions[3].path);
+ EXPECT_EQ("[vsys call]", regions[4].path);
+}
+
} // namespace debug
} // namespace base
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index b0883c1fc9..78f886ae1d 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -27,6 +27,15 @@ namespace debug {
// unit_tests only! This is not thread-safe: only call from main thread.
BASE_EXPORT bool EnableInProcessStackDumping();
+// A different version of EnableInProcessStackDumping that also works for
+// sandboxed processes. For more details take a look at the description
+// of EnableInProcessStackDumping.
+// Calling this function on Linux opens /proc/self/maps and caches its
+// contents. In DEBUG builds, this function also opens the object files that
+// are loaded in memory and caches their file descriptors (this cannot be
+// done in official builds because it has security implications).
+BASE_EXPORT bool EnableInProcessStackDumpingForSandbox();
+
// A stacktrace can be helpful in debugging. For example, you can include a
// stacktrace member in a object (probably around #ifndef NDEBUG) so that you
// can later see where the given object was created from.
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 3f0e95fb7f..2d63a24243 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -15,7 +15,10 @@
#include <sys/types.h>
#include <unistd.h>
+#include <map>
#include <ostream>
+#include <string>
+#include <vector>
#if defined(__GLIBCXX__)
#include <cxxabi.h>
@@ -27,11 +30,14 @@
#include "base/basictypes.h"
#include "base/debug/debugger.h"
+#include "base/debug/proc_maps_linux.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/singleton.h"
#include "base/numerics/safe_conversions.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
#if defined(USE_SYMBOLIZE)
#include "base/third_party/symbolize/symbolize.h"
@@ -115,14 +121,27 @@ class BacktraceOutputHandler {
};
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
- char buf[1024] = { '\0' };
- handler->HandleOutput(" [0x");
+ // This should be more than enough to store a 64-bit number in hex:
+ // 16 hex digits + 1 for null-terminator.
+ char buf[17] = { '\0' };
+ handler->HandleOutput("0x");
internal::itoa_r(reinterpret_cast<intptr_t>(pointer),
buf, sizeof(buf), 16, 12);
handler->HandleOutput(buf);
- handler->HandleOutput("]");
}
+#if defined(USE_SYMBOLIZE)
+void OutputFrameId(intptr_t frame_id, BacktraceOutputHandler* handler) {
+ // Max unsigned 64-bit number in decimal has 20 digits (18446744073709551615).
+ // Hence, 30 digits should be more than enough to represent it in decimal
+ // (including the null-terminator).
+ char buf[30] = { '\0' };
+ handler->HandleOutput("#");
+ internal::itoa_r(frame_id, buf, sizeof(buf), 10, 1);
+ handler->HandleOutput(buf);
+}
+#endif // defined(USE_SYMBOLIZE)
+
void ProcessBacktrace(void *const *trace,
size_t size,
BacktraceOutputHandler* handler) {
@@ -131,6 +150,8 @@ void ProcessBacktrace(void *const *trace,
#if defined(USE_SYMBOLIZE)
for (size_t i = 0; i < size; ++i) {
+ OutputFrameId(i, handler);
+ handler->HandleOutput(" ");
OutputPointer(trace[i], handler);
handler->HandleOutput(" ");
@@ -168,8 +189,9 @@ void ProcessBacktrace(void *const *trace,
if (!printed) {
for (size_t i = 0; i < size; ++i) {
+ handler->HandleOutput(" [");
OutputPointer(trace[i], handler);
- handler->HandleOutput("\n");
+ handler->HandleOutput("]\n");
}
}
#endif // defined(USE_SYMBOLIZE)
@@ -438,6 +460,248 @@ void WarmUpBacktrace() {
} // namespace
+#if defined(USE_SYMBOLIZE)
+
+// class SandboxSymbolizeHelper.
+//
+// The purpose of this class is to prepare and install a "file open" callback
+// needed by the stack trace symbolization code
+// (base/third_party/symbolize/symbolize.h) so that it can function properly
+// in a sandboxed process. The caveat is that this class must be instantiated
+// before the sandboxing is enabled so that it can get the chance to open all
+// the object files that are loaded in the virtual address space of the current
+// process.
+class SandboxSymbolizeHelper {
+ public:
+ // Returns the singleton instance.
+ static SandboxSymbolizeHelper* GetInstance() {
+ return Singleton<SandboxSymbolizeHelper>::get();
+ }
+
+ private:
+ friend struct DefaultSingletonTraits<SandboxSymbolizeHelper>;
+
+ SandboxSymbolizeHelper()
+ : is_initialized_(false) {
+ Init();
+ }
+
+ ~SandboxSymbolizeHelper() {
+ UnregisterCallback();
+ CloseObjectFiles();
+ }
+
+ // Returns a O_RDONLY file descriptor for |file_path| if it was opened
+ // sucessfully during the initialization. The file is repositioned at
+ // offset 0.
+ // IMPORTANT: This function must be async-signal-safe because it can be
+ // called from a signal handler (symbolizing stack frames for a crash).
+ int GetFileDescriptor(const char* file_path) {
+ int fd = -1;
+
+#if !defined(NDEBUG)
+ if (file_path) {
+ // The assumption here is that iterating over std::map<std::string, int>
+ // using a const_iterator does not allocate dynamic memory, hense it is
+ // async-signal-safe.
+ std::map<std::string, int>::const_iterator it;
+ for (it = modules_.begin(); it != modules_.end(); ++it) {
+ if (strcmp((it->first).c_str(), file_path) == 0) {
+ // POSIX.1-2004 requires an implementation to guarantee that dup()
+ // is async-signal-safe.
+ fd = dup(it->second);
+ break;
+ }
+ }
+ // POSIX.1-2004 requires an implementation to guarantee that lseek()
+ // is async-signal-safe.
+ if (fd >= 0 && lseek(fd, 0, SEEK_SET) < 0) {
+ // Failed to seek.
+ fd = -1;
+ }
+ }
+#endif // !defined(NDEBUG)
+
+ return fd;
+ }
+
+ // Searches for the object file (from /proc/self/maps) that contains
+ // the specified pc. If found, sets |start_address| to the start address
+ // of where this object file is mapped in memory, sets the module base
+ // address into |base_address|, copies the object file name into
+ // |out_file_name|, and attempts to open the object file. If the object
+ // file is opened successfully, returns the file descriptor. Otherwise,
+ // returns -1. |out_file_name_size| is the size of the file name buffer
+ // (including the null terminator).
+ // IMPORTANT: This function must be async-signal-safe because it can be
+ // called from a signal handler (symbolizing stack frames for a crash).
+ static int OpenObjectFileContainingPc(uint64_t pc, uint64_t& start_address,
+ uint64_t& base_address, char* file_path,
+ int file_path_size) {
+ // This method can only be called after the singleton is instantiated.
+ // This is ensured by the following facts:
+ // * This is the only static method in this class, it is private, and
+ // the class has no friends (except for the DefaultSingletonTraits).
+ // The compiler guarantees that it can only be called after the
+ // singleton is instantiated.
+ // * This method is used as a callback for the stack tracing code and
+ // the callback registration is done in the constructor, so logically
+ // it cannot be called before the singleton is created.
+ SandboxSymbolizeHelper* instance = GetInstance();
+
+ // The assumption here is that iterating over
+ // std::vector<MappedMemoryRegion> using a const_iterator does not allocate
+ // dynamic memory, hence it is async-signal-safe.
+ std::vector<MappedMemoryRegion>::const_iterator it;
+ bool is_first = true;
+ for (it = instance->regions_.begin(); it != instance->regions_.end();
+ ++it, is_first = false) {
+ const MappedMemoryRegion& region = *it;
+ if (region.start <= pc && pc < region.end) {
+ start_address = region.start;
+ // Don't subtract 'start_address' from the first entry:
+ // * If a binary is compiled w/o -pie, then the first entry in
+ // process maps is likely the binary itself (all dynamic libs
+ // are mapped higher in address space). For such a binary,
+ // instruction offset in binary coincides with the actual
+ // instruction address in virtual memory (as code section
+ // is mapped to a fixed memory range).
+ // * If a binary is compiled with -pie, all the modules are
+ // mapped high at address space (in particular, higher than
+ // shadow memory of the tool), so the module can't be the
+ // first entry.
+ base_address = (is_first ? 0U : start_address) - region.offset;
+ if (file_path && file_path_size > 0) {
+ strncpy(file_path, region.path.c_str(), file_path_size);
+ // Ensure null termination.
+ file_path[file_path_size - 1] = '\0';
+ }
+ return instance->GetFileDescriptor(region.path.c_str());
+ }
+ }
+ return -1;
+ }
+
+ // Parses /proc/self/maps in order to compile a list of all object file names
+ // for the modules that are loaded in the current process.
+ // Returns true on success.
+ bool CacheMemoryRegions() {
+ // Reads /proc/self/maps.
+ std::string contents;
+ if (!ReadProcMaps(&contents)) {
+ LOG(ERROR) << "Failed to read /proc/self/maps";
+ return false;
+ }
+
+ // Parses /proc/self/maps.
+ if (!ParseProcMaps(contents, &regions_)) {
+ LOG(ERROR) << "Failed to parse the contents of /proc/self/maps";
+ return false;
+ }
+
+ is_initialized_ = true;
+ return true;
+ }
+
+ // Opens all object files and caches their file descriptors.
+ void OpenSymbolFiles() {
+ // Pre-opening and caching the file descriptors of all loaded modules is
+ // not considered safe for retail builds. Hence it is only done in debug
+ // builds. For more details, take a look at: http://crbug.com/341966
+ // Enabling this to release mode would require approval from the security
+ // team.
+#if !defined(NDEBUG)
+ // Open the object files for all read-only executable regions and cache
+ // their file descriptors.
+ std::vector<MappedMemoryRegion>::const_iterator it;
+ for (it = regions_.begin(); it != regions_.end(); ++it) {
+ const MappedMemoryRegion& region = *it;
+ // Only interesed in read-only executable regions.
+ if ((region.permissions & MappedMemoryRegion::READ) ==
+ MappedMemoryRegion::READ &&
+ (region.permissions & MappedMemoryRegion::WRITE) == 0 &&
+ (region.permissions & MappedMemoryRegion::EXECUTE) ==
+ MappedMemoryRegion::EXECUTE) {
+ if (region.path.empty()) {
+ // Skip regions with empty file names.
+ continue;
+ }
+ if (region.path[0] == '[') {
+ // Skip pseudo-paths, like [stack], [vdso], [heap], etc ...
+ continue;
+ }
+ // Avoid duplicates.
+ if (modules_.find(region.path) == modules_.end()) {
+ int fd = open(region.path.c_str(), O_RDONLY | O_CLOEXEC);
+ if (fd >= 0) {
+ modules_.insert(std::make_pair(region.path, fd));
+ } else {
+ LOG(WARNING) << "Failed to open file: " << region.path
+ << "\n Error: " << strerror(errno);
+ }
+ }
+ }
+ }
+#endif // !defined(NDEBUG)
+ }
+
+ // Initializes and installs the symbolization callback.
+ void Init() {
+ if (CacheMemoryRegions()) {
+ OpenSymbolFiles();
+ google::InstallSymbolizeOpenObjectFileCallback(
+ &OpenObjectFileContainingPc);
+ }
+ }
+
+ // Unregister symbolization callback.
+ void UnregisterCallback() {
+ if (is_initialized_) {
+ google::InstallSymbolizeOpenObjectFileCallback(NULL);
+ is_initialized_ = false;
+ }
+ }
+
+ // Closes all file descriptors owned by this instance.
+ void CloseObjectFiles() {
+#if !defined(NDEBUG)
+ std::map<std::string, int>::iterator it;
+ for (it = modules_.begin(); it != modules_.end(); ++it) {
+ int ret = IGNORE_EINTR(close(it->second));
+ DCHECK(!ret);
+ it->second = -1;
+ }
+ modules_.clear();
+#endif // !defined(NDEBUG)
+ }
+
+ // Set to true upon successful initialization.
+ bool is_initialized_;
+
+#if !defined(NDEBUG)
+ // Mapping from file name to file descriptor. Includes file descriptors
+ // for all successfully opened object files and the file descriptor for
+ // /proc/self/maps. This code is not safe for release builds so
+ // this is only done for DEBUG builds.
+ std::map<std::string, int> modules_;
+#endif // !defined(NDEBUG)
+
+ // Cache for the process memory regions. Produced by parsing the contents
+ // of /proc/self/maps cache.
+ std::vector<MappedMemoryRegion> regions_;
+
+ DISALLOW_COPY_AND_ASSIGN(SandboxSymbolizeHelper);
+};
+#endif // USE_SYMBOLIZE
+
+bool EnableInProcessStackDumpingForSandbox() {
+#if defined(USE_SYMBOLIZE)
+ SandboxSymbolizeHelper::GetInstance();
+#endif // USE_SYMBOLIZE
+
+ return EnableInProcessStackDumping();
+}
+
bool EnableInProcessStackDumping() {
// When running in an application, our code typically expects SIGPIPE
// to be ignored. Therefore, when testing that same code, it should run
@@ -462,7 +726,10 @@ bool EnableInProcessStackDumping() {
success &= (sigaction(SIGFPE, &action, NULL) == 0);
success &= (sigaction(SIGBUS, &action, NULL) == 0);
success &= (sigaction(SIGSEGV, &action, NULL) == 0);
+// On Linux, SIGSYS is reserved by the kernel for seccomp-bpf sandboxing.
+#if !defined(OS_LINUX)
success &= (sigaction(SIGSYS, &action, NULL) == 0);
+#endif // !defined(OS_LINUX)
return success;
}
diff --git a/base/files/file.cc b/base/files/file.cc
index cd167b1607..2a2f84330e 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -20,7 +20,7 @@ File::Info::~Info() {
File::File()
: file_(kInvalidPlatformFileValue),
- error_details_(FILE_OK),
+ error_details_(FILE_ERROR_FAILED),
created_(false),
async_(false) {
}
@@ -45,6 +45,13 @@ File::File(PlatformFile platform_file)
#endif
}
+File::File(Error error_details)
+ : file_(kInvalidPlatformFileValue),
+ error_details_(error_details),
+ created_(false),
+ async_(false) {
+}
+
File::File(RValue other)
: file_(other.object->TakePlatformFile()),
error_details_(other.object->error_details()),
diff --git a/base/files/file.h b/base/files/file.h
index dc7616bb61..a4aea07f70 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -149,6 +149,9 @@ class BASE_EXPORT File {
// Takes ownership of |platform_file|.
explicit File(PlatformFile platform_file);
+ // Creates an object with a specific error_details code.
+ explicit File(Error error_details);
+
// Move constructor for C++03 move emulation of this type.
File(RValue other);
diff --git a/base/files/file_unittest.cc b/base/files/file_unittest.cc
index 59cba31f03..468b2a83bd 100644
--- a/base/files/file_unittest.cc
+++ b/base/files/file_unittest.cc
@@ -17,6 +17,17 @@ TEST(FileTest, Create) {
FilePath file_path = temp_dir.path().AppendASCII("create_file_1");
{
+ // Don't create a File at all.
+ File file;
+ EXPECT_FALSE(file.IsValid());
+ EXPECT_EQ(base::File::FILE_ERROR_FAILED, file.error_details());
+
+ File file2(base::File::FILE_ERROR_TOO_MANY_OPENED);
+ EXPECT_FALSE(file2.IsValid());
+ EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, file2.error_details());
+ }
+
+ {
// Open a file that doesn't exist.
File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
EXPECT_FALSE(file.IsValid());
diff --git a/base/memory/discardable_memory_allocator_android.cc b/base/memory/discardable_memory_allocator_android.cc
index 1588317ef6..077a441ac9 100644
--- a/base/memory/discardable_memory_allocator_android.cc
+++ b/base/memory/discardable_memory_allocator_android.cc
@@ -102,22 +102,16 @@ bool CloseAshmemRegion(int fd, size_t size, void* address) {
return close(fd) == 0;
}
-DiscardableMemoryLockStatus LockAshmemRegion(int fd,
- size_t off,
- size_t size,
- const void* address) {
+DiscardableMemoryLockStatus LockAshmemRegion(int fd, size_t off, size_t size) {
const int result = ashmem_pin_region(fd, off, size);
- DCHECK_EQ(0, mprotect(address, size, PROT_READ | PROT_WRITE));
return result == ASHMEM_WAS_PURGED ? DISCARDABLE_MEMORY_LOCK_STATUS_PURGED
: DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS;
}
-bool UnlockAshmemRegion(int fd, size_t off, size_t size, const void* address) {
+bool UnlockAshmemRegion(int fd, size_t off, size_t size) {
const int failed = ashmem_unpin_region(fd, off, size);
if (failed)
DLOG(ERROR) << "Failed to unpin memory.";
- // This allows us to catch accesses to unlocked memory.
- DCHECK_EQ(0, mprotect(address, size, PROT_NONE));
return !failed;
}
@@ -150,13 +144,13 @@ class DiscardableMemoryAllocator::DiscardableAshmemChunk
virtual DiscardableMemoryLockStatus Lock() OVERRIDE {
DCHECK(!locked_);
locked_ = true;
- return LockAshmemRegion(fd_, offset_, size_, address_);
+ return LockAshmemRegion(fd_, offset_, size_);
}
virtual void Unlock() OVERRIDE {
DCHECK(locked_);
locked_ = false;
- UnlockAshmemRegion(fd_, offset_, size_, address_);
+ UnlockAshmemRegion(fd_, offset_, size_);
}
virtual void* Memory() const OVERRIDE {
@@ -335,7 +329,7 @@ class DiscardableMemoryAllocator::AshmemRegion {
const size_t offset =
static_cast<char*>(reused_chunk.start) - static_cast<char*>(base_);
- LockAshmemRegion(fd_, offset, reused_chunk_size, reused_chunk.start);
+ LockAshmemRegion(fd_, offset, reused_chunk_size);
scoped_ptr<DiscardableMemory> memory(
new DiscardableAshmemChunk(this, fd_, reused_chunk.start, offset,
reused_chunk_size));
@@ -481,7 +475,7 @@ class DiscardableMemoryAllocator::AshmemRegion {
DiscardableMemoryAllocator::DiscardableAshmemChunk::~DiscardableAshmemChunk() {
if (locked_)
- UnlockAshmemRegion(fd_, offset_, size_, address_);
+ UnlockAshmemRegion(fd_, offset_, size_);
ashmem_region_->OnChunkDeletion(address_, size_);
}
diff --git a/base/memory/discardable_memory_emulated.cc b/base/memory/discardable_memory_emulated.cc
index be756d6fc9..82f887f55d 100644
--- a/base/memory/discardable_memory_emulated.cc
+++ b/base/memory/discardable_memory_emulated.cc
@@ -5,13 +5,13 @@
#include "base/memory/discardable_memory_emulated.h"
#include "base/lazy_instance.h"
-#include "base/memory/discardable_memory_provider.h"
+#include "base/memory/discardable_memory_manager.h"
namespace base {
namespace {
-base::LazyInstance<internal::DiscardableMemoryProvider>::Leaky g_provider =
+base::LazyInstance<internal::DiscardableMemoryManager>::Leaky g_manager =
LAZY_INSTANCE_INITIALIZER;
} // namespace
@@ -20,28 +20,28 @@ namespace internal {
DiscardableMemoryEmulated::DiscardableMemoryEmulated(size_t size)
: is_locked_(false) {
- g_provider.Pointer()->Register(this, size);
+ g_manager.Pointer()->Register(this, size);
}
DiscardableMemoryEmulated::~DiscardableMemoryEmulated() {
if (is_locked_)
Unlock();
- g_provider.Pointer()->Unregister(this);
+ g_manager.Pointer()->Unregister(this);
}
// static
void DiscardableMemoryEmulated::RegisterMemoryPressureListeners() {
- g_provider.Pointer()->RegisterMemoryPressureListener();
+ g_manager.Pointer()->RegisterMemoryPressureListener();
}
// static
void DiscardableMemoryEmulated::UnregisterMemoryPressureListeners() {
- g_provider.Pointer()->UnregisterMemoryPressureListener();
+ g_manager.Pointer()->UnregisterMemoryPressureListener();
}
// static
void DiscardableMemoryEmulated::PurgeForTesting() {
- g_provider.Pointer()->PurgeAll();
+ g_manager.Pointer()->PurgeAll();
}
bool DiscardableMemoryEmulated::Initialize() {
@@ -52,7 +52,7 @@ DiscardableMemoryLockStatus DiscardableMemoryEmulated::Lock() {
DCHECK(!is_locked_);
bool purged = false;
- memory_ = g_provider.Pointer()->Acquire(this, &purged);
+ memory_ = g_manager.Pointer()->Acquire(this, &purged);
if (!memory_)
return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
@@ -63,7 +63,7 @@ DiscardableMemoryLockStatus DiscardableMemoryEmulated::Lock() {
void DiscardableMemoryEmulated::Unlock() {
DCHECK(is_locked_);
- g_provider.Pointer()->Release(this, memory_.Pass());
+ g_manager.Pointer()->Release(this, memory_.Pass());
is_locked_ = false;
}
diff --git a/base/memory/discardable_memory_provider.cc b/base/memory/discardable_memory_manager.cc
index 5d43b4487e..c1b9f36906 100644
--- a/base/memory/discardable_memory_provider.cc
+++ b/base/memory/discardable_memory_manager.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/discardable_memory_provider.h"
+#include "base/memory/discardable_memory_manager.h"
#include "base/bind.h"
#include "base/containers/hash_tables.h"
@@ -24,7 +24,7 @@ static const size_t kDefaultBytesToKeepUnderModeratePressure =
} // namespace
-DiscardableMemoryProvider::DiscardableMemoryProvider()
+DiscardableMemoryManager::DiscardableMemoryManager()
: allocations_(AllocationMap::NO_AUTO_EVICT),
bytes_allocated_(0),
discardable_memory_limit_(kDefaultDiscardableMemoryLimit),
@@ -32,40 +32,40 @@ DiscardableMemoryProvider::DiscardableMemoryProvider()
kDefaultBytesToKeepUnderModeratePressure) {
}
-DiscardableMemoryProvider::~DiscardableMemoryProvider() {
+DiscardableMemoryManager::~DiscardableMemoryManager() {
DCHECK(allocations_.empty());
DCHECK_EQ(0u, bytes_allocated_);
}
-void DiscardableMemoryProvider::RegisterMemoryPressureListener() {
+void DiscardableMemoryManager::RegisterMemoryPressureListener() {
AutoLock lock(lock_);
DCHECK(base::MessageLoop::current());
DCHECK(!memory_pressure_listener_);
memory_pressure_listener_.reset(
new MemoryPressureListener(
- base::Bind(&DiscardableMemoryProvider::OnMemoryPressure,
+ base::Bind(&DiscardableMemoryManager::OnMemoryPressure,
Unretained(this))));
}
-void DiscardableMemoryProvider::UnregisterMemoryPressureListener() {
+void DiscardableMemoryManager::UnregisterMemoryPressureListener() {
AutoLock lock(lock_);
DCHECK(memory_pressure_listener_);
memory_pressure_listener_.reset();
}
-void DiscardableMemoryProvider::SetDiscardableMemoryLimit(size_t bytes) {
+void DiscardableMemoryManager::SetDiscardableMemoryLimit(size_t bytes) {
AutoLock lock(lock_);
discardable_memory_limit_ = bytes;
EnforcePolicyWithLockAcquired();
}
-void DiscardableMemoryProvider::SetBytesToKeepUnderModeratePressure(
+void DiscardableMemoryManager::SetBytesToKeepUnderModeratePressure(
size_t bytes) {
AutoLock lock(lock_);
bytes_to_keep_under_moderate_pressure_ = bytes;
}
-void DiscardableMemoryProvider::Register(
+void DiscardableMemoryManager::Register(
const DiscardableMemory* discardable, size_t bytes) {
AutoLock lock(lock_);
// A registered memory listener is currently required. This DCHECK can be
@@ -77,7 +77,7 @@ void DiscardableMemoryProvider::Register(
allocations_.Put(discardable, Allocation(bytes));
}
-void DiscardableMemoryProvider::Unregister(
+void DiscardableMemoryManager::Unregister(
const DiscardableMemory* discardable) {
AutoLock lock(lock_);
AllocationMap::iterator it = allocations_.Peek(discardable);
@@ -93,7 +93,7 @@ void DiscardableMemoryProvider::Unregister(
allocations_.Erase(it);
}
-scoped_ptr<uint8, FreeDeleter> DiscardableMemoryProvider::Acquire(
+scoped_ptr<uint8, FreeDeleter> DiscardableMemoryManager::Acquire(
const DiscardableMemory* discardable,
bool* purged) {
AutoLock lock(lock_);
@@ -134,7 +134,7 @@ scoped_ptr<uint8, FreeDeleter> DiscardableMemoryProvider::Acquire(
return memory.Pass();
}
-void DiscardableMemoryProvider::Release(
+void DiscardableMemoryManager::Release(
const DiscardableMemory* discardable,
scoped_ptr<uint8, FreeDeleter> memory) {
AutoLock lock(lock_);
@@ -149,31 +149,31 @@ void DiscardableMemoryProvider::Release(
EnforcePolicyWithLockAcquired();
}
-void DiscardableMemoryProvider::PurgeAll() {
+void DiscardableMemoryManager::PurgeAll() {
AutoLock lock(lock_);
PurgeLRUWithLockAcquiredUntilUsageIsWithin(0);
}
-bool DiscardableMemoryProvider::IsRegisteredForTest(
+bool DiscardableMemoryManager::IsRegisteredForTest(
const DiscardableMemory* discardable) const {
AutoLock lock(lock_);
AllocationMap::const_iterator it = allocations_.Peek(discardable);
return it != allocations_.end();
}
-bool DiscardableMemoryProvider::CanBePurgedForTest(
+bool DiscardableMemoryManager::CanBePurgedForTest(
const DiscardableMemory* discardable) const {
AutoLock lock(lock_);
AllocationMap::const_iterator it = allocations_.Peek(discardable);
return it != allocations_.end() && it->second.memory;
}
-size_t DiscardableMemoryProvider::GetBytesAllocatedForTest() const {
+size_t DiscardableMemoryManager::GetBytesAllocatedForTest() const {
AutoLock lock(lock_);
return bytes_allocated_;
}
-void DiscardableMemoryProvider::OnMemoryPressure(
+void DiscardableMemoryManager::OnMemoryPressure(
MemoryPressureListener::MemoryPressureLevel pressure_level) {
switch (pressure_level) {
case MemoryPressureListener::MEMORY_PRESSURE_MODERATE:
@@ -187,18 +187,18 @@ void DiscardableMemoryProvider::OnMemoryPressure(
NOTREACHED();
}
-void DiscardableMemoryProvider::Purge() {
+void DiscardableMemoryManager::Purge() {
AutoLock lock(lock_);
PurgeLRUWithLockAcquiredUntilUsageIsWithin(
bytes_to_keep_under_moderate_pressure_);
}
-void DiscardableMemoryProvider::PurgeLRUWithLockAcquiredUntilUsageIsWithin(
+void DiscardableMemoryManager::PurgeLRUWithLockAcquiredUntilUsageIsWithin(
size_t limit) {
TRACE_EVENT1(
"base",
- "DiscardableMemoryProvider::PurgeLRUWithLockAcquiredUntilUsageIsWithin",
+ "DiscardableMemoryManager::PurgeLRUWithLockAcquiredUntilUsageIsWithin",
"limit", limit);
lock_.AssertAcquired();
@@ -219,7 +219,7 @@ void DiscardableMemoryProvider::PurgeLRUWithLockAcquiredUntilUsageIsWithin(
}
}
-void DiscardableMemoryProvider::EnforcePolicyWithLockAcquired() {
+void DiscardableMemoryManager::EnforcePolicyWithLockAcquired() {
PurgeLRUWithLockAcquiredUntilUsageIsWithin(discardable_memory_limit_);
}
diff --git a/base/memory/discardable_memory_provider.h b/base/memory/discardable_memory_manager.h
index 8ecc9712d3..2b72c51edb 100644
--- a/base/memory/discardable_memory_provider.h
+++ b/base/memory/discardable_memory_manager.h
@@ -1,9 +1,9 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
-#define BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
#include "base/base_export.h"
#include "base/containers/hash_tables.h"
@@ -29,22 +29,22 @@ struct hash<const base::DiscardableMemory*> {
namespace base {
namespace internal {
-// The DiscardableMemoryProvider manages a collection of emulated
+// The DiscardableMemoryManager manages a collection of emulated
// DiscardableMemory instances. It is used on platforms that do not support
// discardable memory natively. It keeps track of all DiscardableMemory
// instances (in case they need to be purged), and the total amount of
// allocated memory (in case this forces a purge).
//
-// When notified of memory pressure, the provider either purges the LRU
+// When notified of memory pressure, the manager either purges the LRU
// memory -- if the pressure is moderate -- or all discardable memory
// if the pressure is critical.
//
// NB - this class is an implementation detail. It has been exposed for testing
// purposes. You should not need to use this class directly.
-class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
+class BASE_EXPORT_PRIVATE DiscardableMemoryManager {
public:
- DiscardableMemoryProvider();
- ~DiscardableMemoryProvider();
+ DiscardableMemoryManager();
+ ~DiscardableMemoryManager();
// Call this to register memory pressure listener. Must be called on a
// thread with a MessageLoop current.
@@ -61,10 +61,10 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
// Sets the amount of memory to keep when we're under moderate pressure.
void SetBytesToKeepUnderModeratePressure(size_t bytes);
- // Adds the given discardable memory to the provider's collection.
+ // Adds the given discardable memory to the manager's collection.
void Register(const DiscardableMemory* discardable, size_t bytes);
- // Removes the given discardable memory from the provider's collection.
+ // Removes the given discardable memory from the manager's collection.
void Unregister(const DiscardableMemory* discardable);
// Returns NULL if an error occurred. Otherwise, returns the backing buffer
@@ -74,14 +74,14 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
const DiscardableMemory* discardable, bool* purged);
// Release a previously acquired backing buffer. This gives the buffer back
- // to the provider where it can be purged if necessary.
+ // to the manager where it can be purged if necessary.
void Release(const DiscardableMemory* discardable,
scoped_ptr<uint8, FreeDeleter> memory);
// Purges all discardable memory.
void PurgeAll();
- // Returns true if discardable memory has been added to the provider's
+ // Returns true if discardable memory has been added to the manager's
// collection. This should only be used by tests.
bool IsRegisteredForTest(const DiscardableMemory* discardable) const;
@@ -141,10 +141,10 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
// pressure.
scoped_ptr<MemoryPressureListener> memory_pressure_listener_;
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryProvider);
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryManager);
};
} // namespace internal
} // namespace base
-#endif // BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
diff --git a/base/memory/discardable_memory_provider_unittest.cc b/base/memory/discardable_memory_manager_unittest.cc
index 352f5243af..95e7c13ef8 100644
--- a/base/memory/discardable_memory_provider_unittest.cc
+++ b/base/memory/discardable_memory_manager_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/discardable_memory_provider.h"
+#include "base/memory/discardable_memory_manager.h"
#include "base/bind.h"
#include "base/memory/discardable_memory.h"
@@ -13,21 +13,21 @@
namespace base {
-class DiscardableMemoryProviderTestBase {
+class DiscardableMemoryManagerTestBase {
public:
class TestDiscardableMemory : public DiscardableMemory {
public:
TestDiscardableMemory(
- internal::DiscardableMemoryProvider* provider, size_t size)
- : provider_(provider),
+ internal::DiscardableMemoryManager* manager, size_t size)
+ : manager_(manager),
is_locked_(false) {
- provider_->Register(this, size);
+ manager_->Register(this, size);
}
virtual ~TestDiscardableMemory() {
if (is_locked_)
Unlock();
- provider_->Unregister(this);
+ manager_->Unregister(this);
}
// Overridden from DiscardableMemory:
@@ -35,7 +35,7 @@ class DiscardableMemoryProviderTestBase {
DCHECK(!is_locked_);
bool purged = false;
- memory_ = provider_->Acquire(this, &purged);
+ memory_ = manager_->Acquire(this, &purged);
if (!memory_)
return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
@@ -45,7 +45,7 @@ class DiscardableMemoryProviderTestBase {
}
virtual void Unlock() OVERRIDE {
DCHECK(is_locked_);
- provider_->Release(this, memory_.Pass());
+ manager_->Release(this, memory_.Pass());
is_locked_ = false;
}
virtual void* Memory() const OVERRIDE {
@@ -54,29 +54,29 @@ class DiscardableMemoryProviderTestBase {
}
private:
- internal::DiscardableMemoryProvider* provider_;
+ internal::DiscardableMemoryManager* manager_;
scoped_ptr<uint8, FreeDeleter> memory_;
bool is_locked_;
DISALLOW_COPY_AND_ASSIGN(TestDiscardableMemory);
};
- DiscardableMemoryProviderTestBase()
- : provider_(new internal::DiscardableMemoryProvider) {
- provider_->RegisterMemoryPressureListener();
+ DiscardableMemoryManagerTestBase()
+ : manager_(new internal::DiscardableMemoryManager) {
+ manager_->RegisterMemoryPressureListener();
}
protected:
bool IsRegistered(const DiscardableMemory* discardable) {
- return provider_->IsRegisteredForTest(discardable);
+ return manager_->IsRegisteredForTest(discardable);
}
bool CanBePurged(const DiscardableMemory* discardable) {
- return provider_->CanBePurgedForTest(discardable);
+ return manager_->CanBePurgedForTest(discardable);
}
size_t BytesAllocated() const {
- return provider_->GetBytesAllocatedForTest();
+ return manager_->GetBytesAllocatedForTest();
}
void* Memory(const DiscardableMemory* discardable) const {
@@ -84,16 +84,16 @@ class DiscardableMemoryProviderTestBase {
}
void SetDiscardableMemoryLimit(size_t bytes) {
- provider_->SetDiscardableMemoryLimit(bytes);
+ manager_->SetDiscardableMemoryLimit(bytes);
}
void SetBytesToKeepUnderModeratePressure(size_t bytes) {
- provider_->SetBytesToKeepUnderModeratePressure(bytes);
+ manager_->SetBytesToKeepUnderModeratePressure(bytes);
}
scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size) {
scoped_ptr<TestDiscardableMemory> memory(
- new TestDiscardableMemory(provider_.get(), size));
+ new TestDiscardableMemory(manager_.get(), size));
if (memory->Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_PURGED)
return scoped_ptr<DiscardableMemory>();
return memory.PassAs<DiscardableMemory>();
@@ -101,17 +101,17 @@ class DiscardableMemoryProviderTestBase {
private:
MessageLoopForIO message_loop_;
- scoped_ptr<internal::DiscardableMemoryProvider> provider_;
+ scoped_ptr<internal::DiscardableMemoryManager> manager_;
};
-class DiscardableMemoryProviderTest
- : public DiscardableMemoryProviderTestBase,
+class DiscardableMemoryManagerTest
+ : public DiscardableMemoryManagerTestBase,
public testing::Test {
public:
- DiscardableMemoryProviderTest() {}
+ DiscardableMemoryManagerTest() {}
};
-TEST_F(DiscardableMemoryProviderTest, CreateLockedMemory) {
+TEST_F(DiscardableMemoryManagerTest, CreateLockedMemory) {
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_TRUE(IsRegistered(discardable.get()));
@@ -120,7 +120,7 @@ TEST_F(DiscardableMemoryProviderTest, CreateLockedMemory) {
EXPECT_FALSE(CanBePurged(discardable.get()));
}
-TEST_F(DiscardableMemoryProviderTest, CreateLockedMemoryZeroSize) {
+TEST_F(DiscardableMemoryManagerTest, CreateLockedMemoryZeroSize) {
size_t size = 0;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_FALSE(discardable);
@@ -128,7 +128,7 @@ TEST_F(DiscardableMemoryProviderTest, CreateLockedMemoryZeroSize) {
EXPECT_EQ(0u, BytesAllocated());
}
-TEST_F(DiscardableMemoryProviderTest, LockAfterUnlock) {
+TEST_F(DiscardableMemoryManagerTest, LockAfterUnlock) {
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_TRUE(IsRegistered(discardable.get()));
@@ -144,7 +144,7 @@ TEST_F(DiscardableMemoryProviderTest, LockAfterUnlock) {
EXPECT_FALSE(CanBePurged(discardable.get()));
}
-TEST_F(DiscardableMemoryProviderTest, LockAfterPurge) {
+TEST_F(DiscardableMemoryManagerTest, LockAfterPurge) {
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_TRUE(IsRegistered(discardable.get()));
@@ -167,7 +167,7 @@ TEST_F(DiscardableMemoryProviderTest, LockAfterPurge) {
EXPECT_FALSE(CanBePurged(discardable.get()));
}
-TEST_F(DiscardableMemoryProviderTest, LockAfterPurgeAndCannotReallocate) {
+TEST_F(DiscardableMemoryManagerTest, LockAfterPurgeAndCannotReallocate) {
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_TRUE(IsRegistered(discardable.get()));
@@ -187,7 +187,7 @@ TEST_F(DiscardableMemoryProviderTest, LockAfterPurgeAndCannotReallocate) {
EXPECT_FALSE(CanBePurged(discardable.get()));
}
-TEST_F(DiscardableMemoryProviderTest, Overflow) {
+TEST_F(DiscardableMemoryManagerTest, Overflow) {
{
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
@@ -218,11 +218,11 @@ class PermutationTestData {
unsigned ordering_[3];
};
-class DiscardableMemoryProviderPermutationTest
- : public DiscardableMemoryProviderTestBase,
+class DiscardableMemoryManagerPermutationTest
+ : public DiscardableMemoryManagerTestBase,
public testing::TestWithParam<PermutationTestData> {
public:
- DiscardableMemoryProviderPermutationTest() {}
+ DiscardableMemoryManagerPermutationTest() {}
protected:
// Use discardable memory in order specified by ordering parameter.
@@ -253,7 +253,7 @@ class DiscardableMemoryProviderPermutationTest
// Verify that memory was discarded in the correct order after applying
// memory pressure.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedModeratePressure) {
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedModeratePressure) {
CreateAndUseDiscardableMemory();
SetBytesToKeepUnderModeratePressure(1024);
@@ -271,7 +271,7 @@ TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedModeratePressure) {
// Verify that memory was discarded in the correct order after changing
// memory limit.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedExceedLimit) {
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedExceedLimit) {
CreateAndUseDiscardableMemory();
SetBytesToKeepUnderModeratePressure(1024);
@@ -285,7 +285,7 @@ TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedExceedLimit) {
// Verify that no more memory than necessary was discarded after changing
// memory limit.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedAmount) {
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedAmount) {
SetBytesToKeepUnderModeratePressure(2048);
SetDiscardableMemoryLimit(4096);
@@ -299,7 +299,7 @@ TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedAmount) {
EXPECT_NE(static_cast<void*>(NULL), Memory(discardable(0)));
}
-TEST_P(DiscardableMemoryProviderPermutationTest,
+TEST_P(DiscardableMemoryManagerPermutationTest,
CriticalPressureFreesAllUnlocked) {
CreateAndUseDiscardableMemory();
@@ -315,8 +315,8 @@ TEST_P(DiscardableMemoryProviderPermutationTest,
}
}
-INSTANTIATE_TEST_CASE_P(DiscardableMemoryProviderPermutationTests,
- DiscardableMemoryProviderPermutationTest,
+INSTANTIATE_TEST_CASE_P(DiscardableMemoryManagerPermutationTests,
+ DiscardableMemoryManagerPermutationTest,
::testing::Values(PermutationTestData(0, 1, 2),
PermutationTestData(0, 2, 1),
PermutationTestData(1, 0, 2),
@@ -324,7 +324,7 @@ INSTANTIATE_TEST_CASE_P(DiscardableMemoryProviderPermutationTests,
PermutationTestData(2, 0, 1),
PermutationTestData(2, 1, 0)));
-TEST_F(DiscardableMemoryProviderTest, NormalDestruction) {
+TEST_F(DiscardableMemoryManagerTest, NormalDestruction) {
{
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
@@ -334,7 +334,7 @@ TEST_F(DiscardableMemoryProviderTest, NormalDestruction) {
EXPECT_EQ(0u, BytesAllocated());
}
-TEST_F(DiscardableMemoryProviderTest, DestructionWhileLocked) {
+TEST_F(DiscardableMemoryManagerTest, DestructionWhileLocked) {
{
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
@@ -349,7 +349,7 @@ TEST_F(DiscardableMemoryProviderTest, DestructionWhileLocked) {
#if !defined(NDEBUG) && !defined(OS_ANDROID) && !defined(OS_IOS)
// Death tests are not supported with Android APKs.
-TEST_F(DiscardableMemoryProviderTest, UnlockedMemoryAccessCrashesInDebugMode) {
+TEST_F(DiscardableMemoryManagerTest, UnlockedMemoryAccessCrashesInDebugMode) {
size_t size = 1024;
const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
EXPECT_TRUE(IsRegistered(discardable.get()));
@@ -363,10 +363,10 @@ TEST_F(DiscardableMemoryProviderTest, UnlockedMemoryAccessCrashesInDebugMode) {
}
#endif
-class ThreadedDiscardableMemoryProviderTest
- : public DiscardableMemoryProviderTest {
+class ThreadedDiscardableMemoryManagerTest
+ : public DiscardableMemoryManagerTest {
public:
- ThreadedDiscardableMemoryProviderTest()
+ ThreadedDiscardableMemoryManagerTest()
: memory_usage_thread_("memory_usage_thread"),
thread_sync_(true, false) {
}
@@ -395,14 +395,14 @@ class ThreadedDiscardableMemoryProviderTest
WaitableEvent thread_sync_;
};
-TEST_F(ThreadedDiscardableMemoryProviderTest, UseMemoryOnThread) {
+TEST_F(ThreadedDiscardableMemoryManagerTest, UseMemoryOnThread) {
memory_usage_thread_.message_loop()->PostTask(
FROM_HERE,
- Bind(&ThreadedDiscardableMemoryProviderTest::UseMemoryHelper,
+ Bind(&ThreadedDiscardableMemoryManagerTest::UseMemoryHelper,
Unretained(this)));
memory_usage_thread_.message_loop()->PostTask(
FROM_HERE,
- Bind(&ThreadedDiscardableMemoryProviderTest::SignalHelper,
+ Bind(&ThreadedDiscardableMemoryManagerTest::SignalHelper,
Unretained(this)));
thread_sync_.Wait();
}
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index f2ba702d99..87b923e79e 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -261,10 +261,12 @@ class BASE_EXPORT SharedMemory {
private:
#if defined(OS_POSIX) && !defined(OS_NACL)
+#if !defined(OS_ANDROID)
bool PrepareMapFile(ScopedFILE fp, ScopedFD readonly);
bool FilePathForMemoryName(const std::string& mem_name, FilePath* path);
- void LockOrUnlockCommon(int function);
#endif
+ void LockOrUnlockCommon(int function);
+#endif // defined(OS_POSIX) && !defined(OS_NACL)
enum ShareMode {
SHARE_READONLY,
SHARE_CURRENT_MODE,
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index 5fcbbfe072..2afe450d93 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -270,7 +270,6 @@ bool SharedMemory::Open(const std::string& name, bool read_only) {
}
return PrepareMapFile(fp.Pass(), readonly_fd.Pass());
}
-
#endif // !defined(OS_ANDROID)
bool SharedMemory::MapAt(off_t offset, size_t bytes) {
@@ -385,7 +384,6 @@ bool SharedMemory::PrepareMapFile(ScopedFILE fp, ScopedFD readonly_fd) {
return true;
}
-#endif
// For the given shmem named |mem_name|, return a filename to mmap()
// (and possibly create). Modifies |filename|. Return false on
@@ -413,6 +411,7 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
*path = temp_dir.AppendASCII(name_base + ".shmem." + mem_name);
return true;
}
+#endif // !defined(OS_ANDROID)
void SharedMemory::LockOrUnlockCommon(int function) {
DCHECK_GE(mapped_file_, 0);
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc
index 4637165f40..7ccee7374b 100644
--- a/base/message_loop/message_loop_unittest.cc
+++ b/base/message_loop/message_loop_unittest.cc
@@ -53,36 +53,11 @@ class Foo : public RefCounted<Foo> {
Foo() : test_count_(0) {
}
- void Test0() {
- ++test_count_;
- }
-
void Test1ConstRef(const std::string& a) {
++test_count_;
result_.append(a);
}
- void Test1Ptr(std::string* a) {
- ++test_count_;
- result_.append(*a);
- }
-
- void Test1Int(int a) {
- test_count_ += a;
- }
-
- void Test2Ptr(std::string* a, std::string* b) {
- ++test_count_;
- result_.append(*a);
- result_.append(*b);
- }
-
- void Test2Mixed(const std::string& a, std::string* b) {
- ++test_count_;
- result_.append(a);
- result_.append(*b);
- }
-
int test_count() const { return test_count_; }
const std::string& result() const { return result_; }
diff --git a/base/metrics/user_metrics.h b/base/metrics/user_metrics.h
index 10e7d3c01f..57356c303a 100644
--- a/base/metrics/user_metrics.h
+++ b/base/metrics/user_metrics.h
@@ -30,9 +30,10 @@ namespace base {
// name from the hash later on.
//
// Once a new recorded action is added, run
-// tools/metrics/actions/extract_actions.py --hash
-// to generate a new mapping of [action hashes -> metric names] and send it
-// out for review to be updated.
+// tools/metrics/actions/extract_actions.py
+// to add the metric to actions.xml, then update the <owner>s and <description>
+// sections. Make sure to include the actions.xml file when you upload your code
+// for review!
//
// For more complicated situations (like when there are many different
// possible actions), see RecordComputedAction.
diff --git a/base/native_library.h b/base/native_library.h
index d7513d0b05..1e764da89a 100644
--- a/base/native_library.h
+++ b/base/native_library.h
@@ -8,8 +8,11 @@
// This file defines a cross-platform "NativeLibrary" type which represents
// a loadable module.
+#include <string>
+
#include "base/base_export.h"
#include "base/compiler_specific.h"
+#include "base/strings/string16.h"
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -18,8 +21,6 @@
#import <CoreFoundation/CoreFoundation.h>
#endif // OS_*
-#include "base/strings/string16.h"
-
namespace base {
class FilePath;
@@ -50,11 +51,26 @@ typedef NativeLibraryStruct* NativeLibrary;
typedef void* NativeLibrary;
#endif // OS_*
+struct BASE_EXPORT NativeLibraryLoadError {
+#if defined(OS_WIN)
+ NativeLibraryLoadError() : code(0) {}
+#endif // OS_WIN
+
+ // Returns a string representation of the load error.
+ std::string ToString() const;
+
+#if defined(OS_WIN)
+ DWORD code;
+#else
+ std::string message;
+#endif // OS_WIN
+};
+
// Loads a native library from disk. Release it with UnloadNativeLibrary when
// you're done. Returns NULL on failure.
-// If |error| is not NULL, it may be filled in with an error message on error.
+// If |error| is not NULL, it may be filled in on load error.
BASE_EXPORT NativeLibrary LoadNativeLibrary(const FilePath& library_path,
- std::string* error);
+ NativeLibraryLoadError* error);
#if defined(OS_WIN)
// Loads a native library from disk. Release it with UnloadNativeLibrary when
diff --git a/base/native_library_mac.mm b/base/native_library_mac.mm
index 6544fcaed9..6696454c6e 100644
--- a/base/native_library_mac.mm
+++ b/base/native_library_mac.mm
@@ -41,9 +41,14 @@ static NativeLibraryObjCStatus GetObjCStatusForImage(
return section == NULL ? OBJC_NOT_PRESENT : OBJC_PRESENT;
}
+std::string NativeLibraryLoadError::ToString() const {
+ return message;
+}
+
// static
+// TODO(xhwang): Fill |error|. See http://crbug.com/353771
NativeLibrary LoadNativeLibrary(const base::FilePath& library_path,
- std::string* error) {
+ NativeLibraryLoadError* /* error */) {
// dlopen() etc. open the file off disk.
if (library_path.Extension() == "dylib" || !DirectoryExists(library_path)) {
void* dylib = dlopen(library_path.value().c_str(), RTLD_LAZY);
diff --git a/base/native_library_posix.cc b/base/native_library_posix.cc
index dfa20fc01c..3179a93833 100644
--- a/base/native_library_posix.cc
+++ b/base/native_library_posix.cc
@@ -13,9 +13,13 @@
namespace base {
+std::string NativeLibraryLoadError::ToString() const {
+ return message;
+}
+
// static
NativeLibrary LoadNativeLibrary(const FilePath& library_path,
- std::string* error) {
+ NativeLibraryLoadError* error) {
// dlopen() opens the file off disk.
base::ThreadRestrictions::AssertIOAllowed();
@@ -25,7 +29,7 @@ NativeLibrary LoadNativeLibrary(const FilePath& library_path,
// and http://crbug.com/40794.
void* dl = dlopen(library_path.value().c_str(), RTLD_LAZY);
if (!dl && error)
- *error = dlerror();
+ error->message = dlerror();
return dl;
}
diff --git a/base/native_library_win.cc b/base/native_library_win.cc
index bcea485a1d..43528b977e 100644
--- a/base/native_library_win.cc
+++ b/base/native_library_win.cc
@@ -15,9 +15,11 @@ namespace base {
typedef HMODULE (WINAPI* LoadLibraryFunction)(const wchar_t* file_name);
+namespace {
+
NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
LoadLibraryFunction load_library_api,
- std::string* error) {
+ NativeLibraryLoadError* error) {
// LoadLibrary() opens the file off disk.
ThreadRestrictions::AssertIOAllowed();
@@ -36,8 +38,7 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
HMODULE module = (*load_library_api)(library_path.value().c_str());
if (!module && error) {
// GetLastError() needs to be called immediately after |load_library_api|.
- DWORD last_error = GetLastError();
- *error = StringPrintf("%u", last_error);
+ error->code = GetLastError();
}
if (restore_directory)
@@ -46,9 +47,15 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
return module;
}
+} // namespace
+
+std::string NativeLibraryLoadError::ToString() const {
+ return StringPrintf("%u", code);
+}
+
// static
NativeLibrary LoadNativeLibrary(const FilePath& library_path,
- std::string* error) {
+ NativeLibraryLoadError* error) {
return LoadNativeLibraryHelper(library_path, LoadLibraryW, error);
}
diff --git a/base/prefs/overlay_user_pref_store_unittest.cc b/base/prefs/overlay_user_pref_store_unittest.cc
index c4e980bbae..18e9a5c991 100644
--- a/base/prefs/overlay_user_pref_store_unittest.cc
+++ b/base/prefs/overlay_user_pref_store_unittest.cc
@@ -48,47 +48,39 @@ TEST_F(OverlayUserPrefStoreTest, Observer) {
overlay_->AddObserver(&obs);
// Check that underlay first value is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(1);
underlay_->SetValue(overlay_key, new FundamentalValue(42));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(overlay_key);
// Check that underlay overwriting is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(1);
underlay_->SetValue(overlay_key, new FundamentalValue(43));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(overlay_key);
// Check that overwriting change in overlay is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(1);
overlay_->SetValue(overlay_key, new FundamentalValue(44));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(overlay_key);
// Check that hidden underlay change is not reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(0);
underlay_->SetValue(overlay_key, new FundamentalValue(45));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
// Check that overlay remove is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(1);
overlay_->RemoveValue(overlay_key);
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(overlay_key);
// Check that underlay remove is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(1);
underlay_->RemoveValue(overlay_key);
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(overlay_key);
// Check respecting of silence.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(0);
overlay_->SetValueSilently(overlay_key, new FundamentalValue(46));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
overlay_->RemoveObserver(&obs);
// Check successful unsubscription.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(overlay_key))).Times(0);
underlay_->SetValue(overlay_key, new FundamentalValue(47));
overlay_->SetValue(overlay_key, new FundamentalValue(48));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
}
TEST_F(OverlayUserPrefStoreTest, GetAndSet) {
@@ -154,23 +146,20 @@ TEST_F(OverlayUserPrefStoreTest, GlobalPref) {
const Value* value = NULL;
// Check that underlay first value is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(1);
underlay_->SetValue(regular_key, new FundamentalValue(42));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(regular_key);
// Check that underlay overwriting is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(1);
underlay_->SetValue(regular_key, new FundamentalValue(43));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(regular_key);
// Check that we get this value from the overlay
EXPECT_TRUE(overlay_->GetValue(regular_key, &value));
EXPECT_TRUE(base::FundamentalValue(43).Equals(value));
// Check that overwriting change in overlay is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(1);
overlay_->SetValue(regular_key, new FundamentalValue(44));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(regular_key);
// Check that we get this value from the overlay and the underlay.
EXPECT_TRUE(overlay_->GetValue(regular_key, &value));
@@ -179,26 +168,23 @@ TEST_F(OverlayUserPrefStoreTest, GlobalPref) {
EXPECT_TRUE(base::FundamentalValue(44).Equals(value));
// Check that overlay remove is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(1);
overlay_->RemoveValue(regular_key);
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(regular_key);
// Check that value was removed from overlay and underlay
EXPECT_FALSE(overlay_->GetValue(regular_key, &value));
EXPECT_FALSE(underlay_->GetValue(regular_key, &value));
// Check respecting of silence.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(0);
overlay_->SetValueSilently(regular_key, new FundamentalValue(46));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
overlay_->RemoveObserver(&obs);
// Check successful unsubscription.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(regular_key))).Times(0);
underlay_->SetValue(regular_key, new FundamentalValue(47));
overlay_->SetValue(regular_key, new FundamentalValue(48));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
}
// Check that names mapping works correctly.
@@ -210,14 +196,12 @@ TEST_F(OverlayUserPrefStoreTest, NamesMapping) {
// Check that if there is no override in the overlay, changing underlay value
// is reported as changing an overlay value.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(1);
underlay_->SetValue(mapped_underlay_key, new FundamentalValue(42));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(mapped_overlay_key);
// Check that underlay overwriting is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(1);
underlay_->SetValue(mapped_underlay_key, new FundamentalValue(43));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(mapped_overlay_key);
// Check that we get this value from the overlay with both keys
EXPECT_TRUE(overlay_->GetValue(mapped_overlay_key, &value));
@@ -227,9 +211,8 @@ TEST_F(OverlayUserPrefStoreTest, NamesMapping) {
EXPECT_TRUE(base::FundamentalValue(43).Equals(value));
// Check that overwriting change in overlay is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(1);
overlay_->SetValue(mapped_overlay_key, new FundamentalValue(44));
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(mapped_overlay_key);
// Check that we get an overriden value from overlay, while reading the
// value from underlay still holds an old value.
@@ -241,38 +224,31 @@ TEST_F(OverlayUserPrefStoreTest, NamesMapping) {
EXPECT_TRUE(base::FundamentalValue(43).Equals(value));
// Check that hidden underlay change is not reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(0);
underlay_->SetValue(mapped_underlay_key, new FundamentalValue(45));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
// Check that overlay remove is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(1);
overlay_->RemoveValue(mapped_overlay_key);
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(mapped_overlay_key);
// Check that underlay remove is reported.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(1);
underlay_->RemoveValue(mapped_underlay_key);
- Mock::VerifyAndClearExpectations(&obs);
+ obs.VerifyAndResetChangedKey(mapped_overlay_key);
// Check that value was removed.
EXPECT_FALSE(overlay_->GetValue(mapped_overlay_key, &value));
EXPECT_FALSE(overlay_->GetValue(mapped_underlay_key, &value));
// Check respecting of silence.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(0);
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_underlay_key))).Times(0);
overlay_->SetValueSilently(mapped_overlay_key, new FundamentalValue(46));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
overlay_->RemoveObserver(&obs);
// Check successful unsubscription.
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_overlay_key))).Times(0);
- EXPECT_CALL(obs, OnPrefValueChanged(StrEq(mapped_underlay_key))).Times(0);
underlay_->SetValue(mapped_underlay_key, new FundamentalValue(47));
overlay_->SetValue(mapped_overlay_key, new FundamentalValue(48));
- Mock::VerifyAndClearExpectations(&obs);
+ EXPECT_TRUE(obs.changed_keys.empty());
}
} // namespace base
diff --git a/base/prefs/pref_notifier_impl_unittest.cc b/base/prefs/pref_notifier_impl_unittest.cc
index 29ea322e7e..8482c0289c 100644
--- a/base/prefs/pref_notifier_impl_unittest.cc
+++ b/base/prefs/pref_notifier_impl_unittest.cc
@@ -80,13 +80,6 @@ class PrefObserverMock : public PrefObserver {
virtual ~PrefObserverMock() {}
MOCK_METHOD2(OnPreferenceChanged, void(PrefService*, const std::string&));
-
- void Expect(PrefService* prefs,
- const std::string& pref_name,
- const base::Value* value) {
- EXPECT_CALL(*this, OnPreferenceChanged(prefs, pref_name))
- .With(PrefValueMatches(prefs, pref_name, value));
- }
};
// Test fixture class.
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 8a2c742109..a8e56d0b37 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -67,7 +67,9 @@ PrefService::~PrefService() {
}
void PrefService::InitFromStorage(bool async) {
- if (!async) {
+ if (user_pref_store_->IsInitializationComplete()) {
+ read_error_callback_.Run(user_pref_store_->GetReadError());
+ } else if (!async) {
read_error_callback_.Run(user_pref_store_->ReadPrefs());
} else {
// Guarantee that initialization happens after this function returned.
diff --git a/base/prefs/pref_store_observer_mock.cc b/base/prefs/pref_store_observer_mock.cc
index 0970e6310d..f1a31bb985 100644
--- a/base/prefs/pref_store_observer_mock.cc
+++ b/base/prefs/pref_store_observer_mock.cc
@@ -4,6 +4,26 @@
#include "base/prefs/pref_store_observer_mock.h"
-PrefStoreObserverMock::PrefStoreObserverMock() {}
+#include "testing/gtest/include/gtest/gtest.h"
+
+PrefStoreObserverMock::PrefStoreObserverMock()
+ : initialized(false), initialization_success(false) {}
PrefStoreObserverMock::~PrefStoreObserverMock() {}
+
+void PrefStoreObserverMock::VerifyAndResetChangedKey(
+ const std::string& expected) {
+ EXPECT_EQ(1u, changed_keys.size());
+ if (changed_keys.size() >= 1)
+ EXPECT_EQ(expected, changed_keys.front());
+ changed_keys.clear();
+}
+
+void PrefStoreObserverMock::OnPrefValueChanged(const std::string& key) {
+ changed_keys.push_back(key);
+}
+
+void PrefStoreObserverMock::OnInitializationCompleted(bool success) {
+ initialized = true;
+ initialization_success = success;
+}
diff --git a/base/prefs/pref_store_observer_mock.h b/base/prefs/pref_store_observer_mock.h
index 8252c3b359..594807f31e 100644
--- a/base/prefs/pref_store_observer_mock.h
+++ b/base/prefs/pref_store_observer_mock.h
@@ -5,18 +5,28 @@
#ifndef BASE_PREFS_PREF_STORE_OBSERVER_MOCK_H_
#define BASE_PREFS_PREF_STORE_OBSERVER_MOCK_H_
-#include "base/basictypes.h"
+#include <string>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/prefs/pref_store.h"
-#include "testing/gmock/include/gmock/gmock.h"
-// A gmock-ified implementation of PrefStore::Observer.
+// A mock implementation of PrefStore::Observer.
class PrefStoreObserverMock : public PrefStore::Observer {
public:
PrefStoreObserverMock();
virtual ~PrefStoreObserverMock();
- MOCK_METHOD1(OnPrefValueChanged, void(const std::string&));
- MOCK_METHOD1(OnInitializationCompleted, void(bool));
+ void VerifyAndResetChangedKey(const std::string& expected);
+
+ // PrefStore::Observer implementation
+ virtual void OnPrefValueChanged(const std::string& key) OVERRIDE;
+ virtual void OnInitializationCompleted(bool success) OVERRIDE;
+
+ std::vector<std::string> changed_keys;
+ bool initialized;
+ bool initialization_success; // Only valid if |initialized|.
private:
DISALLOW_COPY_AND_ASSIGN(PrefStoreObserverMock);
diff --git a/base/prefs/testing_pref_store.cc b/base/prefs/testing_pref_store.cc
index 2f429c9a1a..f20824e173 100644
--- a/base/prefs/testing_pref_store.cc
+++ b/base/prefs/testing_pref_store.cc
@@ -9,8 +9,12 @@
TestingPrefStore::TestingPrefStore()
: read_only_(true),
- init_complete_(false) {
-}
+ read_success_(true),
+ read_error_(PersistentPrefStore::PREF_READ_ERROR_NONE),
+ block_async_read_(false),
+ pending_async_read_(false),
+ init_complete_(false),
+ committed_(true) {}
bool TestingPrefStore::GetValue(const std::string& key,
const base::Value** value) const {
@@ -39,18 +43,23 @@ bool TestingPrefStore::IsInitializationComplete() const {
}
void TestingPrefStore::SetValue(const std::string& key, base::Value* value) {
- if (prefs_.SetValue(key, value))
+ if (prefs_.SetValue(key, value)) {
+ committed_ = false;
NotifyPrefValueChanged(key);
+ }
}
void TestingPrefStore::SetValueSilently(const std::string& key,
base::Value* value) {
- prefs_.SetValue(key, value);
+ if (prefs_.SetValue(key, value))
+ committed_ = false;
}
void TestingPrefStore::RemoveValue(const std::string& key) {
- if (prefs_.RemoveValue(key))
+ if (prefs_.RemoveValue(key)) {
+ committed_ = false;
NotifyPrefValueChanged(key);
+ }
}
bool TestingPrefStore::ReadOnly() const {
@@ -58,21 +67,26 @@ bool TestingPrefStore::ReadOnly() const {
}
PersistentPrefStore::PrefReadError TestingPrefStore::GetReadError() const {
- return PersistentPrefStore::PREF_READ_ERROR_NONE;
+ return read_error_;
}
PersistentPrefStore::PrefReadError TestingPrefStore::ReadPrefs() {
NotifyInitializationCompleted();
- return PersistentPrefStore::PREF_READ_ERROR_NONE;
+ return read_error_;
}
-void TestingPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate_raw) {
- scoped_ptr<ReadErrorDelegate> error_delegate(error_delegate_raw);
- NotifyInitializationCompleted();
+void TestingPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate) {
+ DCHECK(!pending_async_read_);
+ error_delegate_.reset(error_delegate);
+ if (block_async_read_)
+ pending_async_read_ = true;
+ else
+ NotifyInitializationCompleted();
}
+void TestingPrefStore::CommitPendingWrite() { committed_ = true; }
+
void TestingPrefStore::SetInitializationCompleted() {
- init_complete_ = true;
NotifyInitializationCompleted();
}
@@ -81,7 +95,12 @@ void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) {
}
void TestingPrefStore::NotifyInitializationCompleted() {
- FOR_EACH_OBSERVER(Observer, observers_, OnInitializationCompleted(true));
+ DCHECK(!init_complete_);
+ init_complete_ = true;
+ if (read_success_ && read_error_ != PREF_READ_ERROR_NONE && error_delegate_)
+ error_delegate_->OnError(read_error_);
+ FOR_EACH_OBSERVER(
+ Observer, observers_, OnInitializationCompleted(read_success_));
}
void TestingPrefStore::ReportValueChanged(const std::string& key) {
@@ -126,8 +145,26 @@ bool TestingPrefStore::GetBoolean(const std::string& key, bool* value) const {
return stored_value->GetAsBoolean(value);
}
+void TestingPrefStore::SetBlockAsyncRead(bool block_async_read) {
+ DCHECK(!init_complete_);
+ block_async_read_ = block_async_read;
+ if (pending_async_read_ && !block_async_read_)
+ NotifyInitializationCompleted();
+}
+
void TestingPrefStore::set_read_only(bool read_only) {
read_only_ = read_only;
}
+void TestingPrefStore::set_read_success(bool read_success) {
+ DCHECK(!init_complete_);
+ read_success_ = read_success;
+}
+
+void TestingPrefStore::set_read_error(
+ PersistentPrefStore::PrefReadError read_error) {
+ DCHECK(!init_complete_);
+ read_error_ = read_error;
+}
+
TestingPrefStore::~TestingPrefStore() {}
diff --git a/base/prefs/testing_pref_store.h b/base/prefs/testing_pref_store.h
index c6a2b8336f..785f935539 100644
--- a/base/prefs/testing_pref_store.h
+++ b/base/prefs/testing_pref_store.h
@@ -40,7 +40,7 @@ class TestingPrefStore : public PersistentPrefStore {
virtual PrefReadError GetReadError() const OVERRIDE;
virtual PersistentPrefStore::PrefReadError ReadPrefs() OVERRIDE;
virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) OVERRIDE;
- virtual void CommitPendingWrite() OVERRIDE {}
+ virtual void CommitPendingWrite() OVERRIDE;
// Marks the store as having completed initialization.
void SetInitializationCompleted();
@@ -58,9 +58,18 @@ class TestingPrefStore : public PersistentPrefStore {
bool GetInteger(const std::string& key, int* value) const;
bool GetBoolean(const std::string& key, bool* value) const;
+ // Determines whether ReadPrefsAsync completes immediately. Defaults to false
+ // (non-blocking). To block, invoke this with true (blocking) before the call
+ // to ReadPrefsAsync. To unblock, invoke again with false (non-blocking) after
+ // the call to ReadPrefsAsync.
+ void SetBlockAsyncRead(bool block_async_read);
+
// Getter and Setter methods for setting and getting the state of the
// |TestingPrefStore|.
virtual void set_read_only(bool read_only);
+ void set_read_success(bool read_success);
+ void set_read_error(PersistentPrefStore::PrefReadError read_error);
+ bool committed() { return committed_; }
protected:
virtual ~TestingPrefStore();
@@ -72,9 +81,26 @@ class TestingPrefStore : public PersistentPrefStore {
// Flag that indicates if the PrefStore is read-only
bool read_only_;
+ // The result to pass to PrefStore::Observer::OnInitializationCompleted
+ bool read_success_;
+
+ // The result to return from ReadPrefs or ReadPrefsAsync.
+ PersistentPrefStore::PrefReadError read_error_;
+
+ // Whether a call to ReadPrefsAsync should block.
+ bool block_async_read_;
+
+ // Whether there is a pending call to ReadPrefsAsync.
+ bool pending_async_read_;
+
// Whether initialization has been completed.
bool init_complete_;
+ // Whether the store contents have been committed to disk since the last
+ // mutation.
+ bool committed_;
+
+ scoped_ptr<ReadErrorDelegate> error_delegate_;
ObserverList<PrefStore::Observer, true> observers_;
DISALLOW_COPY_AND_ASSIGN(TestingPrefStore);
diff --git a/base/process/memory.cc b/base/process/memory.cc
new file mode 100644
index 0000000000..1dbc363070
--- /dev/null
+++ b/base/process/memory.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/process/memory.h"
+
+namespace base {
+
+// Defined in memory_mac.mm for Mac.
+#if !defined(OS_MACOSX)
+
+bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
+ const size_t alloc_size = num_items * size;
+
+ // Overflow check
+ if (size && ((alloc_size / size) != num_items)) {
+ *result = NULL;
+ return false;
+ }
+
+ if (!UncheckedMalloc(alloc_size, result))
+ return false;
+
+ memset(*result, 0, alloc_size);
+ return true;
+}
+
+#endif
+
+}
diff --git a/base/process/memory.h b/base/process/memory.h
index 8187032f8b..a73fbe1304 100644
--- a/base/process/memory.h
+++ b/base/process/memory.h
@@ -61,17 +61,27 @@ const int kMaxOomScore = 1000;
BASE_EXPORT bool AdjustOOMScore(ProcessId process, int score);
#endif
+// Special allocator functions for callers that want to check for OOM.
+// These will not abort if the allocation fails even if
+// EnableTerminationOnOutOfMemory has been called.
+// This can be useful for huge and/or unpredictable size memory allocations.
+// Please only use this if you really handle the case when the allocation
+// fails. Doing otherwise would risk security.
+// These functions may still crash on OOM when running under memory tools,
+// specifically ASan and other sanitizers.
+// Return value tells whether the allocation succeeded. If it fails |result| is
+// set to NULL, otherwise it holds the memory address.
+BASE_EXPORT WARN_UNUSED_RESULT bool UncheckedMalloc(size_t size,
+ void** result);
+BASE_EXPORT WARN_UNUSED_RESULT bool UncheckedCalloc(size_t num_items,
+ size_t size,
+ void** result);
+
+// TODO(b.kelemen): make Skia use the new interface and remove these.
#if defined(OS_MACOSX)
-// Very large images or svg canvases can cause huge mallocs. Skia
-// does tricks on tcmalloc-based systems to allow malloc to fail with
-// a NULL rather than hit the oom crasher. This replicates that for
-// OSX.
-//
-// IF YOU USE THIS WITHOUT CONSULTING YOUR FRIENDLY OSX DEVELOPER,
-// YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU.
BASE_EXPORT void* UncheckedMalloc(size_t size);
BASE_EXPORT void* UncheckedCalloc(size_t num_items, size_t size);
-#endif // defined(OS_MACOSX)
+#endif
} // namespace base
diff --git a/base/process/memory_linux.cc b/base/process/memory_linux.cc
index a40c2707ed..befd832d66 100644
--- a/base/process/memory_linux.cc
+++ b/base/process/memory_linux.cc
@@ -12,6 +12,22 @@
#include "base/process/internal_linux.h"
#include "base/strings/string_number_conversions.h"
+#if defined(USE_TCMALLOC)
+// Used by UncheckedMalloc. If tcmalloc is linked to the executable
+// this will be replaced by a strong symbol that actually implement
+// the semantics and don't call new handler in case the allocation fails.
+extern "C" {
+
+__attribute__((weak, visibility("default")))
+void* tc_malloc_skip_new_handler_weak(size_t size);
+
+void* tc_malloc_skip_new_handler_weak(size_t size) {
+ return malloc(size);
+}
+
+}
+#endif
+
namespace base {
size_t g_oom_size = 0U;
@@ -182,4 +198,16 @@ bool AdjustOOMScore(ProcessId process, int score) {
return false;
}
+bool UncheckedMalloc(size_t size, void** result) {
+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || \
+ (!defined(LIBC_GLIBC) && !defined(USE_TCMALLOC))
+ *result = malloc(size);
+#elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
+ *result = __libc_malloc(size);
+#elif defined(USE_TCMALLOC)
+ *result = tc_malloc_skip_new_handler_weak(size);
+#endif
+ return *result != NULL;
+}
+
} // namespace base
diff --git a/base/process/memory_mac.mm b/base/process/memory_mac.mm
index 3e281cd8e3..6cf1297b26 100644
--- a/base/process/memory_mac.mm
+++ b/base/process/memory_mac.mm
@@ -502,26 +502,42 @@ id oom_killer_allocWithZone(id self, SEL _cmd, NSZone* zone)
} // namespace
-void* UncheckedMalloc(size_t size) {
+bool UncheckedMalloc(size_t size, void** result) {
if (g_old_malloc) {
#if ARCH_CPU_32_BITS
ScopedClearErrno clear_errno;
ThreadLocalBooleanAutoReset flag(g_unchecked_alloc.Pointer(), true);
#endif // ARCH_CPU_32_BITS
- return g_old_malloc(malloc_default_zone(), size);
+ *result = g_old_malloc(malloc_default_zone(), size);
+ } else {
+ *result = malloc(size);
}
- return malloc(size);
+
+ return *result != NULL;
}
-void* UncheckedCalloc(size_t num_items, size_t size) {
+bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
if (g_old_calloc) {
#if ARCH_CPU_32_BITS
ScopedClearErrno clear_errno;
ThreadLocalBooleanAutoReset flag(g_unchecked_alloc.Pointer(), true);
#endif // ARCH_CPU_32_BITS
- return g_old_calloc(malloc_default_zone(), num_items, size);
+ *result = g_old_calloc(malloc_default_zone(), num_items, size);
+ } else {
+ *result = calloc(num_items, size);
}
- return calloc(num_items, size);
+
+ return *result != NULL;
+}
+
+void* UncheckedMalloc(size_t size) {
+ void* address;
+ return UncheckedMalloc(size, &address) ? address : NULL;
+}
+
+void* UncheckedCalloc(size_t num_items, size_t size) {
+ void* address;
+ return UncheckedCalloc(num_items, size, &address) ? address : NULL;
}
void EnableTerminationOnOutOfMemory() {
diff --git a/base/process/memory_unittest.cc b/base/process/memory_unittest.cc
index 5a1bcdfb1b..048c09d38c 100644
--- a/base/process/memory_unittest.cc
+++ b/base/process/memory_unittest.cc
@@ -152,13 +152,9 @@ TEST(ProcessMemoryTest, MacTerminateOnHeapCorruption) {
// Android doesn't implement set_new_handler, so we can't use the
// OutOfMemoryTest cases.
// OpenBSD does not support these tests either.
-// AddressSanitizer and ThreadSanitizer define the malloc()/free()/etc.
-// functions so that they don't crash if the program is out of memory, so the
-// OOM tests aren't supposed to work.
// TODO(vandebo) make this work on Windows too.
#if !defined(OS_ANDROID) && !defined(OS_OPENBSD) && \
- !defined(OS_WIN) && \
- !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
+ !defined(OS_WIN)
#if defined(USE_TCMALLOC)
extern "C" {
@@ -166,14 +162,14 @@ int tc_set_new_mode(int mode);
}
#endif // defined(USE_TCMALLOC)
-class OutOfMemoryDeathTest : public testing::Test {
+class OutOfMemoryTest : public testing::Test {
public:
- OutOfMemoryDeathTest()
- : value_(NULL),
- // Make test size as large as possible minus a few pages so
- // that alignment or other rounding doesn't make it wrap.
- test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024),
- signed_test_size_(std::numeric_limits<ssize_t>::max()) {
+ OutOfMemoryTest()
+ : value_(NULL),
+ // Make test size as large as possible minus a few pages so
+ // that alignment or other rounding doesn't make it wrap.
+ test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024),
+ signed_test_size_(std::numeric_limits<ssize_t>::max()) {
}
#if defined(USE_TCMALLOC)
@@ -186,6 +182,14 @@ class OutOfMemoryDeathTest : public testing::Test {
}
#endif // defined(USE_TCMALLOC)
+ protected:
+ void* value_;
+ size_t test_size_;
+ ssize_t signed_test_size_;
+};
+
+class OutOfMemoryDeathTest : public OutOfMemoryTest {
+ public:
void SetUpInDeathAssert() {
// Must call EnableTerminationOnOutOfMemory() because that is called from
// chrome's main function and therefore hasn't been called yet.
@@ -194,10 +198,6 @@ class OutOfMemoryDeathTest : public testing::Test {
// should be done inside of the ASSERT_DEATH.
base::EnableTerminationOnOutOfMemory();
}
-
- void* value_;
- size_t test_size_;
- ssize_t signed_test_size_;
};
TEST_F(OutOfMemoryDeathTest, New) {
@@ -375,5 +375,54 @@ TEST_F(OutOfMemoryDeathTest, PsychoticallyBigObjCObject) {
#endif // !ARCH_CPU_64_BITS
#endif // OS_MACOSX
-#endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) &&
- // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER)
+class OutOfMemoryHandledTest : public OutOfMemoryTest {
+ public:
+ static const size_t kSafeMallocSize = 512;
+ static const size_t kSafeCallocSize = 128;
+ static const size_t kSafeCallocItems = 4;
+
+ virtual void SetUp() {
+ OutOfMemoryTest::SetUp();
+
+ // We enable termination on OOM - just as Chrome does at early
+ // initialization - and test that UncheckedMalloc and UncheckedCalloc
+ // properly by-pass this in order to allow the caller to handle OOM.
+ base::EnableTerminationOnOutOfMemory();
+ }
+};
+
+// TODO(b.kelemen): make UncheckedMalloc and UncheckedCalloc work
+// on Windows as well.
+// UncheckedMalloc() and UncheckedCalloc() work as regular malloc()/calloc()
+// under sanitizer tools.
+#if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+TEST_F(OutOfMemoryHandledTest, UncheckedMalloc) {
+ EXPECT_TRUE(base::UncheckedMalloc(kSafeMallocSize, &value_));
+ EXPECT_TRUE(value_ != NULL);
+ free(value_);
+
+ EXPECT_FALSE(base::UncheckedMalloc(test_size_, &value_));
+ EXPECT_TRUE(value_ == NULL);
+}
+
+TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) {
+ EXPECT_TRUE(base::UncheckedCalloc(1, kSafeMallocSize, &value_));
+ EXPECT_TRUE(value_ != NULL);
+ const char* bytes = static_cast<const char*>(value_);
+ for (size_t i = 0; i < kSafeMallocSize; ++i)
+ EXPECT_EQ(0, bytes[i]);
+ free(value_);
+
+ EXPECT_TRUE(
+ base::UncheckedCalloc(kSafeCallocItems, kSafeCallocSize, &value_));
+ EXPECT_TRUE(value_ != NULL);
+ bytes = static_cast<const char*>(value_);
+ for (size_t i = 0; i < (kSafeCallocItems * kSafeCallocSize); ++i)
+ EXPECT_EQ(0, bytes[i]);
+ free(value_);
+
+ EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
+ EXPECT_TRUE(value_ == NULL);
+}
+#endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+#endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !defined(OS_WIN)
diff --git a/base/process/memory_win.cc b/base/process/memory_win.cc
index c53a1be539..668214ceaf 100644
--- a/base/process/memory_win.cc
+++ b/base/process/memory_win.cc
@@ -82,4 +82,15 @@ HMODULE GetModuleFromAddress(void* address) {
return instance;
}
+// TODO(b.kelemen): implement it with the required semantics. On Linux this is
+// implemented with a weak symbol that is overridden by tcmalloc. This is
+// neccessary because base cannot have a direct dependency on tcmalloc. Since
+// weak symbols are not supported on Windows this will involve some build time
+// magic, much like what is done for libcrt in order to override the allocation
+// functions.
+bool UncheckedMalloc(size_t size, void** result) {
+ *result = malloc(size);
+ return *result != NULL;
+}
+
} // namespace base
diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc
index 41a8dd6dab..250b06a4a4 100644
--- a/base/process/process_util_unittest.cc
+++ b/base/process/process_util_unittest.cc
@@ -235,7 +235,8 @@ MULTIPROCESS_TEST_MAIN(CrashingChildProcess) {
// This test intentionally crashes, so we don't need to run it under
// AddressSanitizer.
// TODO(jschuh): crbug.com/175753 Fix this in Win64 bots.
-#if defined(ADDRESS_SANITIZER) || (defined(OS_WIN) && defined(ARCH_CPU_X86_64))
+#if defined(ADDRESS_SANITIZER) || \
+ (defined(OS_WIN) && defined(ARCH_CPU_X86_64)) || defined(SYZYASAN)
#define MAYBE_GetTerminationStatusCrash DISABLED_GetTerminationStatusCrash
#else
#define MAYBE_GetTerminationStatusCrash GetTerminationStatusCrash
diff --git a/base/security_unittest.cc b/base/security_unittest.cc
index d613f34c50..6735f6ae24 100644
--- a/base/security_unittest.cc
+++ b/base/security_unittest.cc
@@ -43,11 +43,11 @@ Type HideValueFromCompiler(volatile Type value) {
}
// - NO_TCMALLOC (should be defined if compiled with use_allocator!="tcmalloc")
-// - ADDRESS_SANITIZER because it has its own memory allocator
+// - ADDRESS_SANITIZER and SYZYASAN because they have their own memory allocator
// - IOS does not use tcmalloc
// - OS_MACOSX does not use tcmalloc
#if !defined(NO_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \
- !defined(OS_IOS) && !defined(OS_MACOSX)
+ !defined(OS_IOS) && !defined(OS_MACOSX) && !defined(SYZYASAN)
#define TCMALLOC_TEST(function) function
#else
#define TCMALLOC_TEST(function) DISABLED_##function
diff --git a/base/synchronization/condition_variable_unittest.cc b/base/synchronization/condition_variable_unittest.cc
index ee554ff329..5f947a9567 100644
--- a/base/synchronization/condition_variable_unittest.cc
+++ b/base/synchronization/condition_variable_unittest.cc
@@ -101,7 +101,6 @@ class WorkQueue : public PlatformThread::Delegate {
int GetNumThreadsTakingAssignments() const;
int GetNumThreadsCompletingTasks() const;
int GetNumberOfCompletedTasks() const;
- TimeDelta GetWorkTime() const;
void SetWorkTime(TimeDelta delay);
void SetTaskCount(int count);
@@ -651,10 +650,6 @@ int WorkQueue::GetNumberOfCompletedTasks() const {
return total;
}
-TimeDelta WorkQueue::GetWorkTime() const {
- return worker_delay_;
-}
-
void WorkQueue::SetWorkTime(TimeDelta delay) {
worker_delay_ = delay;
}
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn
index ae15fd5959..ed100eb26e 100644
--- a/base/test/BUILD.gn
+++ b/base/test/BUILD.gn
@@ -5,7 +5,6 @@
import("//build/config/ui.gni")
static_library("test_support_base") {
- external = true
sources = [
"expectations/expectation.cc",
"expectations/expectation.h",
@@ -125,7 +124,6 @@ config("perf_test_config") {
}
static_library("test_support_perf") {
- external = true
sources = [
"run_all_perftests.cc",
]
@@ -142,7 +140,6 @@ static_library("test_support_perf") {
}
static_library("run_all_unittests") {
- external = true
sources = [
"run_all_unittests.cc",
]
diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc
index 467c0febb7..530262679d 100644
--- a/base/test/test_timeouts.cc
+++ b/base/test/test_timeouts.cc
@@ -16,7 +16,7 @@ namespace {
// ASan and TSan instrument each memory access. This may slow the execution
// down significantly.
-#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
+#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(SYZYASAN)
static const int kTimeoutMultiplier = 2;
#else
static const int kTimeoutMultiplier = 1;
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-arm.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-arm.mk
index 5b965b222d..a422f1873c 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-arm.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-arm.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -165,6 +166,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-mips.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-mips.mk
index cd1c67c08d..b58872be47 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-mips.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-mips.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -165,6 +166,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86.mk
index 51a276b1d9..8c8b315aeb 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86_64.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86_64.mk
new file mode 100644
index 0000000000..03074a5a91
--- /dev/null
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.darwin-x86_64.mk
@@ -0,0 +1,259 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_third_party_dynamic_annotations_dynamic_annotations_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/third_party/dynamic_annotations/dynamic_annotations.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_third_party_dynamic_annotations_dynamic_annotations_gyp
+
+# Alias gyp target name.
+.PHONY: dynamic_annotations
+dynamic_annotations: base_third_party_dynamic_annotations_dynamic_annotations_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-arm.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-arm.mk
index 5b965b222d..a422f1873c 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-arm.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-arm.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -165,6 +166,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-mips.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-mips.mk
index cd1c67c08d..b58872be47 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-mips.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-mips.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -165,6 +166,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86.mk
index 51a276b1d9..8c8b315aeb 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86.mk
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
'-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86_64.mk b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86_64.mk
new file mode 100644
index 0000000000..03074a5a91
--- /dev/null
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.target.linux-x86_64.mk
@@ -0,0 +1,259 @@
+# This file is generated by gyp; do not edit.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_MODULE := base_third_party_dynamic_annotations_dynamic_annotations_gyp
+LOCAL_MODULE_SUFFIX := .a
+LOCAL_MODULE_TAGS := optional
+gyp_intermediate_dir := $(call local-intermediates-dir)
+gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared)
+
+# Make sure our deps are built first.
+GYP_TARGET_DEPENDENCIES :=
+
+GYP_GENERATED_OUTPUTS :=
+
+# Make sure our deps and generated files are built first.
+LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
+
+LOCAL_GENERATED_SOURCES :=
+
+GYP_COPIED_SOURCE_ORIGIN_DIRS :=
+
+LOCAL_SRC_FILES := \
+ base/third_party/dynamic_annotations/dynamic_annotations.c
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Debug := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -g \
+ -fomit-frame-pointer \
+ -fdata-sections \
+ -ffunction-sections \
+ -funwind-tables
+
+MY_DEFS_Debug := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
+ '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
+ '-D_DEBUG'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-unused-local-typedefs \
+ -Wno-format \
+ -m64 \
+ -march=x86-64 \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-unused-but-set-variable \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -funwind-tables
+
+MY_DEFS_Release := \
+ '-DV8_DEPRECATION_WARNINGS' \
+ '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_CONFIGURATION_POLICY' \
+ '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
+ '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DCLD_VERSION=1' \
+ '-DENABLE_PRINTING=1' \
+ '-DENABLE_MANAGED_USERS=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DUSE_OPENSSL_CERTS=1' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH) \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+### Rules for final target.
+
+LOCAL_LDFLAGS_Debug := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel \
+ -Wl,-O1 \
+ -Wl,--as-needed
+
+
+LOCAL_LDFLAGS_Release := \
+ -Wl,--fatal-warnings \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m64 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections \
+ -Wl,--warn-shared-textrel
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
+LOCAL_STATIC_LIBRARIES :=
+
+# Enable grouping to fix circular references
+LOCAL_GROUP_STATIC_LIBRARIES := true
+
+LOCAL_SHARED_LIBRARIES := \
+ libstlport \
+ libdl
+
+# Add target alias to "gyp_all_modules" target.
+.PHONY: gyp_all_modules
+gyp_all_modules: base_third_party_dynamic_annotations_dynamic_annotations_gyp
+
+# Alias gyp target name.
+.PHONY: dynamic_annotations
+dynamic_annotations: base_third_party_dynamic_annotations_dynamic_annotations_gyp
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/base/third_party/nspr/BUILD.gn b/base/third_party/nspr/BUILD.gn
index 9852f5db10..c67874afc9 100644
--- a/base/third_party/nspr/BUILD.gn
+++ b/base/third_party/nspr/BUILD.gn
@@ -3,19 +3,9 @@
# found in the LICENSE file.
static_library("nspr") {
- external = true
sources = [
- "prcpucfg.h",
- "prcpucfg_freebsd.h",
- "prcpucfg_linux.h",
- "prcpucfg_mac.h",
- "prcpucfg_nacl.h",
- "prcpucfg_openbsd.h",
- "prcpucfg_solaris.h",
- "prcpucfg_win.h",
"prtime.cc",
"prtime.h",
- "prtypes.h",
]
# In GYP this project is part of base, so it uses the base implementation
diff --git a/base/third_party/nspr/prcpucfg.h b/base/third_party/nspr/prcpucfg.h
deleted file mode 100644
index d6ebb47abd..0000000000
--- a/base/third_party/nspr/prcpucfg.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
-#define BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
-
-#if defined(WIN32)
-#include "base/third_party/nspr/prcpucfg_win.h"
-#elif defined(__APPLE__)
-#include "base/third_party/nspr/prcpucfg_mac.h"
-#elif defined(__native_client__)
-#include "base/third_party/nspr/prcpucfg_nacl.h"
-#elif defined(__linux__) || defined(ANDROID)
-#include "base/third_party/nspr/prcpucfg_linux.h"
-#elif defined(__FreeBSD__)
-#include "base/third_party/nspr/prcpucfg_freebsd.h"
-#elif defined(__OpenBSD__)
-#include "base/third_party/nspr/prcpucfg_openbsd.h"
-#elif defined(__sun)
-#include "base/third_party/nspr/prcpucfg_solaris.h"
-#else
-#error Provide a prcpucfg.h appropriate for your platform
-#endif
-
-#endif // BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
diff --git a/base/third_party/nspr/prcpucfg_freebsd.h b/base/third_party/nspr/prcpucfg_freebsd.h
deleted file mode 100644
index 76d3542027..0000000000
--- a/base/third_party/nspr/prcpucfg_freebsd.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef FREEBSD
-#define FREEBSD
-#endif
-
-#define PR_AF_INET6 28 /* same as AF_INET6 */
-
-#ifndef HAVE_LONG_LONG
-#define HAVE_LONG_LONG
-#endif
-
-#if defined(__i386__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#undef HAVE_ALIGNED_DOUBLES
-#undef HAVE_ALIGNED_LONGLONGS
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-
-#elif defined(__alpha__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#elif defined(__sparc__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#elif defined(__ia64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#elif defined(__amd64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#else
-
-#error "Unknown CPU architecture"
-
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prcpucfg_linux.h b/base/third_party/nspr/prcpucfg_linux.h
deleted file mode 100644
index 45d6bf9918..0000000000
--- a/base/third_party/nspr/prcpucfg_linux.h
+++ /dev/null
@@ -1,809 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef LINUX
-#define LINUX
-#endif
-
-#define PR_AF_INET6 10 /* same as AF_INET6 */
-
-#ifdef __powerpc64__
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__powerpc__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__alpha)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__ia64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__x86_64__)
-
-#ifdef __ILP32__
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#else
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#endif
-
-#elif defined(__mc68000__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 2
-#define PR_ALIGN_OF_LONG 2
-#define PR_ALIGN_OF_INT64 2
-#define PR_ALIGN_OF_FLOAT 2
-#define PR_ALIGN_OF_DOUBLE 2
-#define PR_ALIGN_OF_POINTER 2
-#define PR_ALIGN_OF_WORD 2
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__sparc__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__i386__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__mips__)
-
-#ifdef __MIPSEB__
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-#elif defined(__MIPSEL__)
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#else
-#error "Unknown MIPS endianness."
-#endif
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__arm__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__aarch64__)
-
-#ifdef __AARCH64EB__
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#elif defined(__AARCH64EL__)
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#else
-#error "Unknown Aarch64 endianness."
-#endif
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__hppa__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__s390x__)
-
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__s390__)
-
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#else
-
-#error "Unknown CPU architecture"
-
-#endif
-
-#define HAVE_LONG_LONG
-#if PR_ALIGN_OF_DOUBLE == 8
-#define HAVE_ALIGNED_DOUBLES
-#endif
-#if PR_ALIGN_OF_INT64 == 8
-#define HAVE_ALIGNED_LONGLONGS
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prcpucfg_mac.h b/base/third_party/nspr/prcpucfg_mac.h
deleted file mode 100644
index 60bea8e5c3..0000000000
--- a/base/third_party/nspr/prcpucfg_mac.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#define PR_AF_INET6 30 /* same as AF_INET6 */
-
-#ifdef __LITTLE_ENDIAN__
-#undef IS_BIG_ENDIAN
-#define IS_LITTLE_ENDIAN 1
-#else
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#endif
-
-#ifdef __x86_64__
-#define IS_64
-#endif
-
-#ifndef HAVE_LONG_LONG
-#define HAVE_LONG_LONG
-#endif
-#undef HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS 1
-
-#ifdef IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-#define PR_BITS_PER_DWORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-#define PR_BITS_PER_DWORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-#define PR_ALIGN_OF_DWORD 8
-
-#else /* IS_64 */
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-#define PR_BITS_PER_DWORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#endif /* IS_64 */
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
-
diff --git a/base/third_party/nspr/prcpucfg_nacl.h b/base/third_party/nspr/prcpucfg_nacl.h
deleted file mode 100644
index ba92726958..0000000000
--- a/base/third_party/nspr/prcpucfg_nacl.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef LINUX
-#define LINUX
-#endif
-
-#define PR_AF_INET6 10 /* same as AF_INET6 */
-
-#if defined(__x86_64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__i386__) || defined(__pnacl__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__arm__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__mips__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#else
-
-#error "Unknown CPU architecture"
-
-#endif
-
-#define HAVE_LONG_LONG
-#if PR_ALIGN_OF_DOUBLE == 8
-#define HAVE_ALIGNED_DOUBLES
-#endif
-#if PR_ALIGN_OF_INT64 == 8
-#define HAVE_ALIGNED_LONGLONGS
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prcpucfg_openbsd.h b/base/third_party/nspr/prcpucfg_openbsd.h
deleted file mode 100644
index 93c5b32bc5..0000000000
--- a/base/third_party/nspr/prcpucfg_openbsd.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef OPENBSD
-#define OPENBSD
-#endif
-
-#define PR_AF_INET6 28 /* same as AF_INET6 */
-
-#ifndef HAVE_LONG_LONG
-#define HAVE_LONG_LONG
-#endif
-
-#if defined(__i386__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#undef HAVE_ALIGNED_DOUBLES
-#undef HAVE_ALIGNED_LONGLONGS
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-
-#elif defined(__alpha__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#elif defined(__sparc__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#elif defined(__ia64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#elif defined(__amd64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#else
-
-#error "Unknown CPU architecture"
-
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prcpucfg_solaris.h b/base/third_party/nspr/prcpucfg_solaris.h
deleted file mode 100644
index 81313e553d..0000000000
--- a/base/third_party/nspr/prcpucfg_solaris.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef SOLARIS
-#define SOLARIS
-#endif
-
-#define PR_AF_INET6 26 /* same as AF_INET6 */
-
-#if defined(sparc) || defined(__sparc)
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_DOUBLE 8
-#if defined(__sparcv9)
-#define IS_64
-#endif
-#elif defined(__x86_64)
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_DOUBLE 8
-#define IS_64
-#elif defined(i386) || defined(__i386)
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_DOUBLE 4
-#else
-#error unknown processor
-#endif
-
-#ifdef IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_POINTER 8
-
-#else /* IS_64 */
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_POINTER 4
-
-#endif /* IS_64 */
-
-#ifndef HAVE_LONG_LONG
-#define HAVE_LONG_LONG
-#endif
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* ifndef nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prcpucfg_win.h b/base/third_party/nspr/prcpucfg_win.h
deleted file mode 100644
index 4ad534580a..0000000000
--- a/base/third_party/nspr/prcpucfg_win.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_PC
-#define XP_PC
-#endif
-
-#ifndef WIN32
-#define WIN32
-#endif
-
-#ifndef WIN95
-#define WIN95
-#endif
-
-#define PR_AF_INET6 23 /* same as AF_INET6 */
-
-#if defined(_M_IX86) || defined(_X86_)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_DOUBLE 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_WORD 32
-#define PR_BITS_PER_DWORD 64
-#define PR_BITS_PER_DOUBLE 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_WORD_LOG2 5
-#define PR_BITS_PER_DWORD_LOG2 6
-#define PR_BITS_PER_DOUBLE_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_WORD 4
-#define PR_ALIGN_OF_DWORD 8
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 2
-
-#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_DOUBLE 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_WORD 64
-#define PR_BITS_PER_DWORD 64
-#define PR_BITS_PER_DOUBLE 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_WORD_LOG2 6
-#define PR_BITS_PER_DWORD_LOG2 6
-#define PR_BITS_PER_DOUBLE_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_WORD 8
-#define PR_ALIGN_OF_DWORD 8
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(_M_IA64) || defined(_IA64_)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-#define PR_BYTES_PER_DOUBLE 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_WORD 64
-#define PR_BITS_PER_DWORD 64
-#define PR_BITS_PER_DOUBLE 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_WORD_LOG2 6
-#define PR_BITS_PER_DWORD_LOG2 6
-#define PR_BITS_PER_DOUBLE_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_WORD 8
-#define PR_ALIGN_OF_DWORD 8
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#else /* defined(_M_IX86) || defined(_X86_) */
-
-#error unknown processor architecture
-
-#endif /* defined(_M_IX86) || defined(_X86_) */
-
-#ifndef HAVE_LONG_LONG
-#define HAVE_LONG_LONG
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/base/third_party/nspr/prtime.cc b/base/third_party/nspr/prtime.cc
index 5fc89c5e44..0c97bc16d8 100644
--- a/base/third_party/nspr/prtime.cc
+++ b/base/third_party/nspr/prtime.cc
@@ -443,10 +443,6 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
PRTimeParameters
PR_GMTParameters(const PRExplodedTime *gmt)
{
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
PRTimeParameters retVal = { 0, 0 };
return retVal;
}
diff --git a/base/third_party/nspr/prtime.h b/base/third_party/nspr/prtime.h
index ffbedec825..01c009e37b 100644
--- a/base/third_party/nspr/prtime.h
+++ b/base/third_party/nspr/prtime.h
@@ -52,10 +52,26 @@
#ifndef BASE_PRTIME_H__
#define BASE_PRTIME_H__
+#include <stdint.h>
+
#include "base/base_export.h"
-#include "base/third_party/nspr/prtypes.h"
+
+typedef int8_t PRInt8;
+typedef int16_t PRInt16;
+typedef int32_t PRInt32;
+typedef int64_t PRInt64;
+typedef int PRIntn;
+
+typedef PRIntn PRBool;
+#define PR_TRUE 1
+#define PR_FALSE 0
+
+typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
#define PR_ASSERT DCHECK
+#define PR_CALLBACK
+#define PR_INT16_MAX 32767
+#define NSPR_API(__type) extern __type
#define LL_I2L(l, i) ((l) = (PRInt64)(i))
#define LL_MUL(r, a, b) ((r) = (a) * (b))
diff --git a/base/third_party/nspr/prtypes.h b/base/third_party/nspr/prtypes.h
deleted file mode 100644
index 630df81a76..0000000000
--- a/base/third_party/nspr/prtypes.h
+++ /dev/null
@@ -1,558 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
-** File: prtypes.h
-** Description: Definitions of NSPR's basic types
-**
-** Prototypes and macros used to make up for deficiencies that we have found
-** in ANSI environments.
-**
-** Since we do not wrap <stdlib.h> and all the other standard headers, authors
-** of portable code will not know in general that they need these definitions.
-** Instead of requiring these authors to find the dependent uses in their code
-** and take the following steps only in those C files, we take steps once here
-** for all C files.
-**/
-
-#ifndef prtypes_h___
-#define prtypes_h___
-
-#ifdef MDCPUCFG
-#include MDCPUCFG
-#else
-#include "base/third_party/nspr/prcpucfg.h"
-#endif
-
-#include <stddef.h>
-
-/***********************************************************************
-** MACROS: PR_EXTERN
-** PR_IMPLEMENT
-** DESCRIPTION:
-** These are only for externally visible routines and globals. For
-** internal routines, just use "extern" for type checking and that
-** will not export internal cross-file or forward-declared symbols.
-** Define a macro for declaring procedures return types. We use this to
-** deal with windoze specific type hackery for DLL definitions. Use
-** PR_EXTERN when the prototype for the method is declared. Use
-** PR_IMPLEMENT for the implementation of the method.
-**
-** Example:
-** in dowhim.h
-** PR_EXTERN( void ) DoWhatIMean( void );
-** in dowhim.c
-** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; }
-**
-**
-***********************************************************************/
-#if 1
-
-/*
-** Local change: the portions of NSPR used by the base module are
-** implementation details. NSPR symbols do not need to be exported beyond
-** the base module. For all platforms, avoid decorating functions with
-** specific visibility and access keywords.
-*/
-
-#define PR_EXPORT(__type) extern __type
-#define PR_EXPORT_DATA(__type) extern __type
-#define PR_IMPORT(__type) extern __type
-#define PR_IMPORT_DATA(__type) extern __type
-
-#define PR_EXTERN(__type) extern __type
-#define PR_IMPLEMENT(__type) __type
-#define PR_EXTERN_DATA(__type) extern __type
-#define PR_IMPLEMENT_DATA(__type) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#elif defined(WIN32)
-
-#define PR_EXPORT(__type) extern __declspec(dllexport) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPORT(__type) __declspec(dllimport) __type
-#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type
-
-#define PR_EXTERN(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#elif defined(XP_BEOS)
-
-#define PR_EXPORT(__type) extern __declspec(dllexport) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPORT(__type) extern __declspec(dllexport) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
-
-#define PR_EXTERN(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#elif defined(XP_OS2) && defined(__declspec)
-
-#define PR_EXPORT(__type) extern __declspec(dllexport) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPORT(__type) extern __declspec(dllimport) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
-
-#define PR_EXTERN(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#elif defined(SYMBIAN)
-
-#define PR_EXPORT(__type) extern __declspec(dllexport) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
-#ifdef __WINS__
-#define PR_IMPORT(__type) extern __declspec(dllexport) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
-#else
-#define PR_IMPORT(__type) extern __declspec(dllimport) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
-#endif
-
-#define PR_EXTERN(__type) extern __type
-#define PR_IMPLEMENT(__type) __type
-#define PR_EXTERN_DATA(__type) extern __type
-#define PR_IMPLEMENT_DATA(__type) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#else /* Unix */
-
-/* GCC 3.3 and later support the visibility attribute. */
-#if (__GNUC__ >= 4) || \
- (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default")))
-#else
-#define PR_VISIBILITY_DEFAULT
-#endif
-
-#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type
-#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
-#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type
-#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
-
-#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type
-#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type
-#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
-#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
-#endif
-
-#if defined(_NSPR_BUILD_)
-#define NSPR_API(__type) PR_EXPORT(__type)
-#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type)
-#else
-#define NSPR_API(__type) PR_IMPORT(__type)
-#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)
-#endif
-
-/***********************************************************************
-** MACROS: PR_BEGIN_MACRO
-** PR_END_MACRO
-** DESCRIPTION:
-** Macro body brackets so that macros with compound statement definitions
-** behave syntactically more like functions when called.
-***********************************************************************/
-#define PR_BEGIN_MACRO do {
-#define PR_END_MACRO } while (0)
-
-/***********************************************************************
-** MACROS: PR_BEGIN_EXTERN_C
-** PR_END_EXTERN_C
-** DESCRIPTION:
-** Macro shorthands for conditional C++ extern block delimiters.
-***********************************************************************/
-#ifdef __cplusplus
-#define PR_BEGIN_EXTERN_C extern "C" {
-#define PR_END_EXTERN_C }
-#else
-#define PR_BEGIN_EXTERN_C
-#define PR_END_EXTERN_C
-#endif
-
-/***********************************************************************
-** MACROS: PR_BIT
-** PR_BITMASK
-** DESCRIPTION:
-** Bit masking macros. XXX n must be <= 31 to be portable
-***********************************************************************/
-#define PR_BIT(n) ((PRUint32)1 << (n))
-#define PR_BITMASK(n) (PR_BIT(n) - 1)
-
-/***********************************************************************
-** MACROS: PR_ROUNDUP
-** PR_MIN
-** PR_MAX
-** PR_ABS
-** DESCRIPTION:
-** Commonly used macros for operations on compatible types.
-***********************************************************************/
-#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
-#define PR_MIN(x,y) ((x)<(y)?(x):(y))
-#define PR_MAX(x,y) ((x)>(y)?(x):(y))
-#define PR_ABS(x) ((x)<0?-(x):(x))
-
-PR_BEGIN_EXTERN_C
-
-/************************************************************************
-** TYPES: PRUint8
-** PRInt8
-** DESCRIPTION:
-** The int8 types are known to be 8 bits each. There is no type that
-** is equivalent to a plain "char".
-************************************************************************/
-#if PR_BYTES_PER_BYTE == 1
-typedef unsigned char PRUint8;
-/*
-** Some cfront-based C++ compilers do not like 'signed char' and
-** issue the warning message:
-** warning: "signed" not implemented (ignored)
-** For these compilers, we have to define PRInt8 as plain 'char'.
-** Make sure that plain 'char' is indeed signed under these compilers.
-*/
-#if (defined(HPUX) && defined(__cplusplus) \
- && !defined(__GNUC__) && __cplusplus < 199707L) \
- || (defined(SCO) && defined(__cplusplus) \
- && !defined(__GNUC__) && __cplusplus == 1L)
-typedef char PRInt8;
-#else
-typedef signed char PRInt8;
-#endif
-#else
-#error No suitable type for PRInt8/PRUint8
-#endif
-
-/************************************************************************
- * MACROS: PR_INT8_MAX
- * PR_INT8_MIN
- * PR_UINT8_MAX
- * DESCRIPTION:
- * The maximum and minimum values of a PRInt8 or PRUint8.
-************************************************************************/
-
-#define PR_INT8_MAX 127
-#define PR_INT8_MIN (-128)
-#define PR_UINT8_MAX 255U
-
-/************************************************************************
-** TYPES: PRUint16
-** PRInt16
-** DESCRIPTION:
-** The int16 types are known to be 16 bits each.
-************************************************************************/
-#if PR_BYTES_PER_SHORT == 2
-typedef unsigned short PRUint16;
-typedef short PRInt16;
-#else
-#error No suitable type for PRInt16/PRUint16
-#endif
-
-/************************************************************************
- * MACROS: PR_INT16_MAX
- * PR_INT16_MIN
- * PR_UINT16_MAX
- * DESCRIPTION:
- * The maximum and minimum values of a PRInt16 or PRUint16.
-************************************************************************/
-
-#define PR_INT16_MAX 32767
-#define PR_INT16_MIN (-32768)
-#define PR_UINT16_MAX 65535U
-
-/************************************************************************
-** TYPES: PRUint32
-** PRInt32
-** DESCRIPTION:
-** The int32 types are known to be 32 bits each.
-************************************************************************/
-#if PR_BYTES_PER_INT == 4
-typedef unsigned int PRUint32;
-typedef int PRInt32;
-#define PR_INT32(x) x
-#define PR_UINT32(x) x ## U
-#elif PR_BYTES_PER_LONG == 4
-typedef unsigned long PRUint32;
-typedef long PRInt32;
-#define PR_INT32(x) x ## L
-#define PR_UINT32(x) x ## UL
-#else
-#error No suitable type for PRInt32/PRUint32
-#endif
-
-/************************************************************************
- * MACROS: PR_INT32_MAX
- * PR_INT32_MIN
- * PR_UINT32_MAX
- * DESCRIPTION:
- * The maximum and minimum values of a PRInt32 or PRUint32.
-************************************************************************/
-
-#define PR_INT32_MAX PR_INT32(2147483647)
-#define PR_INT32_MIN (-PR_INT32_MAX - 1)
-#define PR_UINT32_MAX PR_UINT32(4294967295)
-
-/************************************************************************
-** TYPES: PRUint64
-** PRInt64
-** DESCRIPTION:
-** The int64 types are known to be 64 bits each. Care must be used when
-** declaring variables of type PRUint64 or PRInt64. Different hardware
-** architectures and even different compilers have varying support for
-** 64 bit values. The only guaranteed portability requires the use of
-** the LL_ macros (see prlong.h).
-************************************************************************/
-#ifdef HAVE_LONG_LONG
-/* Keep this in sync with prlong.h. */
-/*
- * On 64-bit Mac OS X, uint64 needs to be defined as unsigned long long to
- * match uint64_t, otherwise our uint64 typedef conflicts with the uint64
- * typedef in cssmconfig.h, which CoreServices.h includes indirectly.
- */
-#if PR_BYTES_PER_LONG == 8 && !defined(__APPLE__)
-typedef long PRInt64;
-typedef unsigned long PRUint64;
-#elif defined(WIN32) && !defined(__GNUC__)
-typedef __int64 PRInt64;
-typedef unsigned __int64 PRUint64;
-#else
-typedef long long PRInt64;
-typedef unsigned long long PRUint64;
-#endif /* PR_BYTES_PER_LONG == 8 */
-#else /* !HAVE_LONG_LONG */
-typedef struct {
-#ifdef IS_LITTLE_ENDIAN
- PRUint32 lo, hi;
-#else
- PRUint32 hi, lo;
-#endif
-} PRInt64;
-typedef PRInt64 PRUint64;
-#endif /* !HAVE_LONG_LONG */
-
-/************************************************************************
-** TYPES: PRUintn
-** PRIntn
-** DESCRIPTION:
-** The PRIntn types are most appropriate for automatic variables. They are
-** guaranteed to be at least 16 bits, though various architectures may
-** define them to be wider (e.g., 32 or even 64 bits). These types are
-** never valid for fields of a structure.
-************************************************************************/
-#if PR_BYTES_PER_INT >= 2
-typedef int PRIntn;
-typedef unsigned int PRUintn;
-#else
-#error 'sizeof(int)' not sufficient for platform use
-#endif
-
-/************************************************************************
-** TYPES: PRFloat64
-** DESCRIPTION:
-** NSPR's floating point type is always 64 bits.
-************************************************************************/
-typedef double PRFloat64;
-
-/************************************************************************
-** TYPES: PRSize
-** DESCRIPTION:
-** A type for representing the size of objects.
-************************************************************************/
-typedef size_t PRSize;
-
-
-/************************************************************************
-** TYPES: PROffset32, PROffset64
-** DESCRIPTION:
-** A type for representing byte offsets from some location.
-************************************************************************/
-typedef PRInt32 PROffset32;
-typedef PRInt64 PROffset64;
-
-/************************************************************************
-** TYPES: PRPtrDiff
-** DESCRIPTION:
-** A type for pointer difference. Variables of this type are suitable
-** for storing a pointer or pointer subtraction.
-************************************************************************/
-typedef ptrdiff_t PRPtrdiff;
-
-/************************************************************************
-** TYPES: PRUptrdiff
-** DESCRIPTION:
-** A type for pointer difference. Variables of this type are suitable
-** for storing a pointer or pointer sutraction.
-************************************************************************/
-#ifdef _WIN64
-typedef PRUint64 PRUptrdiff;
-#else
-typedef unsigned long PRUptrdiff;
-#endif
-
-/************************************************************************
-** TYPES: PRBool
-** DESCRIPTION:
-** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE
-** for clarity of target type in assignments and actual arguments. Use
-** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans
-** just as you would C int-valued conditions.
-************************************************************************/
-typedef PRIntn PRBool;
-#define PR_TRUE 1
-#define PR_FALSE 0
-
-/************************************************************************
-** TYPES: PRPackedBool
-** DESCRIPTION:
-** Use PRPackedBool within structs where bitfields are not desirable
-** but minimum and consistant overhead matters.
-************************************************************************/
-typedef PRUint8 PRPackedBool;
-
-/*
-** Status code used by some routines that have a single point of failure or
-** special status return.
-*/
-typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
-
-#ifndef __PRUNICHAR__
-#define __PRUNICHAR__
-#ifdef WIN32
-typedef wchar_t PRUnichar;
-#else
-typedef PRUint16 PRUnichar;
-#endif
-#endif
-
-/*
-** WARNING: The undocumented data types PRWord and PRUword are
-** only used in the garbage collection and arena code. Do not
-** use PRWord and PRUword in new code.
-**
-** A PRWord is an integer that is the same size as a void*.
-** It implements the notion of a "word" in the Java Virtual
-** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine
-** Specification, Addison-Wesley, September 1996.
-** http://java.sun.com/docs/books/vmspec/index.html.)
-*/
-#ifdef _WIN64
-typedef PRInt64 PRWord;
-typedef PRUint64 PRUword;
-#else
-typedef long PRWord;
-typedef unsigned long PRUword;
-#endif
-
-#if defined(NO_NSPR_10_SUPPORT)
-#else
-/********* ???????????????? FIX ME ??????????????????????????? *****/
-/********************** Some old definitions until pr=>ds transition is done ***/
-/********************** Also, we are still using NSPR 1.0. GC ******************/
-/*
-** Fundamental NSPR macros, used nearly everywhere.
-*/
-
-#define PR_PUBLIC_API PR_IMPLEMENT
-
-/*
-** Macro body brackets so that macros with compound statement definitions
-** behave syntactically more like functions when called.
-*/
-#define NSPR_BEGIN_MACRO do {
-#define NSPR_END_MACRO } while (0)
-
-/*
-** Macro shorthands for conditional C++ extern block delimiters.
-*/
-#ifdef NSPR_BEGIN_EXTERN_C
-#undef NSPR_BEGIN_EXTERN_C
-#endif
-#ifdef NSPR_END_EXTERN_C
-#undef NSPR_END_EXTERN_C
-#endif
-
-#ifdef __cplusplus
-#define NSPR_BEGIN_EXTERN_C extern "C" {
-#define NSPR_END_EXTERN_C }
-#else
-#define NSPR_BEGIN_EXTERN_C
-#define NSPR_END_EXTERN_C
-#endif
-
-/********* ????????????? End Fix me ?????????????????????????????? *****/
-#endif /* NO_NSPR_10_SUPPORT */
-
-/*
-** Compile-time assert. "condition" must be a constant expression.
-** The macro can be used only in places where an "extern" declaration is
-** allowed.
-*/
-#define PR_STATIC_ASSERT(condition) \
- extern void pr_static_assert(int arg[(condition) ? 1 : -1])
-
-PR_END_EXTERN_C
-
-#if !defined(NO_NSPR_10_SUPPORT)
-#include "base/basictypes.h"
-#endif
-
-#endif /* prtypes_h___ */
-
diff --git a/base/third_party/symbolize/BUILD.gn b/base/third_party/symbolize/BUILD.gn
index cb2d1ce9c9..79bc133239 100644
--- a/base/third_party/symbolize/BUILD.gn
+++ b/base/third_party/symbolize/BUILD.gn
@@ -3,7 +3,6 @@
# found in the LICENSE file.
static_library("symbolize") {
- external = true
sources = [
"config.h",
"demangle.cc",
diff --git a/base/third_party/xdg_user_dirs/BUILD.gn b/base/third_party/xdg_user_dirs/BUILD.gn
index eda4e02fff..f2145b7863 100644
--- a/base/third_party/xdg_user_dirs/BUILD.gn
+++ b/base/third_party/xdg_user_dirs/BUILD.gn
@@ -3,7 +3,6 @@
# found in the LICENSE file.
static_library("xdg_user_dirs") {
- external = true
sources = [
"xdg_user_dir_lookup.cc",
"xdg_user_dir_lookup.h",
diff --git a/base/threading/platform_thread_mac.mm b/base/threading/platform_thread_mac.mm
index d81a286cb2..486181ff8b 100644
--- a/base/threading/platform_thread_mac.mm
+++ b/base/threading/platform_thread_mac.mm
@@ -5,13 +5,13 @@
#include "base/threading/platform_thread.h"
#import <Foundation/Foundation.h>
-#include <algorithm>
-#include <dlfcn.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <mach/thread_policy.h>
#include <sys/resource.h>
+#include <algorithm>
+
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/threading/thread_id_name_manager.h"
@@ -45,21 +45,13 @@ void PlatformThread::SetName(const char* name) {
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
tracked_objects::ThreadData::InitializeThreadContext(name);
- // pthread_setname_np is only available in 10.6 or later, so test
- // for it at runtime.
- int (*dynamic_pthread_setname_np)(const char*);
- *reinterpret_cast<void**>(&dynamic_pthread_setname_np) =
- dlsym(RTLD_DEFAULT, "pthread_setname_np");
- if (!dynamic_pthread_setname_np)
- return;
-
// Mac OS X does not expose the length limit of the name, so
// hardcode it.
const int kMaxNameLength = 63;
std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
// pthread_setname() fails (harmlessly) in the sandbox, ignore when it does.
// See http://crbug.com/47058
- dynamic_pthread_setname_np(shortened_name.c_str());
+ pthread_setname_np(shortened_name.c_str());
}
namespace {
diff --git a/base/time/time.cc b/base/time/time.cc
index 2c6388608e..f7313565a3 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -11,7 +11,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/third_party/nspr/prtime.h"
-#include "base/third_party/nspr/prtypes.h"
namespace base {
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index c763a32a53..b1da3e1aa5 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -20,7 +20,7 @@ const base::subtle::Atomic32 kMagicValue = 42;
// Helper for memory accesses that can potentially corrupt memory or cause a
// crash during a native run.
-#if defined(ADDRESS_SANITIZER)
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
#if defined(OS_IOS)
// EXPECT_DEATH is not supported on IOS.
#define HARMFUL_ACCESS(action,error_regexp) do { action; } while (0)
@@ -94,10 +94,10 @@ TEST(ToolsSanityTest, MemoryLeak) {
leak[4] = 1; // Make sure the allocated memory is used.
}
-#if defined(ADDRESS_SANITIZER) && (defined(OS_IOS) || defined(OS_WIN))
+#if (defined(ADDRESS_SANITIZER) && defined(OS_IOS)) || defined(SYZYASAN)
// Because iOS doesn't support death tests, each of the following tests will
-// crash the whole program under Asan. On Windows Asan is based on SyzyAsan, the
-// error report mecanism is different than with Asan so those test will fail.
+// crash the whole program under Asan. On Windows Asan is based on SyzyAsan; the
+// error report mechanism is different than with Asan so these tests will fail.
#define MAYBE_AccessesToNewMemory DISABLED_AccessesToNewMemory
#define MAYBE_AccessesToMallocMemory DISABLED_AccessesToMallocMemory
#else
@@ -113,7 +113,7 @@ TEST(ToolsSanityTest, MemoryLeak) {
// tests should be put back under the (defined(OS_IOS) || defined(OS_WIN))
// clause above.
// See also http://crbug.com/172614.
-#if defined(ADDRESS_SANITIZER)
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
#define MAYBE_SingleElementDeletedWithBraces \
DISABLED_SingleElementDeletedWithBraces
#define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces
@@ -135,7 +135,7 @@ TEST(ToolsSanityTest, MAYBE_AccessesToMallocMemory) {
}
TEST(ToolsSanityTest, MAYBE_ArrayDeletedWithoutBraces) {
-#if !defined(ADDRESS_SANITIZER)
+#if !defined(ADDRESS_SANITIZER) && !defined(SYZYASAN)
// This test may corrupt memory if not run under Valgrind or compiled with
// AddressSanitizer.
if (!RunningOnValgrind())
@@ -161,7 +161,7 @@ TEST(ToolsSanityTest, MAYBE_SingleElementDeletedWithBraces) {
delete [] foo;
}
-#if defined(ADDRESS_SANITIZER)
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
TEST(ToolsSanityTest, DISABLED_AddressSanitizerNullDerefCrashTest) {
// Intentionally crash to make sure AddressSanitizer is running.
// This test should not be ran on bots.
diff --git a/base/win/iat_patch_function.cc b/base/win/iat_patch_function.cc
index 923dc040d3..21c39950cc 100644
--- a/base/win/iat_patch_function.cc
+++ b/base/win/iat_patch_function.cc
@@ -285,5 +285,10 @@ DWORD IATPatchFunction::Unpatch() {
return error;
}
+void* IATPatchFunction::original_function() const {
+ DCHECK(is_patched());
+ return original_function_;
+}
+
} // namespace win
} // namespace base
diff --git a/base/win/iat_patch_function.h b/base/win/iat_patch_function.h
index 3ae1f3c460..5026e0eb95 100644
--- a/base/win/iat_patch_function.h
+++ b/base/win/iat_patch_function.h
@@ -57,6 +57,8 @@ class BASE_EXPORT IATPatchFunction {
return (NULL != intercept_function_);
}
+ void* original_function() const;
+
private:
HMODULE module_handle_;
void* intercept_function_;
diff --git a/base/x11/edid_parser_x11.cc b/base/x11/edid_parser_x11.cc
deleted file mode 100644
index 74b14b65c4..0000000000
--- a/base/x11/edid_parser_x11.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/x11/edid_parser_x11.h"
-
-#include <X11/extensions/Xrandr.h>
-#include <X11/Xatom.h>
-#include <X11/Xlib.h>
-
-#include "base/hash.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/string_util.h"
-#include "base/sys_byteorder.h"
-
-namespace {
-
-// Returns 64-bit persistent ID for the specified manufacturer's ID and
-// product_code_hash, and the index of the output it is connected to.
-// |output_index| is used to distinguish the displays of the same type. For
-// example, swapping two identical display between two outputs will not be
-// treated as swap. The 'serial number' field in EDID isn't used here because
-// it is not guaranteed to have unique number and it may have the same fixed
-// value (like 0).
-int64 GetID(uint16 manufacturer_id,
- uint32 product_code_hash,
- uint8 output_index) {
- return ((static_cast<int64>(manufacturer_id) << 40) |
- (static_cast<int64>(product_code_hash) << 8) | output_index);
-}
-
-bool IsRandRAvailable() {
- int randr_version_major = 0;
- int randr_version_minor = 0;
- static bool is_randr_available = XRRQueryVersion(
- base::MessagePumpX11::GetDefaultXDisplay(),
- &randr_version_major, &randr_version_minor);
- return is_randr_available;
-}
-
-} // namespace
-
-namespace base {
-
-bool GetEDIDProperty(XID output, unsigned long* nitems, unsigned char** prop) {
- if (!IsRandRAvailable())
- return false;
-
- Display* display = base::MessagePumpX11::GetDefaultXDisplay();
-
- static Atom edid_property = XInternAtom(
- base::MessagePumpX11::GetDefaultXDisplay(),
- RR_PROPERTY_RANDR_EDID, false);
-
- bool has_edid_property = false;
- int num_properties = 0;
- Atom* properties = XRRListOutputProperties(display, output, &num_properties);
- for (int i = 0; i < num_properties; ++i) {
- if (properties[i] == edid_property) {
- has_edid_property = true;
- break;
- }
- }
- XFree(properties);
- if (!has_edid_property)
- return false;
-
- Atom actual_type;
- int actual_format;
- unsigned long bytes_after;
- XRRGetOutputProperty(display,
- output,
- edid_property,
- 0, // offset
- 128, // length
- false, // _delete
- false, // pending
- AnyPropertyType, // req_type
- &actual_type,
- &actual_format,
- nitems,
- &bytes_after,
- prop);
- DCHECK_EQ(XA_INTEGER, actual_type);
- DCHECK_EQ(8, actual_format);
- return true;
-}
-
-bool GetDisplayId(XID output_id, size_t output_index, int64* display_id_out) {
- unsigned long nitems = 0;
- unsigned char* prop = NULL;
- if (!GetEDIDProperty(output_id, &nitems, &prop))
- return false;
-
- bool result =
- GetDisplayIdFromEDID(prop, nitems, output_index, display_id_out);
- XFree(prop);
- return result;
-}
-
-bool GetDisplayIdFromEDID(const unsigned char* prop,
- unsigned long nitems,
- size_t output_index,
- int64* display_id_out) {
- uint16 manufacturer_id = 0;
- std::string product_name;
-
- // ParseOutputDeviceData fails if it doesn't have product_name.
- ParseOutputDeviceData(prop, nitems, &manufacturer_id, &product_name);
-
- // Generates product specific value from product_name instead of product code.
- // See crbug.com/240341
- uint32 product_code_hash = product_name.empty() ?
- 0 : base::Hash(product_name);
- if (manufacturer_id != 0) {
- // An ID based on display's index will be assigned later if this call
- // fails.
- *display_id_out = GetID(
- manufacturer_id, product_code_hash, output_index);
- return true;
- }
- return false;
-}
-
-bool ParseOutputDeviceData(const unsigned char* prop,
- unsigned long nitems,
- uint16* manufacturer_id,
- std::string* human_readable_name) {
- // See http://en.wikipedia.org/wiki/Extended_display_identification_data
- // for the details of EDID data format. We use the following data:
- // bytes 8-9: manufacturer EISA ID, in big-endian
- // bytes 54-125: four descriptors (18-bytes each) which may contain
- // the display name.
- const unsigned int kManufacturerOffset = 8;
- const unsigned int kManufacturerLength = 2;
- const unsigned int kDescriptorOffset = 54;
- const unsigned int kNumDescriptors = 4;
- const unsigned int kDescriptorLength = 18;
- // The specifier types.
- const unsigned char kMonitorNameDescriptor = 0xfc;
-
- if (manufacturer_id) {
- if (nitems < kManufacturerOffset + kManufacturerLength) {
- LOG(ERROR) << "too short EDID data: manifacturer id";
- return false;
- }
-
- *manufacturer_id =
- *reinterpret_cast<const uint16*>(prop + kManufacturerOffset);
-#if defined(ARCH_CPU_LITTLE_ENDIAN)
- *manufacturer_id = base::ByteSwap(*manufacturer_id);
-#endif
- }
-
- if (!human_readable_name)
- return true;
-
- human_readable_name->clear();
- for (unsigned int i = 0; i < kNumDescriptors; ++i) {
- if (nitems < kDescriptorOffset + (i + 1) * kDescriptorLength)
- break;
-
- const unsigned char* desc_buf =
- prop + kDescriptorOffset + i * kDescriptorLength;
- // If the descriptor contains the display name, it has the following
- // structure:
- // bytes 0-2, 4: \0
- // byte 3: descriptor type, defined above.
- // bytes 5-17: text data, ending with \r, padding with spaces
- // we should check bytes 0-2 and 4, since it may have other values in
- // case that the descriptor contains other type of data.
- if (desc_buf[0] == 0 && desc_buf[1] == 0 && desc_buf[2] == 0 &&
- desc_buf[4] == 0) {
- if (desc_buf[3] == kMonitorNameDescriptor) {
- std::string found_name(
- reinterpret_cast<const char*>(desc_buf + 5), kDescriptorLength - 5);
- TrimWhitespaceASCII(found_name, TRIM_TRAILING, human_readable_name);
- break;
- }
- }
- }
-
- // Verify if the |human_readable_name| consists of printable characters only.
- for (size_t i = 0; i < human_readable_name->size(); ++i) {
- char c = (*human_readable_name)[i];
- if (!isascii(c) || !isprint(c)) {
- human_readable_name->clear();
- LOG(ERROR) << "invalid EDID: human unreadable char in name";
- return false;
- }
- }
-
- return true;
-}
-
-} // namespace base
diff --git a/base/x11/edid_parser_x11.h b/base/x11/edid_parser_x11.h
deleted file mode 100644
index 0fba0b54d7..0000000000
--- a/base/x11/edid_parser_x11.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_X11_EDID_PARSER_X11_H_
-#define BASE_X11_EDID_PARSER_X11_H_
-
-#include <string>
-
-#include "base/base_export.h"
-#include "base/basictypes.h"
-
-typedef unsigned long XID;
-
-// EDID (Extended Display Identification Data) is a format for monitor
-// metadata. This provides a parser for the data and an interface to get it
-// from XRandR.
-
-namespace base {
-
-// Get the EDID data from the |output| and stores to |prop|. |nitem| will store
-// the number of characters |prop| will have. It doesn't take the ownership of
-// |prop|, so caller must release it by XFree().
-// Returns true if EDID property is successfully obtained. Otherwise returns
-// false and does not touch |prop| and |nitems|.
-BASE_EXPORT bool GetEDIDProperty(XID output,
- unsigned long* nitems,
- unsigned char** prop);
-
-// Gets the EDID data from |output| and generates the display id through
-// |GetDisplayIdFromEDID|.
-BASE_EXPORT bool GetDisplayId(XID output, size_t index,
- int64* display_id_out);
-
-// Generates the display id for the pair of |prop| with |nitems| length and
-// |index|, and store in |display_id_out|. Returns true if the display id is
-// successfully generated, or false otherwise.
-BASE_EXPORT bool GetDisplayIdFromEDID(const unsigned char* prop,
- unsigned long nitems,
- size_t index,
- int64* display_id_out);
-
-// Parses |prop| as EDID data and stores extracted data into |manufacturer_id|
-// and |human_readable_name| and returns true. NULL can be passed for unwanted
-// output parameters. Some devices (especially internal displays) may not have
-// the field for |human_readable_name|, and it will return true in that case.
-BASE_EXPORT bool ParseOutputDeviceData(const unsigned char* prop,
- unsigned long nitems,
- uint16* manufacturer_id,
- std::string* human_readable_name);
-
-} // namespace base
-
-#endif // BASE_X11_EDID_PARSER_X11_H_
diff --git a/base/x11/edid_parser_x11_unittest.cc b/base/x11/edid_parser_x11_unittest.cc
deleted file mode 100644
index 97e3ce1034..0000000000
--- a/base/x11/edid_parser_x11_unittest.cc
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/x11/edid_parser_x11.h"
-
-#include "base/memory/scoped_ptr.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-#include <X11/extensions/Xrandr.h>
-
-namespace base {
-
-namespace {
-
-// Returns the number of characters in the string literal but doesn't count its
-// terminator NULL byte.
-#define charsize(str) (arraysize(str) - 1)
-
-// Sample EDID data extracted from real devices.
-const unsigned char kNormalDisplay[] =
- "\x00\xff\xff\xff\xff\xff\xff\x00\x22\xf0\x6c\x28\x01\x01\x01\x01"
- "\x02\x16\x01\x04\xb5\x40\x28\x78\xe2\x8d\x85\xad\x4f\x35\xb1\x25"
- "\x0e\x50\x54\x00\x00\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
- "\x01\x01\x01\x01\x01\x01\xe2\x68\x00\xa0\xa0\x40\x2e\x60\x30\x20"
- "\x36\x00\x81\x90\x21\x00\x00\x1a\xbc\x1b\x00\xa0\x50\x20\x17\x30"
- "\x30\x20\x36\x00\x81\x90\x21\x00\x00\x1a\x00\x00\x00\xfc\x00\x48"
- "\x50\x20\x5a\x52\x33\x30\x77\x0a\x20\x20\x20\x20\x00\x00\x00\xff"
- "\x00\x43\x4e\x34\x32\x30\x32\x31\x33\x37\x51\x0a\x20\x20\x00\x71";
-
-const unsigned char kInternalDisplay[] =
- "\x00\xff\xff\xff\xff\xff\xff\x00\x4c\xa3\x42\x31\x00\x00\x00\x00"
- "\x00\x15\x01\x03\x80\x1a\x10\x78\x0a\xd3\xe5\x95\x5c\x60\x90\x27"
- "\x19\x50\x54\x00\x00\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
- "\x01\x01\x01\x01\x01\x01\x9e\x1b\x00\xa0\x50\x20\x12\x30\x10\x30"
- "\x13\x00\x05\xa3\x10\x00\x00\x19\x00\x00\x00\x0f\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x00\x23\x87\x02\x64\x00\x00\x00\x00\xfe\x00\x53"
- "\x41\x4d\x53\x55\x4e\x47\x0a\x20\x20\x20\x20\x20\x00\x00\x00\xfe"
- "\x00\x31\x32\x31\x41\x54\x31\x31\x2d\x38\x30\x31\x0a\x20\x00\x45";
-
-const unsigned char kOverscanDisplay[] =
- "\x00\xff\xff\xff\xff\xff\xff\x00\x4c\x2d\xfe\x08\x00\x00\x00\x00"
- "\x29\x15\x01\x03\x80\x10\x09\x78\x0a\xee\x91\xa3\x54\x4c\x99\x26"
- "\x0f\x50\x54\xbd\xef\x80\x71\x4f\x81\xc0\x81\x00\x81\x80\x95\x00"
- "\xa9\xc0\xb3\x00\x01\x01\x02\x3a\x80\x18\x71\x38\x2d\x40\x58\x2c"
- "\x45\x00\xa0\x5a\x00\x00\x00\x1e\x66\x21\x56\xaa\x51\x00\x1e\x30"
- "\x46\x8f\x33\x00\xa0\x5a\x00\x00\x00\x1e\x00\x00\x00\xfd\x00\x18"
- "\x4b\x0f\x51\x17\x00\x0a\x20\x20\x20\x20\x20\x20\x00\x00\x00\xfc"
- "\x00\x53\x41\x4d\x53\x55\x4e\x47\x0a\x20\x20\x20\x20\x20\x01\x1d"
- "\x02\x03\x1f\xf1\x47\x90\x04\x05\x03\x20\x22\x07\x23\x09\x07\x07"
- "\x83\x01\x00\x00\xe2\x00\x0f\x67\x03\x0c\x00\x20\x00\xb8\x2d\x01"
- "\x1d\x80\x18\x71\x1c\x16\x20\x58\x2c\x25\x00\xa0\x5a\x00\x00\x00"
- "\x9e\x01\x1d\x00\x72\x51\xd0\x1e\x20\x6e\x28\x55\x00\xa0\x5a\x00"
- "\x00\x00\x1e\x8c\x0a\xd0\x8a\x20\xe0\x2d\x10\x10\x3e\x96\x00\xa0"
- "\x5a\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6";
-
-const unsigned char kLP2565A[] =
- "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x22\xF0\x76\x26\x01\x01\x01\x01"
- "\x02\x12\x01\x03\x80\x34\x21\x78\xEE\xEF\x95\xA3\x54\x4C\x9B\x26"
- "\x0F\x50\x54\xA5\x6B\x80\x81\x40\x81\x80\x81\x99\x71\x00\xA9\x00"
- "\xA9\x40\xB3\x00\xD1\x00\x28\x3C\x80\xA0\x70\xB0\x23\x40\x30\x20"
- "\x36\x00\x07\x44\x21\x00\x00\x1A\x00\x00\x00\xFD\x00\x30\x55\x1E"
- "\x5E\x11\x00\x0A\x20\x20\x20\x20\x20\x20\x00\x00\x00\xFC\x00\x48"
- "\x50\x20\x4C\x50\x32\x34\x36\x35\x0A\x20\x20\x20\x00\x00\x00\xFF"
- "\x00\x43\x4E\x4B\x38\x30\x32\x30\x34\x48\x4D\x0A\x20\x20\x00\xA4";
-
-const unsigned char kLP2565B[] =
- "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x22\xF0\x75\x26\x01\x01\x01\x01"
- "\x02\x12\x01\x03\x6E\x34\x21\x78\xEE\xEF\x95\xA3\x54\x4C\x9B\x26"
- "\x0F\x50\x54\xA5\x6B\x80\x81\x40\x71\x00\xA9\x00\xA9\x40\xA9\x4F"
- "\xB3\x00\xD1\xC0\xD1\x00\x28\x3C\x80\xA0\x70\xB0\x23\x40\x30\x20"
- "\x36\x00\x07\x44\x21\x00\x00\x1A\x00\x00\x00\xFD\x00\x30\x55\x1E"
- "\x5E\x15\x00\x0A\x20\x20\x20\x20\x20\x20\x00\x00\x00\xFC\x00\x48"
- "\x50\x20\x4C\x50\x32\x34\x36\x35\x0A\x20\x20\x20\x00\x00\x00\xFF"
- "\x00\x43\x4E\x4B\x38\x30\x32\x30\x34\x48\x4D\x0A\x20\x20\x00\x45";
-
-} // namespace
-
-TEST(EdidParserX11Test, ParseEDID) {
- uint16 manufacturer_id = 0;
- std::string human_readable_name;
- EXPECT_TRUE(ParseOutputDeviceData(
- kNormalDisplay, charsize(kNormalDisplay),
- &manufacturer_id, &human_readable_name));
- EXPECT_EQ(0x22f0u, manufacturer_id);
- EXPECT_EQ("HP ZR30w", human_readable_name);
-
- manufacturer_id = 0;
- human_readable_name.clear();
- EXPECT_TRUE(ParseOutputDeviceData(
- kInternalDisplay, charsize(kInternalDisplay),
- &manufacturer_id, NULL));
- EXPECT_EQ(0x4ca3u, manufacturer_id);
- EXPECT_EQ("", human_readable_name);
-
- // Internal display doesn't have name.
- EXPECT_TRUE(ParseOutputDeviceData(
- kInternalDisplay, charsize(kInternalDisplay),
- NULL, &human_readable_name));
- EXPECT_TRUE(human_readable_name.empty());
-
- manufacturer_id = 0;
- human_readable_name.clear();
- EXPECT_TRUE(ParseOutputDeviceData(
- kOverscanDisplay, charsize(kOverscanDisplay),
- &manufacturer_id, &human_readable_name));
- EXPECT_EQ(0x4c2du, manufacturer_id);
- EXPECT_EQ("SAMSUNG", human_readable_name);
-}
-
-TEST(EdidParserX11Test, ParseBrokenEDID) {
- uint16 manufacturer_id = 0;
- std::string human_readable_name;
-
- // length == 0
- EXPECT_FALSE(ParseOutputDeviceData(
- kNormalDisplay, 0,
- &manufacturer_id, &human_readable_name));
-
- // name is broken. Copying kNormalDisplay and substitute its name data by
- // some control code.
- std::string display_data(
- reinterpret_cast<const char*>(kNormalDisplay), charsize(kNormalDisplay));
-
- // display's name data is embedded in byte 95-107 in this specific example.
- // Fix here too when the contents of kNormalDisplay is altered.
- display_data[97] = '\x1b';
- EXPECT_FALSE(ParseOutputDeviceData(
- reinterpret_cast<const unsigned char*>(display_data.data()),
- display_data.size(),
- &manufacturer_id, &human_readable_name));
-
- // If |human_readable_name| isn't specified, it skips parsing the name.
- manufacturer_id = 0;
- EXPECT_TRUE(ParseOutputDeviceData(
- reinterpret_cast<const unsigned char*>(display_data.data()),
- display_data.size(),
- &manufacturer_id, NULL));
- EXPECT_EQ(0x22f0u, manufacturer_id);
-}
-
-TEST(EdidParserX11Test, GetDisplayId) {
- // EDID of kLP2565A and B are slightly different but actually the same device.
- int64 id1 = -1;
- int64 id2 = -1;
- EXPECT_TRUE(GetDisplayIdFromEDID(kLP2565A, charsize(kLP2565A), 0, &id1));
- EXPECT_TRUE(GetDisplayIdFromEDID(kLP2565B, charsize(kLP2565B), 0, &id2));
- EXPECT_EQ(id1, id2);
- EXPECT_NE(-1, id1);
-}
-
-TEST(EdidParserX11Test, GetDisplayIdFromInternal) {
- int64 id = -1;
- EXPECT_TRUE(GetDisplayIdFromEDID(
- kInternalDisplay, charsize(kInternalDisplay), 0, &id));
- EXPECT_NE(-1, id);
-}
-
-TEST(EdidParserX11Test, GetDisplayIdFailure) {
- int64 id = -1;
- EXPECT_FALSE(GetDisplayIdFromEDID(NULL, 0, 0, &id));
- EXPECT_EQ(-1, id);
-}
-
-} // namespace base