summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-02-25 08:25:04 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-02-25 08:25:04 +0000
commitb6fcee758cbc64842e10cb155780818aaad02420 (patch)
tree50de4fa99f372c8487f3485b417746ee4fa67c42
parent0949aabd636513c1b4fc79c0eea75b1bf2651782 (diff)
parentcd90a4935502d52303dba2d09a4980e9535c7d1c (diff)
downloadlibchrome-pie-gsi.tar.gz
Snap for 4620899 from cd90a4935502d52303dba2d09a4980e9535c7d1c to pi-releaseandroid-wear-9.0.0_r9android-wear-9.0.0_r8android-wear-9.0.0_r7android-wear-9.0.0_r6android-wear-9.0.0_r5android-wear-9.0.0_r4android-wear-9.0.0_r34android-wear-9.0.0_r33android-wear-9.0.0_r32android-wear-9.0.0_r31android-wear-9.0.0_r30android-wear-9.0.0_r3android-wear-9.0.0_r29android-wear-9.0.0_r28android-wear-9.0.0_r27android-wear-9.0.0_r26android-wear-9.0.0_r25android-wear-9.0.0_r24android-wear-9.0.0_r23android-wear-9.0.0_r22android-wear-9.0.0_r21android-wear-9.0.0_r20android-wear-9.0.0_r2android-wear-9.0.0_r19android-wear-9.0.0_r18android-wear-9.0.0_r17android-wear-9.0.0_r16android-wear-9.0.0_r15android-wear-9.0.0_r14android-wear-9.0.0_r13android-wear-9.0.0_r12android-wear-9.0.0_r11android-wear-9.0.0_r10android-wear-9.0.0_r1android-vts-9.0_r9android-vts-9.0_r8android-vts-9.0_r7android-vts-9.0_r6android-vts-9.0_r5android-vts-9.0_r4android-vts-9.0_r19android-vts-9.0_r18android-vts-9.0_r17android-vts-9.0_r16android-vts-9.0_r15android-vts-9.0_r14android-vts-9.0_r13android-vts-9.0_r12android-vts-9.0_r11android-vts-9.0_r10android-security-9.0.0_r76android-security-9.0.0_r75android-security-9.0.0_r74android-security-9.0.0_r73android-security-9.0.0_r72android-security-9.0.0_r71android-security-9.0.0_r70android-security-9.0.0_r69android-security-9.0.0_r68android-security-9.0.0_r67android-security-9.0.0_r66android-security-9.0.0_r65android-security-9.0.0_r64android-security-9.0.0_r63android-security-9.0.0_r62android-cts-9.0_r9android-cts-9.0_r8android-cts-9.0_r7android-cts-9.0_r6android-cts-9.0_r5android-cts-9.0_r4android-cts-9.0_r3android-cts-9.0_r20android-cts-9.0_r2android-cts-9.0_r19android-cts-9.0_r18android-cts-9.0_r17android-cts-9.0_r16android-cts-9.0_r15android-cts-9.0_r14android-cts-9.0_r13android-cts-9.0_r12android-cts-9.0_r11android-cts-9.0_r10android-cts-9.0_r1android-9.0.0_r9android-9.0.0_r8android-9.0.0_r7android-9.0.0_r61android-9.0.0_r60android-9.0.0_r6android-9.0.0_r59android-9.0.0_r58android-9.0.0_r57android-9.0.0_r56android-9.0.0_r55android-9.0.0_r54android-9.0.0_r53android-9.0.0_r52android-9.0.0_r51android-9.0.0_r50android-9.0.0_r5android-9.0.0_r49android-9.0.0_r48android-9.0.0_r3android-9.0.0_r2android-9.0.0_r18android-9.0.0_r17android-9.0.0_r10android-9.0.0_r1security-pi-releasepie-vts-releasepie-security-releasepie-s2-releasepie-release-2pie-releasepie-r2-s2-releasepie-r2-s1-releasepie-r2-releasepie-platform-releasepie-gsipie-cuttlefish-testingpie-cts-release
Change-Id: I95b379f832d9476f924b3ce7b44fffd551f78c33
-rw-r--r--base/BUILD.gn2693
-rw-r--r--base/allocator/BUILD.gn309
-rw-r--r--base/i18n/base_i18n_export.h29
-rw-r--r--base/ios/block_types.h14
-rw-r--r--base/macros.h7
-rw-r--r--base/message_loop/message_loop.cc2
-rw-r--r--base/message_loop/message_loop.h3
-rw-r--r--base/metrics/sample_map_unittest.cc9
-rw-r--r--base/metrics/sample_vector_unittest.cc35
-rw-r--r--base/process/process_posix.cc5
-rw-r--r--base/strings/string_util.h6
-rw-r--r--base/synchronization/lock_impl_posix.cc2
-rw-r--r--base/sys_info_posix.cc5
-rw-r--r--base/test/BUILD.gn377
-rw-r--r--base/threading/non_thread_safe_unittest.cc8
-rw-r--r--base/trace_event/common/trace_event_common.h9
-rw-r--r--base/trace_event/etw_manifest/BUILD.gn29
-rw-r--r--base/trace_event/etw_manifest/chrome_events_win.man84
-rw-r--r--base/win/event_trace_consumer.h150
-rw-r--r--base/win/scoped_co_mem.h68
-rw-r--r--base/win/scoped_com_initializer.h79
-rw-r--r--base/win/scoped_comptr.h168
-rw-r--r--base/win/scoped_gdi_object.h45
-rw-r--r--base/win/scoped_handle_test_dll.cc125
-rw-r--r--base/win/scoped_hdc.h78
-rw-r--r--base/win/scoped_hglobal.h53
-rw-r--r--base/win/scoped_propvariant.h58
-rw-r--r--base/win/scoped_select_object.h43
-rw-r--r--base/win/windows_version_unittest.cc22
-rw-r--r--components/timers/BUILD.gn28
-rw-r--r--crypto/BUILD.gn225
-rw-r--r--dbus/BUILD.gn132
32 files changed, 26 insertions, 4874 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn
deleted file mode 100644
index 069de984e2..0000000000
--- a/base/BUILD.gn
+++ /dev/null
@@ -1,2693 +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.
-
-# HOW TO WRITE CONDITIONALS IN THIS FILE
-# ======================================
-#
-# In many other places, one would write a conditional that expresses all the
-# cases when a source file is used or unused, and then either add or subtract
-# it from the sources list in that case
-#
-# Since base includes so many low-level things that vary widely and
-# unpredictably for the various build types, we prefer a slightly different
-# style. Instead, there are big per-platform blocks of inclusions and
-# exclusions. If a given file has an inclusion or exclusion rule that applies
-# for multiple conditions, prefer to duplicate it in both lists. This makes it
-# a bit easier to see which files apply in which cases rather than having a
-# huge sequence of random-looking conditionals.
-
-import("//build/buildflag_header.gni")
-import("//build/config/allocator.gni")
-import("//build/config/arm.gni")
-import("//build/config/chromecast_build.gni")
-import("//build/config/clang/clang.gni")
-import("//build/config/compiler/compiler.gni")
-import("//build/config/dcheck_always_on.gni")
-import("//build/config/nacl/config.gni")
-import("//build/config/sysroot.gni")
-import("//build/config/ui.gni")
-import("//build/nocompile.gni")
-import("//testing/libfuzzer/fuzzer_test.gni")
-import("//testing/test.gni")
-
-declare_args() {
- # Override this value to give a specific build date.
- # See //base/build_time.cc and //build/write_build_date_header.py for more
- # details and the expected format.
- override_build_date = "N/A"
-
- # Turn on memory profiling in the task profiler when the heap shim is
- # available. Profiling can then be enabled at runtime by passing the command
- # line flag --enable-heap-profiling=task-profiler.
- enable_memory_task_profiler = use_experimental_allocator_shim
-
- # Partition alloc is included by default except iOS.
- use_partition_alloc = !is_ios
-}
-
-if (is_android) {
- import("//build/config/android/rules.gni")
-}
-
-config("base_flags") {
- if (is_clang) {
- cflags = [
- # Don't die on dtoa code that uses a char as an array index.
- # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc.
- "-Wno-char-subscripts",
- ]
- }
-}
-
-config("base_implementation") {
- defines = [ "BASE_IMPLEMENTATION" ]
- configs = [ "//build/config/compiler:wexit_time_destructors" ]
-}
-
-if (is_win) {
- # This is in a separate config so the flags can be applied to dependents.
- # ldflags in GN aren't automatically inherited.
- config("base_win_linker_flags") {
- ldflags = [
- "/DELAYLOAD:cfgmgr32.dll",
- "/DELAYLOAD:powrprof.dll",
- "/DELAYLOAD:setupapi.dll",
- ]
- }
-}
-
-if (is_nacl_nonsfi) {
- # Must be in a config because of how GN orders flags (otherwise -Wall will
- # appear after this, and turn it back on).
- config("nacl_nonsfi_warnings") {
- # file_util_posix.cc contains a function which is not
- # being used by nacl_helper_nonsfi.
- cflags = [ "-Wno-unused-function" ]
- }
-}
-
-if (is_nacl) {
- # None of the files apply to nacl, and we can't make an empty static library.
- group("base_paths") {
- }
-} else {
- static_library("base_paths") {
- sources = [
- "base_paths.cc",
- "base_paths.h",
- "base_paths_android.cc",
- "base_paths_android.h",
- "base_paths_mac.h",
- "base_paths_mac.mm",
- "base_paths_posix.cc",
- "base_paths_posix.h",
- "base_paths_win.cc",
- "base_paths_win.h",
- ]
-
- if (is_android || is_mac || is_ios) {
- sources -= [ "base_paths_posix.cc" ]
- }
-
- configs += [ ":base_implementation" ]
-
- visibility = [ ":base" ]
- }
-}
-
-if (is_android) {
- config("android_system_libs") {
- libs = [ "log" ] # Used by logging.cc.
- }
-}
-
-# Base and everything it depends on should be a static library rather than
-# a source set. Base is more of a "library" in the classic sense in that many
-# small parts of it are used in many different contexts. This combined with a
-# few static initializers floating around means that dead code stripping
-# still leaves a lot of code behind that isn't always used. For example, this
-# saves more than 40K for a smaller target like chrome_elf.
-#
-# Use static libraries for the helper stuff as well like //base/debug since
-# those things refer back to base code, which will force base compilation units
-# to be linked in where they wouldn't have otherwise. This does not include
-# test code (test support and anything in the test directory) which should use
-# source_set as is recommended for GN targets).
-component("base") {
- if (is_nacl_nonsfi) {
- # TODO(phosek) bug 570839: If field_trial.cc is in a static library,
- # nacl_helper_nonsfi doesn't link properly on Linux in debug builds. The
- # reasons for this seem to involve obscure toolchain bugs. This should be
- # fixed and this target should always be a static_library in the
- # non-component case.
- static_component_type = "source_set"
- }
-
- sources = [
- "allocator/allocator_check.cc",
- "allocator/allocator_check.h",
- "allocator/allocator_extension.cc",
- "allocator/allocator_extension.h",
- "allocator/allocator_interception_mac.h",
- "allocator/allocator_interception_mac.mm",
- "allocator/allocator_shim.h",
- "allocator/malloc_zone_functions_mac.cc",
- "allocator/malloc_zone_functions_mac.h",
- "android/animation_frame_time_histogram.cc",
- "android/animation_frame_time_histogram.h",
- "android/apk_assets.cc",
- "android/apk_assets.h",
- "android/application_status_listener.cc",
- "android/application_status_listener.h",
- "android/base_jni_onload.cc",
- "android/base_jni_onload.h",
- "android/base_jni_registrar.cc",
- "android/base_jni_registrar.h",
- "android/build_info.cc",
- "android/build_info.h",
- "android/callback_android.cc",
- "android/callback_android.h",
- "android/command_line_android.cc",
- "android/command_line_android.h",
- "android/content_uri_utils.cc",
- "android/content_uri_utils.h",
- "android/context_utils.cc",
- "android/context_utils.h",
- "android/cpu_features.cc",
- "android/cpu_features.h",
- "android/cxa_demangle_stub.cc",
- "android/early_trace_event_binding.cc",
- "android/early_trace_event_binding.h",
- "android/event_log.cc",
- "android/event_log.h",
- "android/field_trial_list.cc",
- "android/field_trial_list.h",
- "android/important_file_writer_android.cc",
- "android/important_file_writer_android.h",
- "android/java_exception_reporter.cc",
- "android/java_exception_reporter.h",
- "android/java_handler_thread.cc",
- "android/java_handler_thread.h",
- "android/java_message_handler_factory.h",
- "android/java_runtime.cc",
- "android/java_runtime.h",
- "android/jni_android.cc",
- "android/jni_android.h",
- "android/jni_array.cc",
- "android/jni_array.h",
- "android/jni_generator/jni_generator_helper.h",
- "android/jni_int_wrapper.h",
- "android/jni_registrar.cc",
- "android/jni_registrar.h",
- "android/jni_string.cc",
- "android/jni_string.h",
- "android/jni_utils.cc",
- "android/jni_utils.h",
- "android/jni_weak_ref.cc",
- "android/jni_weak_ref.h",
- "android/library_loader/library_load_from_apk_status_codes.h",
- "android/library_loader/library_loader_hooks.cc",
- "android/library_loader/library_loader_hooks.h",
- "android/library_loader/library_prefetcher.cc",
- "android/library_loader/library_prefetcher.h",
- "android/locale_utils.cc",
- "android/locale_utils.h",
- "android/memory_pressure_listener_android.cc",
- "android/memory_pressure_listener_android.h",
- "android/path_service_android.cc",
- "android/path_service_android.h",
- "android/path_utils.cc",
- "android/path_utils.h",
- "android/record_histogram.cc",
- "android/record_histogram.h",
- "android/record_user_action.cc",
- "android/record_user_action.h",
- "android/scoped_java_ref.cc",
- "android/scoped_java_ref.h",
- "android/statistics_recorder_android.cc",
- "android/statistics_recorder_android.h",
- "android/sys_utils.cc",
- "android/sys_utils.h",
- "android/throw_uncaught_exception.cc",
- "android/throw_uncaught_exception.h",
- "android/time_utils.cc",
- "android/time_utils.h",
- "android/trace_event_binding.cc",
- "android/trace_event_binding.h",
- "android/unguessable_token_android.cc",
- "android/unguessable_token_android.h",
- "at_exit.cc",
- "at_exit.h",
- "atomic_ref_count.h",
- "atomic_sequence_num.h",
- "atomicops.h",
- "atomicops_internals_atomicword_compat.h",
- "atomicops_internals_portable.h",
- "atomicops_internals_x86_msvc.h",
- "auto_reset.h",
- "barrier_closure.cc",
- "barrier_closure.h",
- "base64.cc",
- "base64.h",
- "base64url.cc",
- "base64url.h",
- "base_export.h",
- "base_switches.h",
- "big_endian.cc",
- "big_endian.h",
- "bind.h",
- "bind_helpers.cc",
- "bind_helpers.h",
- "bind_internal.h",
- "bit_cast.h",
- "bits.h",
- "build_time.cc",
- "build_time.h",
- "callback.h",
- "callback_forward.h",
- "callback_helpers.cc",
- "callback_helpers.h",
- "callback_internal.cc",
- "callback_internal.h",
- "callback_list.h",
- "cancelable_callback.h",
- "command_line.cc",
- "command_line.h",
- "compiler_specific.h",
- "containers/adapters.h",
- "containers/flat_map.h",
- "containers/flat_set.h",
- "containers/flat_tree.h",
- "containers/hash_tables.h",
- "containers/linked_list.h",
- "containers/mru_cache.h",
- "containers/small_map.h",
- "containers/stack_container.h",
- "cpu.cc",
- "cpu.h",
- "critical_closure.h",
- "critical_closure_internal_ios.mm",
-
- # This file depends on files from the "debug/allocator" target,
- # but this target does not depend on "debug/allocator".
- "debug/activity_analyzer.cc",
- "debug/activity_analyzer.h",
- "debug/activity_tracker.cc",
- "debug/activity_tracker.h",
- "debug/alias.cc",
- "debug/alias.h",
- "debug/asan_invalid_access.cc",
- "debug/asan_invalid_access.h",
- "debug/close_handle_hook_win.cc",
- "debug/close_handle_hook_win.h",
- "debug/crash_logging.cc",
- "debug/crash_logging.h",
- "debug/debugger.cc",
- "debug/debugger.h",
- "debug/debugger_posix.cc",
- "debug/debugger_win.cc",
- "debug/dump_without_crashing.cc",
- "debug/dump_without_crashing.h",
- "debug/gdi_debug_util_win.cc",
- "debug/gdi_debug_util_win.h",
- "debug/leak_annotations.h",
- "debug/leak_tracker.h",
- "debug/proc_maps_linux.cc",
- "debug/proc_maps_linux.h",
- "debug/profiler.cc",
- "debug/profiler.h",
- "debug/stack_trace.cc",
- "debug/stack_trace.h",
- "debug/stack_trace_android.cc",
- "debug/stack_trace_posix.cc",
- "debug/stack_trace_win.cc",
- "debug/task_annotator.cc",
- "debug/task_annotator.h",
- "debug/thread_heap_usage_tracker.cc",
- "debug/thread_heap_usage_tracker.h",
- "deferred_sequenced_task_runner.cc",
- "deferred_sequenced_task_runner.h",
- "environment.cc",
- "environment.h",
- "event_types.h",
- "feature_list.cc",
- "feature_list.h",
- "file_descriptor_posix.h",
- "file_descriptor_store.cc",
- "file_descriptor_store.h",
- "file_version_info.h",
- "file_version_info_mac.h",
- "file_version_info_mac.mm",
- "file_version_info_win.cc",
- "file_version_info_win.h",
- "files/dir_reader_fallback.h",
- "files/dir_reader_linux.h",
- "files/dir_reader_posix.h",
- "files/file.cc",
- "files/file.h",
- "files/file_descriptor_watcher_posix.cc",
- "files/file_descriptor_watcher_posix.h",
- "files/file_enumerator.cc",
- "files/file_enumerator.h",
- "files/file_enumerator_posix.cc",
- "files/file_enumerator_win.cc",
- "files/file_path.cc",
- "files/file_path.h",
- "files/file_path_constants.cc",
- "files/file_path_watcher.cc",
- "files/file_path_watcher.h",
- "files/file_path_watcher_fsevents.cc",
- "files/file_path_watcher_fsevents.h",
- "files/file_path_watcher_kqueue.cc",
- "files/file_path_watcher_kqueue.h",
- "files/file_path_watcher_linux.cc",
- "files/file_path_watcher_mac.cc",
- "files/file_path_watcher_win.cc",
- "files/file_posix.cc",
- "files/file_proxy.cc",
- "files/file_proxy.h",
- "files/file_tracing.cc",
- "files/file_tracing.h",
- "files/file_util.cc",
- "files/file_util.h",
- "files/file_util_android.cc",
- "files/file_util_linux.cc",
- "files/file_util_mac.mm",
- "files/file_util_posix.cc",
- "files/file_util_proxy.cc",
- "files/file_util_proxy.h",
- "files/file_util_win.cc",
- "files/file_win.cc",
- "files/important_file_writer.cc",
- "files/important_file_writer.h",
- "files/memory_mapped_file.cc",
- "files/memory_mapped_file.h",
- "files/memory_mapped_file_posix.cc",
- "files/memory_mapped_file_win.cc",
- "files/scoped_file.cc",
- "files/scoped_file.h",
- "files/scoped_platform_handle.cc",
- "files/scoped_platform_handle.h",
- "files/scoped_platform_handle_posix.cc",
- "files/scoped_platform_handle_win.cc",
- "files/scoped_temp_dir.cc",
- "files/scoped_temp_dir.h",
- "format_macros.h",
- "gtest_prod_util.h",
- "guid.cc",
- "guid.h",
- "hash.cc",
- "hash.h",
- "id_map.h",
- "ios/block_types.h",
- "ios/crb_protocol_observers.h",
- "ios/crb_protocol_observers.mm",
- "ios/device_util.h",
- "ios/device_util.mm",
- "ios/ios_util.h",
- "ios/ios_util.mm",
- "ios/ns_error_util.h",
- "ios/ns_error_util.mm",
- "ios/scoped_critical_action.h",
- "ios/scoped_critical_action.mm",
- "ios/weak_nsobject.h",
- "ios/weak_nsobject.mm",
- "json/json_file_value_serializer.cc",
- "json/json_file_value_serializer.h",
- "json/json_parser.cc",
- "json/json_parser.h",
- "json/json_reader.cc",
- "json/json_reader.h",
- "json/json_string_value_serializer.cc",
- "json/json_string_value_serializer.h",
- "json/json_value_converter.cc",
- "json/json_value_converter.h",
- "json/json_writer.cc",
- "json/json_writer.h",
- "json/string_escape.cc",
- "json/string_escape.h",
- "lazy_instance.cc",
- "lazy_instance.h",
- "linux_util.cc",
- "linux_util.h",
- "location.cc",
- "location.h",
- "logging.cc",
- "logging.h",
- "logging_win.cc",
- "logging_win.h",
- "mac/authorization_util.h",
- "mac/authorization_util.mm",
- "mac/bind_objc_block.h",
- "mac/bundle_locations.h",
- "mac/bundle_locations.mm",
- "mac/call_with_eh_frame.cc",
- "mac/call_with_eh_frame.h",
- "mac/call_with_eh_frame_asm.S",
- "mac/close_nocancel.cc",
- "mac/cocoa_protocols.h",
- "mac/dispatch_source_mach.cc",
- "mac/dispatch_source_mach.h",
- "mac/foundation_util.h",
- "mac/foundation_util.mm",
- "mac/launch_services_util.h",
- "mac/launch_services_util.mm",
- "mac/launchd.cc",
- "mac/launchd.h",
- "mac/mac_logging.h",
- "mac/mac_logging.mm",
- "mac/mac_util.h",
- "mac/mac_util.mm",
- "mac/mach_logging.cc",
- "mac/mach_logging.h",
- "mac/mach_port_broker.h",
- "mac/mach_port_broker.mm",
- "mac/mach_port_util.cc",
- "mac/mach_port_util.h",
- "mac/objc_property_releaser.h",
- "mac/objc_property_releaser.mm",
- "mac/objc_release_properties.h",
- "mac/objc_release_properties.mm",
- "mac/os_crash_dumps.cc",
- "mac/os_crash_dumps.h",
- "mac/scoped_aedesc.h",
- "mac/scoped_authorizationref.h",
- "mac/scoped_block.h",
- "mac/scoped_cffiledescriptorref.h",
- "mac/scoped_cftyperef.h",
- "mac/scoped_dispatch_object.h",
- "mac/scoped_ionotificationportref.h",
- "mac/scoped_ioobject.h",
- "mac/scoped_ioplugininterface.h",
- "mac/scoped_launch_data.h",
- "mac/scoped_mach_port.cc",
- "mac/scoped_mach_port.h",
- "mac/scoped_mach_vm.cc",
- "mac/scoped_mach_vm.h",
- "mac/scoped_nsautorelease_pool.h",
- "mac/scoped_nsautorelease_pool.mm",
- "mac/scoped_nsobject.h",
- "mac/scoped_nsobject.mm",
- "mac/scoped_objc_class_swizzler.h",
- "mac/scoped_objc_class_swizzler.mm",
- "mac/scoped_sending_event.h",
- "mac/scoped_sending_event.mm",
- "mac/sdk_forward_declarations.h",
- "mac/sdk_forward_declarations.mm",
- "macros.h",
- "md5.cc",
- "md5.h",
- "memory/aligned_memory.cc",
- "memory/aligned_memory.h",
- "memory/discardable_memory.cc",
- "memory/discardable_memory.h",
- "memory/discardable_memory_allocator.cc",
- "memory/discardable_memory_allocator.h",
- "memory/discardable_shared_memory.cc",
- "memory/discardable_shared_memory.h",
- "memory/free_deleter.h",
- "memory/linked_ptr.h",
- "memory/manual_constructor.h",
- "memory/memory_coordinator_client.cc",
- "memory/memory_coordinator_client.h",
- "memory/memory_coordinator_client_registry.cc",
- "memory/memory_coordinator_client_registry.h",
- "memory/memory_coordinator_proxy.cc",
- "memory/memory_coordinator_proxy.h",
- "memory/memory_pressure_listener.cc",
- "memory/memory_pressure_listener.h",
- "memory/memory_pressure_monitor.cc",
- "memory/memory_pressure_monitor.h",
- "memory/memory_pressure_monitor_chromeos.cc",
- "memory/memory_pressure_monitor_chromeos.h",
- "memory/memory_pressure_monitor_mac.cc",
- "memory/memory_pressure_monitor_mac.h",
- "memory/memory_pressure_monitor_win.cc",
- "memory/memory_pressure_monitor_win.h",
- "memory/ptr_util.h",
- "memory/raw_scoped_refptr_mismatch_checker.h",
- "memory/ref_counted.cc",
- "memory/ref_counted.h",
- "memory/ref_counted_delete_on_sequence.h",
- "memory/ref_counted_memory.cc",
- "memory/ref_counted_memory.h",
- "memory/scoped_policy.h",
- "memory/scoped_vector.h",
- "memory/shared_memory.h",
- "memory/shared_memory_android.cc",
- "memory/shared_memory_handle.h",
- "memory/shared_memory_handle_mac.cc",
- "memory/shared_memory_handle_win.cc",
- "memory/shared_memory_helper.cc",
- "memory/shared_memory_helper.h",
- "memory/shared_memory_mac.cc",
- "memory/shared_memory_nacl.cc",
- "memory/shared_memory_posix.cc",
- "memory/shared_memory_win.cc",
- "memory/singleton.cc",
- "memory/singleton.h",
- "memory/weak_ptr.cc",
- "memory/weak_ptr.h",
- "message_loop/incoming_task_queue.cc",
- "message_loop/incoming_task_queue.h",
- "message_loop/message_loop.cc",
- "message_loop/message_loop.h",
- "message_loop/message_loop_task_runner.cc",
- "message_loop/message_loop_task_runner.h",
- "message_loop/message_pump.cc",
- "message_loop/message_pump.h",
- "message_loop/message_pump_android.cc",
- "message_loop/message_pump_android.h",
- "message_loop/message_pump_default.cc",
- "message_loop/message_pump_default.h",
- "message_loop/message_pump_glib.cc",
- "message_loop/message_pump_glib.h",
- "message_loop/message_pump_io_ios.cc",
- "message_loop/message_pump_io_ios.h",
- "message_loop/message_pump_libevent.cc",
- "message_loop/message_pump_libevent.h",
- "message_loop/message_pump_mac.h",
- "message_loop/message_pump_mac.mm",
- "message_loop/message_pump_win.cc",
- "message_loop/message_pump_win.h",
- "message_loop/timer_slack.h",
- "metrics/bucket_ranges.cc",
- "metrics/bucket_ranges.h",
- "metrics/field_trial.cc",
- "metrics/field_trial.h",
- "metrics/field_trial_param_associator.cc",
- "metrics/field_trial_param_associator.h",
- "metrics/field_trial_params.cc",
- "metrics/field_trial_params.h",
- "metrics/histogram.cc",
- "metrics/histogram.h",
- "metrics/histogram_base.cc",
- "metrics/histogram_base.h",
- "metrics/histogram_delta_serialization.cc",
- "metrics/histogram_delta_serialization.h",
- "metrics/histogram_flattener.h",
- "metrics/histogram_functions.cc",
- "metrics/histogram_functions.h",
- "metrics/histogram_macros.h",
- "metrics/histogram_macros_internal.h",
- "metrics/histogram_macros_local.h",
- "metrics/histogram_samples.cc",
- "metrics/histogram_samples.h",
- "metrics/histogram_snapshot_manager.cc",
- "metrics/histogram_snapshot_manager.h",
- "metrics/metrics_hashes.cc",
- "metrics/metrics_hashes.h",
- "metrics/persistent_histogram_allocator.cc",
- "metrics/persistent_histogram_allocator.h",
- "metrics/persistent_memory_allocator.cc",
- "metrics/persistent_memory_allocator.h",
- "metrics/persistent_sample_map.cc",
- "metrics/persistent_sample_map.h",
- "metrics/sample_map.cc",
- "metrics/sample_map.h",
- "metrics/sample_vector.cc",
- "metrics/sample_vector.h",
- "metrics/sparse_histogram.cc",
- "metrics/sparse_histogram.h",
- "metrics/statistics_recorder.cc",
- "metrics/statistics_recorder.h",
- "metrics/user_metrics.cc",
- "metrics/user_metrics.h",
- "metrics/user_metrics_action.h",
- "native_library.cc",
- "native_library.h",
- "native_library_ios.mm",
- "native_library_mac.mm",
- "native_library_posix.cc",
- "native_library_win.cc",
- "nix/mime_util_xdg.cc",
- "nix/mime_util_xdg.h",
- "nix/xdg_util.cc",
- "nix/xdg_util.h",
- "numerics/safe_conversions.h",
- "numerics/safe_conversions_impl.h",
- "numerics/safe_math.h",
- "numerics/safe_math_impl.h",
- "numerics/saturated_arithmetic.h",
- "numerics/saturated_arithmetic_arm.h",
- "observer_list.h",
- "observer_list_threadsafe.h",
- "optional.h",
- "os_compat_android.cc",
- "os_compat_android.h",
- "os_compat_nacl.cc",
- "os_compat_nacl.h",
- "path_service.cc",
- "path_service.h",
- "pending_task.cc",
- "pending_task.h",
- "pickle.cc",
- "pickle.h",
- "posix/eintr_wrapper.h",
- "posix/file_descriptor_shuffle.cc",
- "posix/file_descriptor_shuffle.h",
- "posix/global_descriptors.cc",
- "posix/global_descriptors.h",
- "posix/safe_strerror.cc",
- "posix/safe_strerror.h",
- "posix/unix_domain_socket_linux.cc",
- "posix/unix_domain_socket_linux.h",
- "post_task_and_reply_with_result_internal.h",
- "power_monitor/power_monitor.cc",
- "power_monitor/power_monitor.h",
- "power_monitor/power_monitor_device_source.cc",
- "power_monitor/power_monitor_device_source.h",
- "power_monitor/power_monitor_source.cc",
- "power_monitor/power_monitor_source.h",
- "power_monitor/power_observer.h",
- "process/internal_linux.cc",
- "process/internal_linux.h",
- "process/kill.cc",
- "process/kill.h",
- "process/kill_mac.cc",
- "process/kill_posix.cc",
- "process/kill_win.cc",
- "process/launch.cc",
- "process/launch.h",
- "process/launch_ios.cc",
- "process/launch_mac.cc",
- "process/launch_posix.cc",
- "process/launch_win.cc",
- "process/memory.cc",
- "process/memory.h",
- "process/memory_linux.cc",
- "process/memory_mac.mm",
- "process/memory_win.cc",
- "process/port_provider_mac.cc",
- "process/port_provider_mac.h",
- "process/process.h",
- "process/process_handle.cc",
- "process/process_handle.h",
-
- #"process/process_handle_freebsd.cc", # Unused in Chromium build.
- "process/process_handle_linux.cc",
- "process/process_handle_mac.cc",
-
- #"process/process_handle_openbsd.cc", # Unused in Chromium build.
- "process/process_handle_posix.cc",
- "process/process_handle_win.cc",
- "process/process_info.h",
- "process/process_info_linux.cc",
- "process/process_info_mac.cc",
- "process/process_info_win.cc",
- "process/process_iterator.cc",
- "process/process_iterator.h",
-
- #"process/process_iterator_freebsd.cc", # Unused in Chromium build.
- "process/process_iterator_linux.cc",
- "process/process_iterator_mac.cc",
-
- #"process/process_iterator_openbsd.cc", # Unused in Chromium build.
- "process/process_iterator_win.cc",
- "process/process_linux.cc",
- "process/process_mac.cc",
- "process/process_metrics.cc",
- "process/process_metrics.h",
-
- #"process/process_metrics_freebsd.cc", # Unused in Chromium build.
- "process/process_metrics_ios.cc",
- "process/process_metrics_linux.cc",
- "process/process_metrics_mac.cc",
-
- #"process/process_metrics_openbsd.cc", # Unused in Chromium build.
- "process/process_metrics_posix.cc",
- "process/process_metrics_win.cc",
- "process/process_posix.cc",
- "process/process_win.cc",
- "profiler/native_stack_sampler.cc",
- "profiler/native_stack_sampler.h",
- "profiler/native_stack_sampler_posix.cc",
- "profiler/native_stack_sampler_win.cc",
- "profiler/scoped_profile.cc",
- "profiler/scoped_profile.h",
- "profiler/scoped_tracker.cc",
- "profiler/scoped_tracker.h",
- "profiler/stack_sampling_profiler.cc",
- "profiler/stack_sampling_profiler.h",
- "profiler/tracked_time.cc",
- "profiler/tracked_time.h",
- "rand_util.cc",
- "rand_util.h",
- "rand_util_nacl.cc",
- "rand_util_posix.cc",
- "rand_util_win.cc",
- "run_loop.cc",
- "run_loop.h",
- "scoped_clear_errno.h",
- "scoped_generic.h",
- "scoped_native_library.cc",
- "scoped_native_library.h",
- "scoped_observer.h",
- "sequence_checker.h",
- "sequence_checker_impl.cc",
- "sequence_checker_impl.h",
- "sequence_token.cc",
- "sequence_token.h",
- "sequenced_task_runner.cc",
- "sequenced_task_runner.h",
- "sequenced_task_runner_helpers.h",
- "sha1.cc",
- "sha1.h",
- "single_thread_task_runner.h",
- "stl_util.h",
- "strings/latin1_string_conversions.cc",
- "strings/latin1_string_conversions.h",
- "strings/nullable_string16.cc",
- "strings/nullable_string16.h",
- "strings/pattern.cc",
- "strings/pattern.h",
- "strings/safe_sprintf.cc",
- "strings/safe_sprintf.h",
- "strings/string16.cc",
- "strings/string16.h",
- "strings/string_number_conversions.cc",
- "strings/string_number_conversions.h",
- "strings/string_piece.cc",
- "strings/string_piece.h",
- "strings/string_split.cc",
- "strings/string_split.h",
- "strings/string_tokenizer.h",
- "strings/string_util.cc",
- "strings/string_util.h",
- "strings/string_util_constants.cc",
- "strings/string_util_posix.h",
- "strings/string_util_win.h",
- "strings/stringize_macros.h",
- "strings/stringprintf.cc",
- "strings/stringprintf.h",
- "strings/sys_string_conversions.h",
- "strings/sys_string_conversions_mac.mm",
- "strings/sys_string_conversions_posix.cc",
- "strings/sys_string_conversions_win.cc",
- "strings/utf_offset_string_conversions.cc",
- "strings/utf_offset_string_conversions.h",
- "strings/utf_string_conversion_utils.cc",
- "strings/utf_string_conversion_utils.h",
- "strings/utf_string_conversions.cc",
- "strings/utf_string_conversions.h",
- "supports_user_data.cc",
- "supports_user_data.h",
- "sync_socket.h",
- "sync_socket_posix.cc",
- "sync_socket_win.cc",
- "synchronization/atomic_flag.cc",
- "synchronization/atomic_flag.h",
- "synchronization/cancellation_flag.h",
- "synchronization/condition_variable.h",
- "synchronization/condition_variable_posix.cc",
- "synchronization/condition_variable_win.cc",
- "synchronization/lock.cc",
- "synchronization/lock.h",
- "synchronization/lock_impl.h",
- "synchronization/lock_impl_posix.cc",
- "synchronization/lock_impl_win.cc",
- "synchronization/read_write_lock.h",
- "synchronization/read_write_lock_nacl.cc",
- "synchronization/read_write_lock_posix.cc",
- "synchronization/read_write_lock_win.cc",
- "synchronization/spin_wait.h",
- "synchronization/waitable_event.h",
- "synchronization/waitable_event_posix.cc",
- "synchronization/waitable_event_watcher.h",
- "synchronization/waitable_event_watcher_posix.cc",
- "synchronization/waitable_event_watcher_win.cc",
- "synchronization/waitable_event_win.cc",
- "sys_byteorder.h",
- "sys_info.cc",
- "sys_info.h",
- "sys_info_android.cc",
- "sys_info_chromeos.cc",
- "sys_info_internal.h",
- "syslog_logging.cc",
- "syslog_logging.h",
-
- #"sys_info_freebsd.cc", # Unused in Chromium build.
- "sys_info_ios.mm",
- "sys_info_linux.cc",
- "sys_info_mac.mm",
-
- #"sys_info_openbsd.cc", # Unused in Chromium build.
- "sys_info_posix.cc",
- "sys_info_win.cc",
- "system_monitor/system_monitor.cc",
- "system_monitor/system_monitor.h",
- "task/cancelable_task_tracker.cc",
- "task/cancelable_task_tracker.h",
- "task_runner.cc",
- "task_runner.h",
- "task_runner_util.h",
- "task_scheduler/delayed_task_manager.cc",
- "task_scheduler/delayed_task_manager.h",
- "task_scheduler/initialization_util.cc",
- "task_scheduler/initialization_util.h",
- "task_scheduler/post_task.cc",
- "task_scheduler/post_task.h",
- "task_scheduler/priority_queue.cc",
- "task_scheduler/priority_queue.h",
- "task_scheduler/scheduler_lock.h",
- "task_scheduler/scheduler_lock_impl.cc",
- "task_scheduler/scheduler_lock_impl.h",
- "task_scheduler/scheduler_single_thread_task_runner_manager.cc",
- "task_scheduler/scheduler_single_thread_task_runner_manager.h",
- "task_scheduler/scheduler_worker.cc",
- "task_scheduler/scheduler_worker.h",
- "task_scheduler/scheduler_worker_params.h",
- "task_scheduler/scheduler_worker_pool.h",
- "task_scheduler/scheduler_worker_pool_impl.cc",
- "task_scheduler/scheduler_worker_pool_impl.h",
- "task_scheduler/scheduler_worker_pool_params.cc",
- "task_scheduler/scheduler_worker_pool_params.h",
- "task_scheduler/scheduler_worker_stack.cc",
- "task_scheduler/scheduler_worker_stack.h",
- "task_scheduler/scoped_set_task_priority_for_current_thread.cc",
- "task_scheduler/scoped_set_task_priority_for_current_thread.h",
- "task_scheduler/sequence.cc",
- "task_scheduler/sequence.h",
- "task_scheduler/sequence_sort_key.cc",
- "task_scheduler/sequence_sort_key.h",
- "task_scheduler/task.cc",
- "task_scheduler/task.h",
- "task_scheduler/task_scheduler.cc",
- "task_scheduler/task_scheduler.h",
- "task_scheduler/task_scheduler_impl.cc",
- "task_scheduler/task_scheduler_impl.h",
- "task_scheduler/task_tracker.cc",
- "task_scheduler/task_tracker.h",
- "task_scheduler/task_tracker_posix.cc",
- "task_scheduler/task_tracker_posix.h",
- "task_scheduler/task_traits.cc",
- "task_scheduler/task_traits.h",
- "template_util.h",
- "test/malloc_wrapper.h",
- "third_party/dmg_fp/dmg_fp.h",
- "third_party/dmg_fp/dtoa_wrapper.cc",
- "third_party/dmg_fp/g_fmt.cc",
- "third_party/icu/icu_utf.cc",
- "third_party/icu/icu_utf.h",
- "third_party/nspr/prtime.cc",
- "third_party/nspr/prtime.h",
- "third_party/superfasthash/superfasthash.c",
- "third_party/valgrind/memcheck.h",
- "threading/non_thread_safe.h",
- "threading/non_thread_safe_impl.cc",
- "threading/non_thread_safe_impl.h",
- "threading/platform_thread.h",
- "threading/platform_thread_android.cc",
- "threading/platform_thread_internal_posix.cc",
- "threading/platform_thread_internal_posix.h",
- "threading/platform_thread_linux.cc",
- "threading/platform_thread_mac.mm",
- "threading/platform_thread_posix.cc",
- "threading/platform_thread_win.cc",
- "threading/post_task_and_reply_impl.cc",
- "threading/post_task_and_reply_impl.h",
- "threading/sequenced_task_runner_handle.cc",
- "threading/sequenced_task_runner_handle.h",
- "threading/sequenced_worker_pool.cc",
- "threading/sequenced_worker_pool.h",
- "threading/simple_thread.cc",
- "threading/simple_thread.h",
- "threading/thread.cc",
- "threading/thread.h",
- "threading/thread_checker.h",
- "threading/thread_checker_impl.cc",
- "threading/thread_checker_impl.h",
- "threading/thread_collision_warner.cc",
- "threading/thread_collision_warner.h",
- "threading/thread_id_name_manager.cc",
- "threading/thread_id_name_manager.h",
- "threading/thread_local.h",
- "threading/thread_local_storage.cc",
- "threading/thread_local_storage.h",
- "threading/thread_local_storage_posix.cc",
- "threading/thread_local_storage_win.cc",
- "threading/thread_restrictions.cc",
- "threading/thread_restrictions.h",
- "threading/thread_task_runner_handle.cc",
- "threading/thread_task_runner_handle.h",
- "threading/watchdog.cc",
- "threading/watchdog.h",
- "threading/worker_pool.cc",
- "threading/worker_pool.h",
- "threading/worker_pool_posix.cc",
- "threading/worker_pool_posix.h",
- "threading/worker_pool_win.cc",
- "time/clock.cc",
- "time/clock.h",
- "time/default_clock.cc",
- "time/default_clock.h",
- "time/default_tick_clock.cc",
- "time/default_tick_clock.h",
- "time/tick_clock.cc",
- "time/tick_clock.h",
- "time/time.cc",
- "time/time.h",
- "time/time_mac.cc",
- "time/time_posix.cc",
- "time/time_win.cc",
- "timer/elapsed_timer.cc",
- "timer/elapsed_timer.h",
- "timer/hi_res_timer_manager.h",
- "timer/hi_res_timer_manager_posix.cc",
- "timer/hi_res_timer_manager_win.cc",
- "timer/mock_timer.cc",
- "timer/mock_timer.h",
- "timer/timer.cc",
- "timer/timer.h",
- "trace_event/auto_open_close_event.cc",
- "trace_event/auto_open_close_event.h",
- "trace_event/blame_context.cc",
- "trace_event/blame_context.h",
- "trace_event/category_registry.cc",
- "trace_event/category_registry.h",
- "trace_event/common/trace_event_common.h",
- "trace_event/event_name_filter.cc",
- "trace_event/event_name_filter.h",
- "trace_event/heap_profiler.h",
- "trace_event/heap_profiler_allocation_context.cc",
- "trace_event/heap_profiler_allocation_context.h",
- "trace_event/heap_profiler_allocation_context_tracker.cc",
- "trace_event/heap_profiler_allocation_context_tracker.h",
- "trace_event/heap_profiler_allocation_register.cc",
- "trace_event/heap_profiler_allocation_register.h",
- "trace_event/heap_profiler_allocation_register_posix.cc",
- "trace_event/heap_profiler_allocation_register_win.cc",
- "trace_event/heap_profiler_event_filter.cc",
- "trace_event/heap_profiler_event_filter.h",
- "trace_event/heap_profiler_heap_dump_writer.cc",
- "trace_event/heap_profiler_heap_dump_writer.h",
- "trace_event/heap_profiler_stack_frame_deduplicator.cc",
- "trace_event/heap_profiler_stack_frame_deduplicator.h",
- "trace_event/heap_profiler_type_name_deduplicator.cc",
- "trace_event/heap_profiler_type_name_deduplicator.h",
- "trace_event/java_heap_dump_provider_android.cc",
- "trace_event/java_heap_dump_provider_android.h",
- "trace_event/malloc_dump_provider.cc",
- "trace_event/malloc_dump_provider.h",
- "trace_event/memory_allocator_dump.cc",
- "trace_event/memory_allocator_dump.h",
- "trace_event/memory_allocator_dump_guid.cc",
- "trace_event/memory_allocator_dump_guid.h",
- "trace_event/memory_dump_manager.cc",
- "trace_event/memory_dump_manager.h",
- "trace_event/memory_dump_provider.h",
- "trace_event/memory_dump_request_args.cc",
- "trace_event/memory_dump_request_args.h",
- "trace_event/memory_dump_scheduler.cc",
- "trace_event/memory_dump_scheduler.h",
- "trace_event/memory_dump_session_state.cc",
- "trace_event/memory_dump_session_state.h",
- "trace_event/memory_infra_background_whitelist.cc",
- "trace_event/memory_infra_background_whitelist.h",
- "trace_event/memory_usage_estimator.cc",
- "trace_event/memory_usage_estimator.h",
- "trace_event/process_memory_dump.cc",
- "trace_event/process_memory_dump.h",
- "trace_event/process_memory_maps.cc",
- "trace_event/process_memory_maps.h",
- "trace_event/process_memory_totals.cc",
- "trace_event/process_memory_totals.h",
- "trace_event/trace_buffer.cc",
- "trace_event/trace_buffer.h",
- "trace_event/trace_category.h",
- "trace_event/trace_config.cc",
- "trace_event/trace_config.h",
- "trace_event/trace_config_category_filter.cc",
- "trace_event/trace_config_category_filter.h",
- "trace_event/trace_event.h",
- "trace_event/trace_event_android.cc",
- "trace_event/trace_event_argument.cc",
- "trace_event/trace_event_argument.h",
- "trace_event/trace_event_etw_export_win.cc",
- "trace_event/trace_event_etw_export_win.h",
- "trace_event/trace_event_filter.cc",
- "trace_event/trace_event_filter.h",
- "trace_event/trace_event_impl.cc",
- "trace_event/trace_event_impl.h",
- "trace_event/trace_event_memory_overhead.cc",
- "trace_event/trace_event_memory_overhead.h",
- "trace_event/trace_event_synthetic_delay.cc",
- "trace_event/trace_event_synthetic_delay.h",
- "trace_event/trace_event_system_stats_monitor.cc",
- "trace_event/trace_event_system_stats_monitor.h",
- "trace_event/trace_log.cc",
- "trace_event/trace_log.h",
- "trace_event/trace_log_constants.cc",
- "trace_event/tracing_agent.cc",
- "trace_event/tracing_agent.h",
- "tracked_objects.cc",
- "tracked_objects.h",
- "tracking_info.cc",
- "tracking_info.h",
- "tuple.h",
- "unguessable_token.cc",
- "unguessable_token.h",
- "value_conversions.cc",
- "value_conversions.h",
- "values.cc",
- "values.h",
- "version.cc",
- "version.h",
- "vlog.cc",
- "vlog.h",
- "win/current_module.h",
- "win/enum_variant.cc",
- "win/enum_variant.h",
- "win/event_trace_consumer.h",
- "win/event_trace_controller.cc",
- "win/event_trace_controller.h",
- "win/event_trace_provider.cc",
- "win/event_trace_provider.h",
- "win/i18n.cc",
- "win/i18n.h",
- "win/iat_patch_function.cc",
- "win/iat_patch_function.h",
- "win/iunknown_impl.cc",
- "win/iunknown_impl.h",
- "win/message_window.cc",
- "win/message_window.h",
- "win/object_watcher.cc",
- "win/object_watcher.h",
- "win/process_startup_helper.cc",
- "win/process_startup_helper.h",
- "win/registry.cc",
- "win/registry.h",
- "win/resource_util.cc",
- "win/resource_util.h",
- "win/scoped_bstr.cc",
- "win/scoped_bstr.h",
- "win/scoped_co_mem.h",
- "win/scoped_com_initializer.h",
- "win/scoped_comptr.h",
- "win/scoped_gdi_object.h",
- "win/scoped_handle.cc",
- "win/scoped_handle.h",
- "win/scoped_hdc.h",
- "win/scoped_hglobal.h",
- "win/scoped_process_information.cc",
- "win/scoped_process_information.h",
- "win/scoped_propvariant.h",
- "win/scoped_select_object.h",
- "win/scoped_variant.cc",
- "win/scoped_variant.h",
- "win/shortcut.cc",
- "win/shortcut.h",
- "win/startup_information.cc",
- "win/startup_information.h",
- "win/wait_chain.cc",
- "win/wait_chain.h",
- "win/win_util.cc",
- "win/win_util.h",
- "win/windows_version.cc",
- "win/windows_version.h",
- "win/wrapped_window_proc.cc",
- "win/wrapped_window_proc.h",
- ]
-
- all_dependent_configs = []
- defines = []
- data = []
-
- configs += [
- ":base_flags",
- ":base_implementation",
- "//base/allocator:allocator_shim_define", # for allocator_check.cc.
- "//build/config:precompiled_headers",
- ]
-
- deps = [
- "//base/allocator",
- "//base/allocator:features",
- "//base/third_party/dynamic_annotations",
- "//third_party/modp_b64",
- ]
-
- public_deps = [
- ":base_paths",
- ":base_static",
- ":build_date",
- ":debugging_flags",
- ]
-
- # Needed for <atomic> if using newer C++ library than sysroot
- if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) {
- libs = [ "atomic" ]
- }
-
- if (use_experimental_allocator_shim) {
- # TODO(primiano): support other platforms, currently this works only on
- # Linux/CrOS/Android. http://crbug.com/550886 .
- sources += [
- "allocator/allocator_shim.cc",
- "allocator/allocator_shim.h",
- "allocator/allocator_shim_internals.h",
- "allocator/allocator_shim_override_cpp_symbols.h",
- "allocator/allocator_shim_override_libc_symbols.h",
- ]
- if (is_win) {
- sources += [
- "allocator/allocator_shim_default_dispatch_to_winheap.cc",
- "allocator/allocator_shim_override_ucrt_symbols_win.h",
- "allocator/winheap_stubs_win.cc",
- "allocator/winheap_stubs_win.h",
- ]
- } else if (is_linux && use_allocator == "tcmalloc") {
- sources += [
- "allocator/allocator_shim_default_dispatch_to_tcmalloc.cc",
- "allocator/allocator_shim_override_glibc_weak_symbols.h",
- ]
- deps += [ "//base/allocator:tcmalloc" ]
- } else if (is_linux && use_allocator == "none") {
- sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
- } else if (is_android && use_allocator == "none") {
- sources += [
- "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
- "allocator/allocator_shim_override_linker_wrapped_symbols.h",
- ]
- all_dependent_configs += [ "//base/allocator:wrap_malloc_symbols" ]
- } else if (is_mac) {
- sources += [
- "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc",
- "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h",
- "allocator/allocator_shim_override_mac_symbols.h",
- ]
- }
- }
-
- # Allow more direct string conversions on platforms with native utf8
- # strings
- if (is_mac || is_ios || is_chromeos || is_chromecast) {
- defines += [ "SYSTEM_NATIVE_UTF8" ]
- }
-
- # Android.
- if (is_android) {
- sources -= [ "debug/stack_trace_posix.cc" ]
-
- # Android uses some Linux sources, put those back.
- set_sources_assignment_filter([])
- sources += [
- "debug/proc_maps_linux.cc",
- "files/file_path_watcher_linux.cc",
- "posix/unix_domain_socket_linux.cc",
- "power_monitor/power_monitor_device_source_android.cc",
- "power_monitor/power_monitor_device_source_android.h",
- "process/internal_linux.cc",
- "process/memory_linux.cc",
- "process/process_handle_linux.cc",
- "process/process_info_linux.cc",
- "process/process_iterator_linux.cc",
- "process/process_metrics_linux.cc",
- "sys_info_linux.cc",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
-
- deps += [
- ":base_jni_headers",
- "//third_party/android_tools:cpu_features",
- "//third_party/ashmem",
- ]
-
- # Needs to be a public config so that dependent targets link against it as
- # well when doing a component build.
- public_configs = [ ":android_system_libs" ]
- }
-
- # Chromeos.
- if (is_chromeos) {
- sources += [ "power_monitor/power_monitor_device_source_chromeos.cc" ]
- }
-
- # NaCl.
- if (is_nacl) {
- # We reset sources_assignment_filter in order to explicitly include
- # the linux file (which would otherwise be filtered out).
- set_sources_assignment_filter([])
- sources += [
- "files/file_path_watcher_stub.cc",
- "process/process_metrics_nacl.cc",
- "sync_socket_nacl.cc",
- "threading/platform_thread_linux.cc",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
-
- sources -= [
- "cpu.cc",
- "debug/crash_logging.cc",
- "debug/crash_logging.h",
- "debug/stack_trace.cc",
- "debug/stack_trace_posix.cc",
- "files/file_enumerator_posix.cc",
- "files/file_proxy.cc",
- "files/file_util_proxy.cc",
- "files/important_file_writer.cc",
- "files/important_file_writer.h",
- "files/scoped_temp_dir.cc",
- "memory/discardable_memory.cc",
- "memory/discardable_memory.h",
- "memory/discardable_memory_allocator.cc",
- "memory/discardable_memory_allocator.h",
- "memory/discardable_shared_memory.cc",
- "memory/discardable_shared_memory.h",
- "memory/shared_memory_helper.cc",
- "memory/shared_memory_helper.h",
- "memory/shared_memory_posix.cc",
- "native_library.cc",
- "native_library_posix.cc",
- "path_service.cc",
- "process/kill.cc",
- "process/kill.h",
- "process/memory.cc",
- "process/memory.h",
- "process/process_iterator.cc",
- "process/process_iterator.h",
- "process/process_metrics.cc",
- "process/process_metrics_posix.cc",
- "process/process_posix.cc",
- "scoped_native_library.cc",
- "sync_socket_posix.cc",
- "synchronization/read_write_lock_posix.cc",
- "sys_info.cc",
- "sys_info_posix.cc",
- "task_scheduler/initialization_util.cc",
- "task_scheduler/initialization_util.h",
- "trace_event/trace_event_system_stats_monitor.cc",
- ]
-
- if (is_nacl_nonsfi) {
- set_sources_assignment_filter([])
- sources += [ "posix/unix_domain_socket_linux.cc" ]
- set_sources_assignment_filter(sources_assignment_filter)
- sources -= [ "rand_util_nacl.cc" ]
- configs += [ ":nacl_nonsfi_warnings" ]
- } else {
- sources -= [
- "files/file_descriptor_watcher_posix.cc",
- "files/file_descriptor_watcher_posix.h",
- "files/file_util.cc",
- "files/file_util.h",
- "files/file_util_posix.cc",
- "json/json_file_value_serializer.cc",
- "json/json_file_value_serializer.h",
- "message_loop/message_pump_libevent.cc",
- "message_loop/message_pump_libevent.h",
- "process/kill_posix.cc",
- "process/launch.cc",
- "process/launch.h",
- "process/launch_posix.cc",
- "rand_util_posix.cc",
- "task_scheduler/task_tracker_posix.cc",
- "task_scheduler/task_tracker_posix.h",
- ]
- }
- } else {
- # Remove NaCl stuff.
- sources -= [
- "memory/shared_memory_nacl.cc",
- "os_compat_nacl.cc",
- "os_compat_nacl.h",
- "rand_util_nacl.cc",
- "synchronization/read_write_lock_nacl.cc",
- ]
-
- if (use_partition_alloc) {
- # Add stuff that doesn't work in NaCl.
- sources += [
- # PartitionAlloc uses SpinLock, which doesn't work in NaCl (see below).
- "allocator/partition_allocator/address_space_randomization.cc",
- "allocator/partition_allocator/address_space_randomization.h",
- "allocator/partition_allocator/oom.h",
- "allocator/partition_allocator/page_allocator.cc",
- "allocator/partition_allocator/page_allocator.h",
- "allocator/partition_allocator/partition_alloc.cc",
- "allocator/partition_allocator/partition_alloc.h",
- "allocator/partition_allocator/spin_lock.cc",
- "allocator/partition_allocator/spin_lock.h",
- ]
- }
- }
-
- # Windows.
- if (is_win) {
- sources += [
- "power_monitor/power_monitor_device_source_win.cc",
- "profiler/win32_stack_frame_unwinder.cc",
- "profiler/win32_stack_frame_unwinder.h",
- ]
-
- sources -= [
- "file_descriptor_store.cc",
- "file_descriptor_store.h",
- "memory/shared_memory_helper.cc",
- "memory/shared_memory_helper.h",
- "message_loop/message_pump_libevent.cc",
- "strings/string16.cc",
- ]
-
- deps += [
- "//base/trace_event/etw_manifest:chrome_events_win",
- "//base/win:base_win_features",
- "//base/win:eventlog_messages",
- ]
-
- if (is_component_build) {
- # Copy the VS runtime DLLs into the isolate so that they don't have to be
- # preinstalled on the target machine. The debug runtimes have a "d" at
- # the end.
- if (is_debug) {
- vcrt_suffix = "d"
- } else {
- vcrt_suffix = ""
- }
-
- # These runtime files are copied to the output directory by the
- # vs_toolchain script that runs as part of toolchain configuration.
- data += [
- "$root_out_dir/msvcp140${vcrt_suffix}.dll",
- "$root_out_dir/vccorlib140${vcrt_suffix}.dll",
- "$root_out_dir/vcruntime140${vcrt_suffix}.dll",
-
- # Universal Windows 10 CRT files
- "$root_out_dir/api-ms-win-core-console-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-datetime-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-debug-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-errorhandling-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-file-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-file-l1-2-0.dll",
- "$root_out_dir/api-ms-win-core-file-l2-1-0.dll",
- "$root_out_dir/api-ms-win-core-handle-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-heap-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-interlocked-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-libraryloader-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-localization-l1-2-0.dll",
- "$root_out_dir/api-ms-win-core-memory-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-namedpipe-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-processenvironment-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-processthreads-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-processthreads-l1-1-1.dll",
- "$root_out_dir/api-ms-win-core-profile-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-rtlsupport-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-string-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-synch-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-synch-l1-2-0.dll",
- "$root_out_dir/api-ms-win-core-sysinfo-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-timezone-l1-1-0.dll",
- "$root_out_dir/api-ms-win-core-util-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-conio-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-convert-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-environment-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-filesystem-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-heap-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-locale-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-math-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-multibyte-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-private-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-process-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-runtime-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-stdio-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-string-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-time-l1-1-0.dll",
- "$root_out_dir/api-ms-win-crt-utility-l1-1-0.dll",
- "$root_out_dir/ucrtbase${vcrt_suffix}.dll",
- ]
- if (is_asan) {
- if (current_cpu == "x64") {
- data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-x86_64.dll" ]
- } else {
- data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-i386.dll" ]
- }
- }
- }
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- libs = [
- "cfgmgr32.lib",
- "powrprof.lib",
- "setupapi.lib",
- "userenv.lib",
- "winmm.lib",
- ]
- all_dependent_configs += [ ":base_win_linker_flags" ]
- } else if (!is_nacl || is_nacl_nonsfi) {
- # Non-Windows.
- deps += [ "//base/third_party/libevent" ]
- }
-
- # Desktop Mac.
- if (is_mac) {
- sources += [
- "mac/scoped_typeref.h",
- "power_monitor/power_monitor_device_source_mac.mm",
- ]
-
- libs = [
- "ApplicationServices.framework",
- "AppKit.framework",
- "bsm",
- "CoreFoundation.framework",
- "IOKit.framework",
- "Security.framework",
- ]
- }
-
- # Mac or iOS.
- if (is_mac || is_ios) {
- sources -= [
- "memory/shared_memory_posix.cc",
- "native_library_posix.cc",
- "strings/sys_string_conversions_posix.cc",
- "threading/platform_thread_internal_posix.cc",
- ]
- } else {
- # Non-Mac/ios.
- sources -= [
- "files/file_path_watcher_fsevents.cc",
- "files/file_path_watcher_fsevents.h",
- "files/file_path_watcher_kqueue.cc",
- "files/file_path_watcher_kqueue.h",
- ]
- }
-
- # Linux.
- if (is_linux) {
- if (is_asan || is_lsan || is_msan || is_tsan) {
- # For llvm-sanitizer.
- data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ]
- }
-
- # TODO(brettw) this will need to be parameterized at some point.
- linux_configs = []
- if (use_glib) {
- linux_configs += [ "//build/config/linux:glib" ]
- }
-
- defines += [ "USE_SYMBOLIZE" ]
-
- configs += linux_configs
- all_dependent_configs += linux_configs
-
- # These dependencies are not required on Android, and in the case
- # of xdg_mime must be excluded due to licensing restrictions.
- deps += [
- "//base/third_party/symbolize",
- "//base/third_party/xdg_mime",
- "//base/third_party/xdg_user_dirs",
- ]
- } else {
- # Non-Linux.
- sources -= [
- "nix/mime_util_xdg.cc",
- "nix/mime_util_xdg.h",
- "nix/xdg_util.cc",
- "nix/xdg_util.h",
- ]
-
- if (!is_android) {
- sources -= [
- "linux_util.cc",
- "linux_util.h",
- ]
- }
- }
-
- # iOS
- if (is_ios) {
- set_sources_assignment_filter([])
-
- sources -= [
- "files/file_path_watcher.cc",
- "files/file_path_watcher.h",
- "files/file_path_watcher_fsevents.cc",
- "files/file_path_watcher_fsevents.h",
- "files/file_path_watcher_kqueue.cc",
- "files/file_path_watcher_kqueue.h",
- "memory/discardable_shared_memory.cc",
- "memory/discardable_shared_memory.h",
- "message_loop/message_pump_libevent.cc",
- "message_loop/message_pump_libevent.h",
- "process/kill.cc",
- "process/kill.h",
- "process/kill_posix.cc",
- "process/launch.cc",
- "process/launch.h",
- "process/launch_posix.cc",
- "process/memory.cc",
- "process/memory.h",
- "process/process_iterator.cc",
- "process/process_iterator.h",
- "process/process_metrics_posix.cc",
- "process/process_posix.cc",
- "sync_socket.h",
- "sync_socket_posix.cc",
- ]
- sources += [
- "base_paths_mac.h",
- "base_paths_mac.mm",
- "file_version_info_mac.h",
- "file_version_info_mac.mm",
- "files/file_util_mac.mm",
- "mac/bundle_locations.h",
- "mac/bundle_locations.mm",
- "mac/call_with_eh_frame.cc",
- "mac/call_with_eh_frame.h",
- "mac/foundation_util.h",
- "mac/foundation_util.mm",
- "mac/mac_logging.h",
- "mac/mac_logging.mm",
- "mac/mach_logging.cc",
- "mac/mach_logging.h",
- "mac/objc_property_releaser.h",
- "mac/objc_property_releaser.mm",
- "mac/objc_release_properties.h",
- "mac/objc_release_properties.mm",
- "mac/scoped_block.h",
- "mac/scoped_mach_port.cc",
- "mac/scoped_mach_port.h",
- "mac/scoped_mach_vm.cc",
- "mac/scoped_mach_vm.h",
- "mac/scoped_nsautorelease_pool.h",
- "mac/scoped_nsautorelease_pool.mm",
- "mac/scoped_nsobject.h",
- "mac/scoped_nsobject.mm",
- "mac/scoped_objc_class_swizzler.h",
- "mac/scoped_objc_class_swizzler.mm",
- "mac/scoped_typeref.h",
- "memory/shared_memory_posix.cc",
- "message_loop/message_pump_mac.h",
- "message_loop/message_pump_mac.mm",
- "power_monitor/power_monitor_device_source_ios.mm",
- "process/memory_stubs.cc",
- "strings/sys_string_conversions_mac.mm",
- "threading/platform_thread_mac.mm",
- "time/time_mac.cc",
- ]
-
- set_sources_assignment_filter(sources_assignment_filter)
- }
-
- if (is_posix && !is_mac && !is_ios && !is_android && !is_chromeos) {
- sources += [ "power_monitor/power_monitor_device_source_posix.cc" ]
- }
-
- if (is_posix && !is_mac && !is_nacl) {
- sources += [
- "memory/shared_memory_tracker.cc",
- "memory/shared_memory_tracker.h",
- ]
- }
-
- if (!use_glib) {
- sources -= [
- "message_loop/message_pump_glib.cc",
- "message_loop/message_pump_glib.h",
- ]
- }
-
- if (using_sanitizer) {
- data += [ "//tools/valgrind/asan/" ]
- if (is_win) {
- data +=
- [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer.exe" ]
- } else {
- data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ]
- }
- }
-
- configs += [ "//build/config/compiler:wexit_time_destructors" ]
- if (!is_debug) {
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_max" ]
- }
-
- allow_circular_includes_from = public_deps
-}
-
-buildflag_header("debugging_flags") {
- header = "debugging_flags.h"
- header_dir = "base/debug"
- flags = [
- "ENABLE_PROFILING=$enable_profiling",
- "ENABLE_MEMORY_TASK_PROFILER=$enable_memory_task_profiler",
- ]
-}
-
-# This is the subset of files from base that should not be used with a dynamic
-# library. Note that this library cannot depend on base because base depends on
-# base_static.
-static_library("base_static") {
- sources = [
- "base_switches.cc",
- "base_switches.h",
- "task_scheduler/switches.cc",
- "task_scheduler/switches.h",
- "win/pe_image.cc",
- "win/pe_image.h",
- ]
-
- if (is_win) {
- # Disable sanitizer coverage in win/pe_image.cc. It is called by the sandbox
- # before sanitizer coverage can initialize. http://crbug.com/484711
- configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
- configs +=
- [ "//build/config/sanitizers:default_sanitizer_flags_but_coverage" ]
- }
-
- if (!is_debug) {
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_max" ]
- }
-}
-
-component("i18n") {
- output_name = "base_i18n"
- sources = [
- "i18n/base_i18n_export.h",
- "i18n/base_i18n_switches.cc",
- "i18n/base_i18n_switches.h",
- "i18n/bidi_line_iterator.cc",
- "i18n/bidi_line_iterator.h",
- "i18n/break_iterator.cc",
- "i18n/break_iterator.h",
- "i18n/case_conversion.cc",
- "i18n/case_conversion.h",
- "i18n/char_iterator.cc",
- "i18n/char_iterator.h",
- "i18n/character_encoding.cc",
- "i18n/character_encoding.h",
- "i18n/encoding_detection.cc",
- "i18n/encoding_detection.h",
- "i18n/file_util_icu.cc",
- "i18n/file_util_icu.h",
- "i18n/i18n_constants.cc",
- "i18n/i18n_constants.h",
- "i18n/icu_string_conversions.cc",
- "i18n/icu_string_conversions.h",
- "i18n/icu_util.cc",
- "i18n/icu_util.h",
- "i18n/message_formatter.cc",
- "i18n/message_formatter.h",
- "i18n/number_formatting.cc",
- "i18n/number_formatting.h",
- "i18n/rtl.cc",
- "i18n/rtl.h",
- "i18n/streaming_utf8_validator.cc",
- "i18n/streaming_utf8_validator.h",
- "i18n/string_compare.cc",
- "i18n/string_compare.h",
- "i18n/string_search.cc",
- "i18n/string_search.h",
- "i18n/time_formatting.cc",
- "i18n/time_formatting.h",
- "i18n/timezone.cc",
- "i18n/timezone.h",
- "i18n/unicodestring.h",
- "i18n/utf8_validator_tables.cc",
- "i18n/utf8_validator_tables.h",
- ]
- defines = [ "BASE_I18N_IMPLEMENTATION" ]
- configs += [ "//build/config/compiler:wexit_time_destructors" ]
- public_deps = [
- "//third_party/ced",
- "//third_party/icu",
- ]
- deps = [
- ":base",
- "//base/third_party/dynamic_annotations",
- ]
-
- if (!is_debug) {
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_max" ]
- }
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- if (is_mac) {
- libs = [ "CoreFoundation.framework" ]
- }
-}
-
-test("base_perftests") {
- sources = [
- "message_loop/message_pump_perftest.cc",
-
- # "test/run_all_unittests.cc",
- "json/json_perftest.cc",
- "threading/thread_perftest.cc",
- ]
- deps = [
- ":base",
- "//base/test:test_support",
- "//base/test:test_support_perf",
- "//testing/gtest",
- "//testing/perf",
- ]
-
- if (is_android) {
- deps += [ "//testing/android/native_test:native_test_native_code" ]
- }
-}
-
-test("base_i18n_perftests") {
- sources = [
- "i18n/streaming_utf8_validator_perftest.cc",
- ]
- deps = [
- ":base",
- ":i18n",
- "//base/test:test_support",
- "//base/test:test_support_perf",
- "//testing/gtest",
- ]
-}
-
-if (!is_ios) {
- executable("build_utf8_validator_tables") {
- sources = [
- "i18n/build_utf8_validator_tables.cc",
- ]
- deps = [
- ":base",
- "//build/config/sanitizers:deps",
- "//build/win:default_exe_manifest",
- "//third_party/icu:icuuc",
- ]
- }
-
- executable("check_example") {
- sources = [
- "check_example.cc",
- ]
- deps = [
- ":base",
- "//build/config/sanitizers:deps",
- "//build/win:default_exe_manifest",
- ]
- }
-}
-
-source_set("message_loop_tests") {
- testonly = true
- sources = [
- "message_loop/message_loop_test.cc",
- "message_loop/message_loop_test.h",
- ]
-
- deps = [
- ":base",
- "//testing/gtest",
- ]
-}
-
-if (is_win) {
- # Target to manually rebuild pe_image_test.dll which is checked into
- # base/test/data/pe_image.
- shared_library("pe_image_test") {
- sources = [
- "win/pe_image_test.cc",
- ]
- ldflags = [
- "/DELAYLOAD:cfgmgr32.dll",
- "/DELAYLOAD:shell32.dll",
- "/SUBSYSTEM:WINDOWS",
- ]
- libs = [
- "cfgmgr32.lib",
- "shell32.lib",
- ]
- deps = [
- "//build/config/sanitizers:deps",
- ]
- }
-
- loadable_module("scoped_handle_test_dll") {
- sources = [
- "win/scoped_handle_test_dll.cc",
- ]
- deps = [
- ":base",
- "//base/win:base_win_features",
- ]
- }
-
- if (current_cpu == "x64") {
- # Must be a shared library so that it can be unloaded during testing.
- shared_library("base_profiler_test_support_library") {
- sources = [
- "profiler/test_support_library.cc",
- ]
- deps = [
- "//build/config/sanitizers:deps",
- ]
- }
- }
-}
-
-bundle_data("base_unittests_bundle_data") {
- testonly = true
- sources = [
- "test/data/file_util/binary_file.bin",
- "test/data/file_util/binary_file_diff.bin",
- "test/data/file_util/binary_file_same.bin",
- "test/data/file_util/blank_line.txt",
- "test/data/file_util/blank_line_crlf.txt",
- "test/data/file_util/crlf.txt",
- "test/data/file_util/different.txt",
- "test/data/file_util/different_first.txt",
- "test/data/file_util/different_last.txt",
- "test/data/file_util/empty1.txt",
- "test/data/file_util/empty2.txt",
- "test/data/file_util/first1.txt",
- "test/data/file_util/first2.txt",
- "test/data/file_util/original.txt",
- "test/data/file_util/same.txt",
- "test/data/file_util/same_length.txt",
- "test/data/file_util/shortened.txt",
- "test/data/json/bom_feff.json",
- "test/data/serializer_nested_test.json",
- "test/data/serializer_test.json",
- "test/data/serializer_test_nowhitespace.json",
- ]
- outputs = [
- "{{bundle_resources_dir}}/" +
- "{{source_root_relative_dir}}/{{source_file_part}}",
- ]
-}
-
-if (is_ios || is_mac) {
- source_set("base_unittests_arc") {
- testonly = true
- set_sources_assignment_filter([])
- sources = [
- "mac/bind_objc_block_unittest_arc.mm",
- "mac/scoped_nsobject_unittest_arc.mm",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
- configs += [ "//build/config/compiler:enable_arc" ]
- deps = [
- ":base",
- "//testing/gtest",
- ]
- }
-}
-
-test("base_unittests") {
- sources = [
- "allocator/malloc_zone_functions_mac_unittest.cc",
- "allocator/tcmalloc_unittest.cc",
- "android/application_status_listener_unittest.cc",
- "android/content_uri_utils_unittest.cc",
- "android/jni_android_unittest.cc",
- "android/jni_array_unittest.cc",
- "android/jni_string_unittest.cc",
- "android/library_loader/library_prefetcher_unittest.cc",
- "android/path_utils_unittest.cc",
- "android/scoped_java_ref_unittest.cc",
- "android/sys_utils_unittest.cc",
- "android/unguessable_token_android_unittest.cc",
- "at_exit_unittest.cc",
- "atomicops_unittest.cc",
- "barrier_closure_unittest.cc",
- "base64_unittest.cc",
- "base64url_unittest.cc",
- "big_endian_unittest.cc",
- "bind_helpers_unittest.cc",
- "bind_unittest.cc",
- "bit_cast_unittest.cc",
- "bits_unittest.cc",
- "build_time_unittest.cc",
- "callback_helpers_unittest.cc",
- "callback_list_unittest.cc",
- "callback_unittest.cc",
- "cancelable_callback_unittest.cc",
- "command_line_unittest.cc",
- "containers/adapters_unittest.cc",
- "containers/container_test_utils.h",
- "containers/flat_map_unittest.cc",
- "containers/flat_set_unittest.cc",
- "containers/flat_tree_unittest.cc",
- "containers/hash_tables_unittest.cc",
- "containers/linked_list_unittest.cc",
- "containers/mru_cache_unittest.cc",
- "containers/small_map_unittest.cc",
- "containers/stack_container_unittest.cc",
- "cpu_unittest.cc",
- "debug/activity_analyzer_unittest.cc",
- "debug/activity_tracker_unittest.cc",
- "debug/crash_logging_unittest.cc",
- "debug/debugger_unittest.cc",
- "debug/leak_tracker_unittest.cc",
- "debug/proc_maps_linux_unittest.cc",
- "debug/stack_trace_unittest.cc",
- "debug/task_annotator_unittest.cc",
- "debug/thread_heap_usage_tracker_unittest.cc",
- "deferred_sequenced_task_runner_unittest.cc",
- "environment_unittest.cc",
- "feature_list_unittest.cc",
- "file_version_info_win_unittest.cc",
- "files/dir_reader_posix_unittest.cc",
- "files/file_descriptor_watcher_posix_unittest.cc",
- "files/file_locking_unittest.cc",
- "files/file_path_unittest.cc",
- "files/file_path_watcher_unittest.cc",
- "files/file_proxy_unittest.cc",
- "files/file_unittest.cc",
- "files/file_util_proxy_unittest.cc",
- "files/file_util_unittest.cc",
- "files/important_file_writer_unittest.cc",
- "files/memory_mapped_file_unittest.cc",
- "files/scoped_platform_handle_unittest.cc",
- "files/scoped_temp_dir_unittest.cc",
- "gmock_unittest.cc",
- "guid_unittest.cc",
- "hash_unittest.cc",
- "i18n/break_iterator_unittest.cc",
- "i18n/case_conversion_unittest.cc",
- "i18n/char_iterator_unittest.cc",
- "i18n/character_encoding_unittest.cc",
- "i18n/file_util_icu_unittest.cc",
- "i18n/icu_string_conversions_unittest.cc",
- "i18n/message_formatter_unittest.cc",
- "i18n/number_formatting_unittest.cc",
- "i18n/rtl_unittest.cc",
- "i18n/streaming_utf8_validator_unittest.cc",
- "i18n/string_search_unittest.cc",
- "i18n/time_formatting_unittest.cc",
- "i18n/timezone_unittest.cc",
- "id_map_unittest.cc",
- "ios/crb_protocol_observers_unittest.mm",
- "ios/device_util_unittest.mm",
- "ios/weak_nsobject_unittest.mm",
- "json/json_parser_unittest.cc",
- "json/json_reader_unittest.cc",
- "json/json_value_converter_unittest.cc",
- "json/json_value_serializer_unittest.cc",
- "json/json_writer_unittest.cc",
- "json/string_escape_unittest.cc",
- "lazy_instance_unittest.cc",
- "logging_unittest.cc",
- "mac/bind_objc_block_unittest.mm",
- "mac/call_with_eh_frame_unittest.mm",
- "mac/dispatch_source_mach_unittest.cc",
- "mac/foundation_util_unittest.mm",
- "mac/mac_util_unittest.mm",
- "mac/mach_port_broker_unittest.cc",
- "mac/objc_property_releaser_unittest.mm",
- "mac/objc_release_properties_unittest.mm",
- "mac/scoped_nsobject_unittest.mm",
- "mac/scoped_objc_class_swizzler_unittest.mm",
- "mac/scoped_sending_event_unittest.mm",
- "md5_unittest.cc",
- "memory/aligned_memory_unittest.cc",
- "memory/discardable_shared_memory_unittest.cc",
- "memory/linked_ptr_unittest.cc",
- "memory/memory_coordinator_client_registry_unittest.cc",
- "memory/memory_pressure_listener_unittest.cc",
- "memory/memory_pressure_monitor_chromeos_unittest.cc",
- "memory/memory_pressure_monitor_mac_unittest.cc",
- "memory/memory_pressure_monitor_unittest.cc",
- "memory/memory_pressure_monitor_win_unittest.cc",
- "memory/ptr_util_unittest.cc",
- "memory/ref_counted_memory_unittest.cc",
- "memory/ref_counted_unittest.cc",
- "memory/scoped_vector_unittest.cc",
- "memory/shared_memory_mac_unittest.cc",
- "memory/shared_memory_unittest.cc",
- "memory/shared_memory_win_unittest.cc",
- "memory/singleton_unittest.cc",
- "memory/weak_ptr_unittest.cc",
- "message_loop/message_loop_task_runner_unittest.cc",
- "message_loop/message_loop_unittest.cc",
- "message_loop/message_pump_glib_unittest.cc",
- "message_loop/message_pump_io_ios_unittest.cc",
- "message_loop/message_pump_mac_unittest.cc",
- "metrics/bucket_ranges_unittest.cc",
- "metrics/field_trial_params_unittest.cc",
- "metrics/field_trial_unittest.cc",
- "metrics/histogram_base_unittest.cc",
- "metrics/histogram_delta_serialization_unittest.cc",
- "metrics/histogram_functions_unittest.cc",
- "metrics/histogram_macros_unittest.cc",
- "metrics/histogram_snapshot_manager_unittest.cc",
- "metrics/histogram_unittest.cc",
- "metrics/metrics_hashes_unittest.cc",
- "metrics/persistent_histogram_allocator_unittest.cc",
- "metrics/persistent_memory_allocator_unittest.cc",
- "metrics/persistent_sample_map_unittest.cc",
- "metrics/sample_map_unittest.cc",
- "metrics/sample_vector_unittest.cc",
- "metrics/sparse_histogram_unittest.cc",
- "metrics/statistics_recorder_unittest.cc",
- "native_library_unittest.cc",
- "numerics/safe_numerics_unittest.cc",
- "numerics/saturated_arithmetic_unittest.cc",
- "observer_list_unittest.cc",
- "optional_unittest.cc",
- "os_compat_android_unittest.cc",
- "path_service_unittest.cc",
- "pending_task_unittest.cc",
- "pickle_unittest.cc",
- "posix/file_descriptor_shuffle_unittest.cc",
- "posix/unix_domain_socket_linux_unittest.cc",
- "power_monitor/power_monitor_unittest.cc",
- "process/memory_unittest.cc",
- "process/memory_unittest_mac.h",
- "process/memory_unittest_mac.mm",
- "process/process_info_unittest.cc",
- "process/process_metrics_unittest.cc",
- "process/process_metrics_unittest_ios.cc",
- "process/process_unittest.cc",
- "process/process_util_unittest.cc",
- "profiler/stack_sampling_profiler_unittest.cc",
- "profiler/tracked_time_unittest.cc",
- "rand_util_unittest.cc",
- "run_loop_unittest.cc",
- "scoped_clear_errno_unittest.cc",
- "scoped_generic_unittest.cc",
- "scoped_native_library_unittest.cc",
- "security_unittest.cc",
- "sequence_checker_unittest.cc",
- "sequence_token_unittest.cc",
- "sequenced_task_runner_unittest.cc",
- "sha1_unittest.cc",
- "stl_util_unittest.cc",
- "strings/nullable_string16_unittest.cc",
- "strings/pattern_unittest.cc",
- "strings/safe_sprintf_unittest.cc",
- "strings/string16_unittest.cc",
- "strings/string_number_conversions_unittest.cc",
- "strings/string_piece_unittest.cc",
- "strings/string_split_unittest.cc",
- "strings/string_tokenizer_unittest.cc",
- "strings/string_util_unittest.cc",
- "strings/stringize_macros_unittest.cc",
- "strings/stringprintf_unittest.cc",
- "strings/sys_string_conversions_mac_unittest.mm",
- "strings/sys_string_conversions_unittest.cc",
- "strings/utf_offset_string_conversions_unittest.cc",
- "strings/utf_string_conversions_unittest.cc",
- "supports_user_data_unittest.cc",
- "sync_socket_unittest.cc",
- "synchronization/atomic_flag_unittest.cc",
- "synchronization/condition_variable_unittest.cc",
- "synchronization/lock_unittest.cc",
- "synchronization/read_write_lock_unittest.cc",
- "synchronization/waitable_event_unittest.cc",
- "synchronization/waitable_event_watcher_unittest.cc",
- "sys_byteorder_unittest.cc",
- "sys_info_unittest.cc",
- "system_monitor/system_monitor_unittest.cc",
- "task/cancelable_task_tracker_unittest.cc",
- "task_runner_util_unittest.cc",
- "task_scheduler/delayed_task_manager_unittest.cc",
- "task_scheduler/priority_queue_unittest.cc",
- "task_scheduler/scheduler_lock_unittest.cc",
- "task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc",
- "task_scheduler/scheduler_worker_pool_impl_unittest.cc",
- "task_scheduler/scheduler_worker_stack_unittest.cc",
- "task_scheduler/scheduler_worker_unittest.cc",
- "task_scheduler/scoped_set_task_priority_for_current_thread_unittest.cc",
- "task_scheduler/sequence_sort_key_unittest.cc",
- "task_scheduler/sequence_unittest.cc",
- "task_scheduler/task_scheduler_impl_unittest.cc",
- "task_scheduler/task_tracker_posix_unittest.cc",
- "task_scheduler/task_tracker_unittest.cc",
- "task_scheduler/task_traits_unittest.cc",
- "task_scheduler/task_unittest.cc",
- "task_scheduler/test_task_factory.cc",
- "task_scheduler/test_task_factory.h",
- "task_scheduler/test_utils.h",
- "template_util_unittest.cc",
- "test/histogram_tester_unittest.cc",
- "test/mock_callback_unittest.cc",
- "test/scoped_mock_time_message_loop_task_runner_unittest.cc",
- "test/scoped_task_scheduler_unittest.cc",
- "test/test_pending_task_unittest.cc",
- "test/test_reg_util_win_unittest.cc",
- "test/trace_event_analyzer_unittest.cc",
- "test/user_action_tester_unittest.cc",
- "threading/non_thread_safe_unittest.cc",
- "threading/platform_thread_unittest.cc",
- "threading/post_task_and_reply_impl_unittest.cc",
- "threading/sequenced_task_runner_handle_unittest.cc",
- "threading/sequenced_worker_pool_unittest.cc",
- "threading/simple_thread_unittest.cc",
- "threading/thread_checker_unittest.cc",
- "threading/thread_collision_warner_unittest.cc",
- "threading/thread_id_name_manager_unittest.cc",
- "threading/thread_local_storage_unittest.cc",
- "threading/thread_local_unittest.cc",
- "threading/thread_task_runner_handle_unittest.cc",
- "threading/thread_unittest.cc",
- "threading/watchdog_unittest.cc",
- "threading/worker_pool_posix_unittest.cc",
- "threading/worker_pool_unittest.cc",
- "time/pr_time_unittest.cc",
- "time/time_unittest.cc",
- "time/time_win_unittest.cc",
- "timer/hi_res_timer_manager_unittest.cc",
- "timer/mock_timer_unittest.cc",
- "timer/timer_unittest.cc",
- "tools_sanity_unittest.cc",
- "trace_event/blame_context_unittest.cc",
- "trace_event/event_name_filter_unittest.cc",
- "trace_event/heap_profiler_allocation_context_tracker_unittest.cc",
- "trace_event/heap_profiler_allocation_register_unittest.cc",
- "trace_event/heap_profiler_heap_dump_writer_unittest.cc",
- "trace_event/heap_profiler_stack_frame_deduplicator_unittest.cc",
- "trace_event/heap_profiler_type_name_deduplicator_unittest.cc",
- "trace_event/java_heap_dump_provider_android_unittest.cc",
- "trace_event/memory_allocator_dump_unittest.cc",
- "trace_event/memory_dump_manager_unittest.cc",
- "trace_event/memory_dump_scheduler_unittest.cc",
- "trace_event/memory_usage_estimator_unittest.cc",
- "trace_event/process_memory_dump_unittest.cc",
- "trace_event/trace_category_unittest.cc",
- "trace_event/trace_config_unittest.cc",
- "trace_event/trace_event_argument_unittest.cc",
- "trace_event/trace_event_filter_test_utils.cc",
- "trace_event/trace_event_filter_test_utils.h",
- "trace_event/trace_event_synthetic_delay_unittest.cc",
- "trace_event/trace_event_system_stats_monitor_unittest.cc",
- "trace_event/trace_event_unittest.cc",
- "tracked_objects_unittest.cc",
- "tuple_unittest.cc",
- "unguessable_token_unittest.cc",
- "values_unittest.cc",
- "version_unittest.cc",
- "vlog_unittest.cc",
- "win/dllmain.cc",
- "win/enum_variant_unittest.cc",
- "win/event_trace_consumer_unittest.cc",
- "win/event_trace_controller_unittest.cc",
- "win/event_trace_provider_unittest.cc",
- "win/i18n_unittest.cc",
- "win/iunknown_impl_unittest.cc",
- "win/message_window_unittest.cc",
- "win/object_watcher_unittest.cc",
- "win/pe_image_unittest.cc",
- "win/registry_unittest.cc",
- "win/scoped_bstr_unittest.cc",
- "win/scoped_comptr_unittest.cc",
- "win/scoped_handle_unittest.cc",
- "win/scoped_process_information_unittest.cc",
- "win/scoped_variant_unittest.cc",
- "win/shortcut_unittest.cc",
- "win/startup_information_unittest.cc",
- "win/wait_chain_unittest.cc",
- "win/win_util_unittest.cc",
- "win/windows_version_unittest.cc",
- "win/wrapped_window_proc_unittest.cc",
- ]
-
- defines = []
-
- deps = [
- ":base",
- ":i18n",
- ":message_loop_tests",
- "//base/allocator:features",
- "//base/test:native_library_test_utils",
- "//base/test:run_all_base_unittests",
- "//base/test:test_support",
- "//base/third_party/dynamic_annotations",
- "//testing/gmock",
- "//testing/gtest",
- "//third_party/icu",
- ]
-
- data_deps = [
- "//base/test:test_shared_library",
- ]
-
- if (is_ios || is_mac) {
- deps += [ ":base_unittests_arc" ]
- }
-
- public_deps = [
- ":base_unittests_bundle_data",
- ]
-
- # Some unittests depend on the ALLOCATOR_SHIM macro.
- configs += [ "//base/allocator:allocator_shim_define" ]
-
- data = [
- "test/data/",
- ]
-
- # Allow more direct string conversions on platforms with native utf8
- # strings
- if (is_mac || is_ios || is_chromeos || is_chromecast) {
- defines += [ "SYSTEM_NATIVE_UTF8" ]
- }
-
- if (is_android) {
- sources -= [
- "process/process_unittest.cc",
- "process/process_util_unittest.cc",
- ]
- deps += [
- ":base_java",
- ":base_java_unittest_support",
- "//base/android/jni_generator:jni_generator_tests",
- "//base/test:test_support_java",
- ]
- }
-
- if (is_ios) {
- sources -= [
- "files/file_locking_unittest.cc",
- "files/file_path_watcher_unittest.cc",
- "memory/discardable_shared_memory_unittest.cc",
- "memory/shared_memory_unittest.cc",
- "process/memory_unittest.cc",
- "process/process_unittest.cc",
- "process/process_util_unittest.cc",
- "sync_socket_unittest.cc",
- ]
-
- # Pull in specific Mac files for iOS (which have been filtered out by file
- # name rules).
- set_sources_assignment_filter([])
- sources += [
- "mac/bind_objc_block_unittest.mm",
- "mac/foundation_util_unittest.mm",
- "mac/objc_property_releaser_unittest.mm",
- "mac/objc_release_properties_unittest.mm",
- "mac/scoped_nsobject_unittest.mm",
- "strings/sys_string_conversions_mac_unittest.mm",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
-
- # TODO(GYP): dep on copy_test_data_ios action.
- }
-
- if (use_partition_alloc) {
- sources += [ "allocator/partition_allocator/partition_alloc_unittest.cc" ]
- }
-
- if (is_mac) {
- libs = [
- "CoreFoundation.framework",
- "Foundation.framework",
- ]
- }
-
- if (is_linux) {
- if (is_desktop_linux) {
- sources += [ "nix/xdg_util_unittest.cc" ]
- }
-
- deps += [ "//base/test:malloc_wrapper" ]
-
- if (!is_component_build) {
- # Set rpath to find libmalloc_wrapper.so even in a non-component build.
- configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
- }
- }
-
- if (!use_glib) {
- sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
- }
-
- if (is_posix && !is_ios) {
- sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
- deps += [ "//base/third_party/libevent" ]
- }
-
- if (is_android) {
- deps += [ "//testing/android/native_test:native_test_native_code" ]
- set_sources_assignment_filter([])
- sources += [
- "debug/proc_maps_linux_unittest.cc",
- "trace_event/trace_event_android_unittest.cc",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
- }
-
- if (is_win) {
- deps += [ "//base:scoped_handle_test_dll" ]
- if (current_cpu == "x64") {
- sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ]
- deps += [ ":base_profiler_test_support_library" ]
- }
- }
-
- if (use_experimental_allocator_shim) {
- sources += [ "allocator/allocator_shim_unittest.cc" ]
- }
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- # Symbols for crashes when running tests on swarming.
- if (symbol_level > 0) {
- if (is_win) {
- data += [ "$root_out_dir/base_unittests.exe.pdb" ]
- } else if (is_mac) {
- # TODO(crbug.com/330301): make this conditional on mac_strip_release.
- # data += [ "$root_out_dir/base_unittests.dSYM/" ]
- }
- }
-
- if (use_cfi_cast) {
- # TODO(krasin): remove CFI_CAST_CHECK, see https://crbug.com/626794.
- defines += [ "CFI_CAST_CHECK" ]
- }
-}
-
-action("build_date") {
- script = "//build/write_build_date_header.py"
-
- # Force recalculation if there's been a change.
- inputs = [
- "//build/util/LASTCHANGE",
- ]
- outputs = [
- "$target_gen_dir/generated_build_date.h",
- ]
-
- args =
- [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ]
-
- if (is_official_build) {
- args += [ "official" ]
- } else {
- args += [ "default" ]
- }
-
- if (override_build_date != "N/A") {
- args += [ override_build_date ]
- }
-}
-
-if (enable_nocompile_tests) {
- nocompile_test("base_nocompile_tests") {
- sources = [
- "bind_unittest.nc",
- "callback_list_unittest.nc",
- "callback_unittest.nc",
- "memory/weak_ptr_unittest.nc",
- "metrics/histogram_unittest.nc",
- ]
-
- deps = [
- ":base",
- "//base/test:run_all_unittests",
- "//testing/gtest",
- ]
- }
-}
-
-if (is_android) {
- generate_jni("base_jni_headers") {
- sources = [
- "android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java",
- "android/java/src/org/chromium/base/ApkAssets.java",
- "android/java/src/org/chromium/base/ApplicationStatus.java",
- "android/java/src/org/chromium/base/BuildInfo.java",
- "android/java/src/org/chromium/base/Callback.java",
- "android/java/src/org/chromium/base/CommandLine.java",
- "android/java/src/org/chromium/base/ContentUriUtils.java",
- "android/java/src/org/chromium/base/ContextUtils.java",
- "android/java/src/org/chromium/base/CpuFeatures.java",
- "android/java/src/org/chromium/base/EarlyTraceEvent.java",
- "android/java/src/org/chromium/base/EventLog.java",
- "android/java/src/org/chromium/base/FieldTrialList.java",
- "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
- "android/java/src/org/chromium/base/JNIUtils.java",
- "android/java/src/org/chromium/base/JavaExceptionReporter.java",
- "android/java/src/org/chromium/base/JavaHandlerThread.java",
- "android/java/src/org/chromium/base/LocaleUtils.java",
- "android/java/src/org/chromium/base/MemoryPressureListener.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/SysUtils.java",
- "android/java/src/org/chromium/base/SystemMessageHandler.java",
- "android/java/src/org/chromium/base/ThreadUtils.java",
- "android/java/src/org/chromium/base/ThrowUncaughtException.java",
- "android/java/src/org/chromium/base/TimeUtils.java",
- "android/java/src/org/chromium/base/TraceEvent.java",
- "android/java/src/org/chromium/base/UnguessableToken.java",
- "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
- "android/java/src/org/chromium/base/metrics/RecordHistogram.java",
- "android/java/src/org/chromium/base/metrics/RecordUserAction.java",
- "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java",
- ]
-
- public_deps = [
- ":android_runtime_jni_headers",
- ]
-
- jni_package = "base"
- }
-
- generate_jar_jni("android_runtime_jni_headers") {
- jni_package = "base"
- classes = [ "java/lang/Runtime.class" ]
- }
-
- android_library("base_java") {
- srcjar_deps = [
- ":base_android_java_enums_srcjar",
- ":base_build_config_gen",
- ":base_native_libraries_gen",
- ]
-
- deps = [
- "//third_party/android_tools:android_support_annotations_java",
- "//third_party/android_tools:android_support_multidex_java",
- "//third_party/jsr-305:jsr_305_javalib",
- ]
-
- java_files = [
- "android/java/src/org/chromium/base/ActivityState.java",
- "android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java",
- "android/java/src/org/chromium/base/ApiCompatibilityUtils.java",
- "android/java/src/org/chromium/base/ApkAssets.java",
- "android/java/src/org/chromium/base/ApplicationStatus.java",
- "android/java/src/org/chromium/base/BaseChromiumApplication.java",
- "android/java/src/org/chromium/base/BaseSwitches.java",
- "android/java/src/org/chromium/base/BuildInfo.java",
- "android/java/src/org/chromium/base/Callback.java",
- "android/java/src/org/chromium/base/CollectionUtil.java",
- "android/java/src/org/chromium/base/CommandLine.java",
- "android/java/src/org/chromium/base/CommandLineInitUtil.java",
- "android/java/src/org/chromium/base/ContentUriUtils.java",
- "android/java/src/org/chromium/base/ContextUtils.java",
- "android/java/src/org/chromium/base/CpuFeatures.java",
- "android/java/src/org/chromium/base/EarlyTraceEvent.java",
- "android/java/src/org/chromium/base/EventLog.java",
- "android/java/src/org/chromium/base/FieldTrialList.java",
- "android/java/src/org/chromium/base/FileUtils.java",
- "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
- "android/java/src/org/chromium/base/JNIUtils.java",
- "android/java/src/org/chromium/base/JavaExceptionReporter.java",
- "android/java/src/org/chromium/base/JavaHandlerThread.java",
- "android/java/src/org/chromium/base/LocaleUtils.java",
- "android/java/src/org/chromium/base/Log.java",
- "android/java/src/org/chromium/base/MemoryPressureListener.java",
- "android/java/src/org/chromium/base/NonThreadSafe.java",
- "android/java/src/org/chromium/base/ObserverList.java",
- "android/java/src/org/chromium/base/PackageUtils.java",
- "android/java/src/org/chromium/base/PathService.java",
- "android/java/src/org/chromium/base/PathUtils.java",
- "android/java/src/org/chromium/base/PerfTraceEvent.java",
- "android/java/src/org/chromium/base/PowerMonitor.java",
- "android/java/src/org/chromium/base/Promise.java",
- "android/java/src/org/chromium/base/ResourceExtractor.java",
- "android/java/src/org/chromium/base/SecureRandomInitializer.java",
- "android/java/src/org/chromium/base/StreamUtil.java",
- "android/java/src/org/chromium/base/SysUtils.java",
- "android/java/src/org/chromium/base/SystemMessageHandler.java",
- "android/java/src/org/chromium/base/ThreadUtils.java",
- "android/java/src/org/chromium/base/ThrowUncaughtException.java",
- "android/java/src/org/chromium/base/TimeUtils.java",
- "android/java/src/org/chromium/base/TraceEvent.java",
- "android/java/src/org/chromium/base/UnguessableToken.java",
- "android/java/src/org/chromium/base/VisibleForTesting.java",
- "android/java/src/org/chromium/base/annotations/AccessedByNative.java",
- "android/java/src/org/chromium/base/annotations/CalledByNative.java",
- "android/java/src/org/chromium/base/annotations/CalledByNativeUnchecked.java",
- "android/java/src/org/chromium/base/annotations/JNIAdditionalImport.java",
- "android/java/src/org/chromium/base/annotations/JNINamespace.java",
- "android/java/src/org/chromium/base/annotations/MainDex.java",
- "android/java/src/org/chromium/base/annotations/NativeCall.java",
- "android/java/src/org/chromium/base/annotations/NativeClassQualifiedName.java",
- "android/java/src/org/chromium/base/annotations/RemovableInRelease.java",
- "android/java/src/org/chromium/base/annotations/SuppressFBWarnings.java",
- "android/java/src/org/chromium/base/annotations/UsedByReflection.java",
- "android/java/src/org/chromium/base/library_loader/LegacyLinker.java",
- "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
- "android/java/src/org/chromium/base/library_loader/Linker.java",
- "android/java/src/org/chromium/base/library_loader/LoaderErrors.java",
- "android/java/src/org/chromium/base/library_loader/ModernLinker.java",
- "android/java/src/org/chromium/base/library_loader/NativeLibraryPreloader.java",
- "android/java/src/org/chromium/base/library_loader/ProcessInitException.java",
- "android/java/src/org/chromium/base/metrics/CachedMetrics.java",
- "android/java/src/org/chromium/base/metrics/RecordHistogram.java",
- "android/java/src/org/chromium/base/metrics/RecordUserAction.java",
- "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java",
- "android/java/src/org/chromium/base/multidex/ChromiumMultiDexInstaller.java",
- "android/java/src/org/chromium/base/process_launcher/ChildProcessCreationParams.java",
- "android/java/src/org/chromium/base/process_launcher/FileDescriptorInfo.java",
- ]
-
- # New versions of BuildConfig.java and NativeLibraries.java
- # (with the actual correct values) will be created when creating an apk.
- jar_excluded_patterns = [
- "*/BuildConfig.class",
- "*/NativeLibraries.class",
- "*/NativeLibraries##*.class",
- ]
- }
-
- android_library("base_javatests") {
- testonly = true
- deps = [
- ":base_java",
- ":base_java_test_support",
- "//third_party/android_support_test_runner:runner_java",
- "//third_party/junit:junit",
- ]
- java_files = [
- "android/javatests/src/org/chromium/base/AdvancedMockContextTest.java",
- "android/javatests/src/org/chromium/base/ApiCompatibilityUtilsTest.java",
- "android/javatests/src/org/chromium/base/CommandLineInitUtilTest.java",
- "android/javatests/src/org/chromium/base/CommandLineTest.java",
-
- # TODO(nona): move to Junit once that is built for Android N.
- "android/javatests/src/org/chromium/base/LocaleUtilsTest.java",
- "android/javatests/src/org/chromium/base/ObserverListTest.java",
- "android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java",
- ]
- }
-
- android_library("base_java_test_support") {
- testonly = true
- deps = [
- ":base_java",
- "//testing/android/reporter:reporter_java",
- "//third_party/android_support_test_runner:exposed_instrumentation_api_publish_java",
- "//third_party/android_support_test_runner:runner_java",
- "//third_party/hamcrest:hamcrest_core_java",
- "//third_party/junit",
- ]
- java_files = [
- "test/android/javatests/src/org/chromium/base/test/BaseActivityInstrumentationTestCase.java",
- "test/android/javatests/src/org/chromium/base/test/BaseChromiumInstrumentationTestRunner.java",
- "test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java",
- "test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java",
- "test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java",
- "test/android/javatests/src/org/chromium/base/test/BaseTestResult.java",
- "test/android/javatests/src/org/chromium/base/test/util/AdvancedMockContext.java",
- "test/android/javatests/src/org/chromium/base/test/util/CallbackHelper.java",
- "test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java",
- "test/android/javatests/src/org/chromium/base/test/util/DisableIf.java",
- "test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java",
- "test/android/javatests/src/org/chromium/base/test/util/DisabledTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/EnormousTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/Feature.java",
- "test/android/javatests/src/org/chromium/base/test/util/FlakyTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferences.java",
- "test/android/javatests/src/org/chromium/base/test/util/InstrumentationUtils.java",
- "test/android/javatests/src/org/chromium/base/test/util/IntegrationTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/Manual.java",
- "test/android/javatests/src/org/chromium/base/test/util/Matchers.java",
- "test/android/javatests/src/org/chromium/base/test/util/MetricsUtils.java",
- "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevel.java",
- "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevelSkipCheck.java",
- "test/android/javatests/src/org/chromium/base/test/util/PerfTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/Restriction.java",
- "test/android/javatests/src/org/chromium/base/test/util/RestrictionSkipCheck.java",
- "test/android/javatests/src/org/chromium/base/test/util/RetryOnFailure.java",
- "test/android/javatests/src/org/chromium/base/test/util/ScalableTimeout.java",
- "test/android/javatests/src/org/chromium/base/test/util/SkipCheck.java",
- "test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java",
- "test/android/javatests/src/org/chromium/base/test/util/TestThread.java",
- "test/android/javatests/src/org/chromium/base/test/util/TimeoutScale.java",
- "test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java",
- "test/android/javatests/src/org/chromium/base/test/util/parameter/BaseParameter.java",
- "test/android/javatests/src/org/chromium/base/test/util/parameter/Parameter.java",
- "test/android/javatests/src/org/chromium/base/test/util/parameter/Parameterizable.java",
- "test/android/javatests/src/org/chromium/base/test/util/parameter/ParameterizedTest.java",
- "test/android/javatests/src/org/chromium/base/test/util/parameter/parameters/MethodParameter.java",
- ]
- }
-
- junit_binary("base_junit_tests") {
- java_files = [
- "android/junit/src/org/chromium/base/BaseChromiumApplicationTest.java",
- "android/junit/src/org/chromium/base/LogTest.java",
- "android/junit/src/org/chromium/base/NonThreadSafeTest.java",
- "android/junit/src/org/chromium/base/PromiseTest.java",
- "test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java",
- "test/android/junit/src/org/chromium/base/test/util/MinAndroidSdkLevelSkipCheckTest.java",
- "test/android/junit/src/org/chromium/base/test/util/RestrictionSkipCheckTest.java",
- "test/android/junit/src/org/chromium/base/test/util/SkipCheckTest.java",
- ]
- deps = [
- ":base_java",
- ":base_java_test_support",
- ]
- srcjar_deps = [ ":base_build_config_gen" ]
- }
-
- java_cpp_enum("base_android_java_enums_srcjar") {
- sources = [
- "android/application_status_listener.h",
- "android/library_loader/library_load_from_apk_status_codes.h",
- "android/library_loader/library_loader_hooks.h",
- "memory/memory_pressure_listener.h",
- ]
- }
-
- java_cpp_template("base_build_config_gen") {
- sources = [
- "android/java/templates/BuildConfig.template",
- ]
- package_name = "org/chromium/base"
-
- defines = []
- if (is_java_debug || dcheck_always_on) {
- defines += [ "_DCHECK_IS_ON" ]
- }
- }
-
- java_cpp_template("base_native_libraries_gen") {
- sources = [
- "android/java/templates/NativeLibraries.template",
- ]
- package_name = "org/chromium/base/library_loader"
- }
-
- android_library("base_java_unittest_support") {
- testonly = true
- deps = [
- ":base_java",
- ]
- java_files = [
- "test/android/java/src/org/chromium/base/ContentUriTestUtils.java",
- "test/android/java/src/org/chromium/base/TestSystemMessageHandler.java",
- ]
- }
-}
-
-fuzzer_test("base_json_correctness_fuzzer") {
- sources = [
- "json/correctness_fuzzer.cc",
- ]
- deps = [
- ":base",
- ]
-}
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
deleted file mode 100644
index 8cdb06161f..0000000000
--- a/base/allocator/BUILD.gn
+++ /dev/null
@@ -1,309 +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.
-
-import("//build/buildflag_header.gni")
-import("//build/config/allocator.gni")
-import("//build/config/compiler/compiler.gni")
-
-declare_args() {
- # Provide a way to force disable debugallocation in Debug builds,
- # e.g. for profiling (it's more rare to profile Debug builds,
- # but people sometimes need to do that).
- enable_debugallocation = is_debug
-}
-
-# The Windows-only allocator shim is only enabled for Release static builds, and
-# is mutually exclusive with the generalized shim.
-win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
- !use_experimental_allocator_shim && !is_asan
-
-# This "allocator" meta-target will forward to the default allocator according
-# to the build settings.
-group("allocator") {
- public_deps = []
- deps = []
-
- if (use_allocator == "tcmalloc") {
- deps += [ ":tcmalloc" ]
- }
-
- if (win_use_allocator_shim) {
- public_deps += [ ":allocator_shim" ]
- }
-}
-
-# This config defines ALLOCATOR_SHIM in the same conditions that the allocator
-# shim will be used by the allocator target.
-#
-# TODO(brettw) this is only used in one place and is kind of mess, because it
-# assumes that the library using it will eventually be linked with
-# //base/allocator in the default way. Clean this up and delete this.
-config("allocator_shim_define") {
- if (win_use_allocator_shim) {
- defines = [ "ALLOCATOR_SHIM" ]
- }
-}
-
-config("tcmalloc_flags") {
- defines = []
- if (enable_debugallocation) {
- defines += [
- # Use debugallocation for Debug builds to catch problems early
- # and cleanly, http://crbug.com/30715 .
- "TCMALLOC_FOR_DEBUGALLOCATION",
- ]
- }
- if (use_experimental_allocator_shim) {
- defines += [ "TCMALLOC_DONT_REPLACE_SYSTEM_ALLOC" ]
- }
- if (is_clang) {
- cflags = [
- # tcmalloc initializes some fields in the wrong order.
- "-Wno-reorder",
-
- # tcmalloc contains some unused local template specializations.
- "-Wno-unused-function",
-
- # tcmalloc uses COMPILE_ASSERT without static_assert but with
- # typedefs.
- "-Wno-unused-local-typedefs",
-
- # for magic2_ in debugallocation.cc (only built in Debug builds)
- # typedefs.
- "-Wno-unused-private-field",
- ]
- } else {
- cflags = []
- }
-
- if (is_linux || is_android) {
- # We enable all warnings by default, but upstream disables a few.
- # Keep "-Wno-*" flags in sync with upstream by comparing against:
- # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.am
- cflags += [
- "-Wno-sign-compare",
- "-Wno-unused-result",
- ]
- }
-}
-
-# This config is only used on Windows static release builds for the
-# allocator shim.
-if (win_use_allocator_shim) {
- source_set("allocator_shim") {
- sources = [
- "allocator_shim_win.cc",
- "allocator_shim_win.h",
- "winheap_stubs_win.cc",
- "winheap_stubs_win.h",
- ]
- configs += [ ":allocator_shim_define" ]
- }
-}
-
-if (use_allocator == "tcmalloc") {
- # tcmalloc currently won't compile on Android.
- source_set("tcmalloc") {
- tcmalloc_dir = "//third_party/tcmalloc/chromium"
-
- # Don't check tcmalloc's includes. These files include various files like
- # base/foo.h and they actually refer to tcmalloc's forked copy of base
- # rather than the regular one, which confuses the header checker.
- check_includes = false
-
- sources = [
- # Generated for our configuration from tcmalloc's build
- # and checked in.
- "$tcmalloc_dir/src/config.h",
- "$tcmalloc_dir/src/config_android.h",
- "$tcmalloc_dir/src/config_linux.h",
- "$tcmalloc_dir/src/config_win.h",
-
- # tcmalloc native and forked files.
- "$tcmalloc_dir/src/base/abort.cc",
- "$tcmalloc_dir/src/base/abort.h",
- "$tcmalloc_dir/src/base/arm_instruction_set_select.h",
- "$tcmalloc_dir/src/base/atomicops-internals-arm-generic.h",
- "$tcmalloc_dir/src/base/atomicops-internals-arm-v6plus.h",
- "$tcmalloc_dir/src/base/atomicops-internals-linuxppc.h",
- "$tcmalloc_dir/src/base/atomicops-internals-macosx.h",
- "$tcmalloc_dir/src/base/atomicops-internals-windows.h",
- "$tcmalloc_dir/src/base/atomicops-internals-x86.cc",
- "$tcmalloc_dir/src/base/atomicops-internals-x86.h",
- "$tcmalloc_dir/src/base/atomicops.h",
- "$tcmalloc_dir/src/base/commandlineflags.h",
- "$tcmalloc_dir/src/base/cycleclock.h",
-
- # We don't list dynamic_annotations.c since its copy is already
- # present in the dynamic_annotations target.
- "$tcmalloc_dir/src/base/elf_mem_image.cc",
- "$tcmalloc_dir/src/base/elf_mem_image.h",
- "$tcmalloc_dir/src/base/linuxthreads.cc",
- "$tcmalloc_dir/src/base/linuxthreads.h",
- "$tcmalloc_dir/src/base/logging.cc",
- "$tcmalloc_dir/src/base/logging.h",
- "$tcmalloc_dir/src/base/low_level_alloc.cc",
- "$tcmalloc_dir/src/base/low_level_alloc.h",
- "$tcmalloc_dir/src/base/spinlock.cc",
- "$tcmalloc_dir/src/base/spinlock.h",
- "$tcmalloc_dir/src/base/spinlock_internal.cc",
- "$tcmalloc_dir/src/base/spinlock_internal.h",
- "$tcmalloc_dir/src/base/synchronization_profiling.h",
- "$tcmalloc_dir/src/base/sysinfo.cc",
- "$tcmalloc_dir/src/base/sysinfo.h",
- "$tcmalloc_dir/src/base/vdso_support.cc",
- "$tcmalloc_dir/src/base/vdso_support.h",
- "$tcmalloc_dir/src/central_freelist.cc",
- "$tcmalloc_dir/src/central_freelist.h",
- "$tcmalloc_dir/src/common.cc",
- "$tcmalloc_dir/src/common.h",
-
- # #included by debugallocation_shim.cc
- #"$tcmalloc_dir/src/debugallocation.cc",
- "$tcmalloc_dir/src/free_list.cc",
- "$tcmalloc_dir/src/free_list.h",
- "$tcmalloc_dir/src/heap-profile-table.cc",
- "$tcmalloc_dir/src/heap-profile-table.h",
- "$tcmalloc_dir/src/heap-profiler.cc",
- "$tcmalloc_dir/src/internal_logging.cc",
- "$tcmalloc_dir/src/internal_logging.h",
- "$tcmalloc_dir/src/linked_list.h",
- "$tcmalloc_dir/src/malloc_extension.cc",
- "$tcmalloc_dir/src/malloc_hook-inl.h",
- "$tcmalloc_dir/src/malloc_hook.cc",
- "$tcmalloc_dir/src/maybe_threads.cc",
- "$tcmalloc_dir/src/maybe_threads.h",
- "$tcmalloc_dir/src/memory_region_map.cc",
- "$tcmalloc_dir/src/memory_region_map.h",
- "$tcmalloc_dir/src/page_heap.cc",
- "$tcmalloc_dir/src/page_heap.h",
- "$tcmalloc_dir/src/raw_printer.cc",
- "$tcmalloc_dir/src/raw_printer.h",
- "$tcmalloc_dir/src/sampler.cc",
- "$tcmalloc_dir/src/sampler.h",
- "$tcmalloc_dir/src/span.cc",
- "$tcmalloc_dir/src/span.h",
- "$tcmalloc_dir/src/stack_trace_table.cc",
- "$tcmalloc_dir/src/stack_trace_table.h",
- "$tcmalloc_dir/src/stacktrace.cc",
- "$tcmalloc_dir/src/static_vars.cc",
- "$tcmalloc_dir/src/static_vars.h",
- "$tcmalloc_dir/src/symbolize.cc",
- "$tcmalloc_dir/src/symbolize.h",
- "$tcmalloc_dir/src/system-alloc.cc",
- "$tcmalloc_dir/src/system-alloc.h",
-
- # #included by debugallocation_shim.cc
- #"$tcmalloc_dir/src/tcmalloc.cc",
- "$tcmalloc_dir/src/thread_cache.cc",
- "$tcmalloc_dir/src/thread_cache.h",
- "$tcmalloc_dir/src/windows/port.cc",
- "$tcmalloc_dir/src/windows/port.h",
- "debugallocation_shim.cc",
-
- # These are both #included by allocator_shim for maximal linking.
- #"generic_allocators.cc",
- #"win_allocator.cc",
- ]
-
- # Disable the heap checker in tcmalloc.
- defines = [ "NO_HEAP_CHECK" ]
-
- include_dirs = [
- ".",
- "$tcmalloc_dir/src/base",
- "$tcmalloc_dir/src",
- ]
-
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":tcmalloc_flags",
- ]
-
- # Thumb mode disabled due to bug in clang integrated assembler
- # TODO(https://llvm.org/bugs/show_bug.cgi?id=31058)
- configs -= [ "//build/config/compiler:compiler_arm_thumb" ]
- configs += [ "//build/config/compiler:compiler_arm" ]
-
- # TODO(crbug.com/633719) Make tcmalloc work with AFDO if possible.
- configs -= [ "//build/config/compiler:afdo" ]
-
- deps = []
-
- if (enable_profiling) {
- sources += [
- "$tcmalloc_dir/src/base/thread_lister.c",
- "$tcmalloc_dir/src/base/thread_lister.h",
- "$tcmalloc_dir/src/profile-handler.cc",
- "$tcmalloc_dir/src/profile-handler.h",
- "$tcmalloc_dir/src/profiledata.cc",
- "$tcmalloc_dir/src/profiledata.h",
- "$tcmalloc_dir/src/profiler.cc",
- ]
- defines += [ "ENABLE_PROFILING=1" ]
- }
-
- if (is_linux || is_android) {
- sources -= [
- "$tcmalloc_dir/src/system-alloc.h",
- "$tcmalloc_dir/src/windows/port.cc",
- "$tcmalloc_dir/src/windows/port.h",
- ]
-
- # Compiling tcmalloc with -fvisibility=default is only necessary when
- # not using the allocator shim, which provides the correct visibility
- # annotations for those symbols which need to be exported (see
- # //base/allocator/allocator_shim_override_glibc_weak_symbols.h and
- # //base/allocator/allocator_shim_internals.h for the definition of
- # SHIM_ALWAYS_EXPORT).
- if (!use_experimental_allocator_shim) {
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
- configs += [ "//build/config/gcc:symbol_visibility_default" ]
- }
-
- ldflags = [
- # Don't let linker rip this symbol out, otherwise the heap&cpu
- # profilers will not initialize properly on startup.
- "-Wl,-uIsHeapProfilerRunning,-uProfilerStart",
-
- # Do the same for heap leak checker.
- "-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi",
- "-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl",
- "-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv",
- ]
- }
-
- # Make sure the allocation library is optimized as much as possible when
- # we"re in release mode.
- if (!is_debug) {
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_max" ]
- }
-
- deps += [ "//base/third_party/dynamic_annotations" ]
- }
-} # use_allocator == "tcmalloc"
-
-buildflag_header("features") {
- header = "features.h"
- flags = [
- "USE_EXPERIMENTAL_ALLOCATOR_SHIM=$use_experimental_allocator_shim",
- "ENABLE_WIN_ALLOCATOR_SHIM_TESTS=($use_experimental_allocator_shim || $win_use_allocator_shim)",
- ]
-}
-
-# Used to shim malloc symbols on Android. see //base/allocator/README.md.
-config("wrap_malloc_symbols") {
- ldflags = [
- "-Wl,-wrap,calloc",
- "-Wl,-wrap,free",
- "-Wl,-wrap,malloc",
- "-Wl,-wrap,memalign",
- "-Wl,-wrap,posix_memalign",
- "-Wl,-wrap,pvalloc",
- "-Wl,-wrap,realloc",
- "-Wl,-wrap,valloc",
- ]
-}
diff --git a/base/i18n/base_i18n_export.h b/base/i18n/base_i18n_export.h
deleted file mode 100644
index e8a2adda17..0000000000
--- a/base/i18n/base_i18n_export.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2011 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_I18N_BASE_I18N_EXPORT_H_
-#define BASE_I18N_BASE_I18N_EXPORT_H_
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(BASE_I18N_IMPLEMENTATION)
-#define BASE_I18N_EXPORT __declspec(dllexport)
-#else
-#define BASE_I18N_EXPORT __declspec(dllimport)
-#endif // defined(BASE_I18N_IMPLEMENTATION)
-
-#else // defined(WIN32)
-#if defined(BASE_I18N_IMPLEMENTATION)
-#define BASE_I18N_EXPORT __attribute__((visibility("default")))
-#else
-#define BASE_I18N_EXPORT
-#endif
-#endif
-
-#else // defined(COMPONENT_BUILD)
-#define BASE_I18N_EXPORT
-#endif
-
-#endif // BASE_I18N_BASE_I18N_EXPORT_H_
diff --git a/base/ios/block_types.h b/base/ios/block_types.h
deleted file mode 100644
index e4dde798aa..0000000000
--- a/base/ios/block_types.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 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_IOS_BLOCK_TYPES_H_
-#define BASE_IOS_BLOCK_TYPES_H_
-
-// A generic procedural block type that takes no arguments and returns nothing.
-typedef void (^ProceduralBlock)(void);
-
-// A block that takes no arguments and returns a bool.
-typedef bool (^ConditionBlock)(void);
-
-#endif // BASE_IOS_BLOCK_TYPES_H_
diff --git a/base/macros.h b/base/macros.h
index 4c62300e32..b5b03bb226 100644
--- a/base/macros.h
+++ b/base/macros.h
@@ -17,6 +17,8 @@
#include <android-base/macros.h>
#endif // defined(ANDROID)
+// We define following macros conditionally as they may be defined by another libraries.
+
// Put this in the declarations for a class to be uncopyable.
#if !defined(DISALLOW_COPY)
#define DISALLOW_COPY(TypeName) \
@@ -29,9 +31,8 @@
void operator=(const TypeName&) = delete
#endif
-// A macro to disallow the copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-// We define this macro conditionally as it may be defined by another libraries.
+// A macro to disallow the copy constructor and operator= functions.
+// This should be used in the private: declarations for a class.
#if !defined(DISALLOW_COPY_AND_ASSIGN)
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index eba68a72ba..3d55920afd 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -641,8 +641,6 @@ bool MessageLoopForUI::WatchFileDescriptor(
//------------------------------------------------------------------------------
// MessageLoopForIO
-MessageLoopForIO::MessageLoopForIO() : MessageLoop(TYPE_IO) {}
-
#if !defined(OS_NACL_SFI)
#if defined(OS_WIN)
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 6b4765bd1b..fa054f421a 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -559,7 +559,8 @@ static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
//
class BASE_EXPORT MessageLoopForIO : public MessageLoop {
public:
- MessageLoopForIO();
+ MessageLoopForIO() : MessageLoop(TYPE_IO) {
+ }
// Returns the MessageLoopForIO of the current thread.
static MessageLoopForIO* current() {
diff --git a/base/metrics/sample_map_unittest.cc b/base/metrics/sample_map_unittest.cc
index 9d7e818bb7..91a9dcf40f 100644
--- a/base/metrics/sample_map_unittest.cc
+++ b/base/metrics/sample_map_unittest.cc
@@ -145,8 +145,6 @@ TEST(SampleMapIteratorTest, SkipEmptyRanges) {
EXPECT_TRUE(it->Done());
}
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
SampleMap samples(1);
@@ -157,17 +155,14 @@ TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
HistogramBase::Sample min;
HistogramBase::Sample max;
HistogramBase::Count count;
- EXPECT_DEATH(it->Get(&min, &max, &count), "");
+ EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
- EXPECT_DEATH(it->Next(), "");
+ EXPECT_DCHECK_DEATH(it->Next());
samples.Accumulate(1, 100);
it = samples.Iterator();
EXPECT_FALSE(it->Done());
}
-#endif
-// (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
} // namespace
} // namespace base
diff --git a/base/metrics/sample_vector_unittest.cc b/base/metrics/sample_vector_unittest.cc
index 897ceed520..2d77d2376b 100644
--- a/base/metrics/sample_vector_unittest.cc
+++ b/base/metrics/sample_vector_unittest.cc
@@ -116,7 +116,6 @@ TEST(SampleVectorTest, AddSubtractTest) {
EXPECT_EQ(samples1.redundant_count(), samples1.TotalCount());
}
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
TEST(SampleVectorDeathTest, BucketIndexTest) {
// 8 buckets with exponential layout:
// [0, 1) [1, 2) [2, 4) [4, 8) [8, 16) [16, 32) [32, 64) [64, INT_MAX)
@@ -133,9 +132,9 @@ TEST(SampleVectorDeathTest, BucketIndexTest) {
EXPECT_EQ(3, samples.GetCount(65));
// Extreme case.
- EXPECT_DEATH(samples.Accumulate(INT_MIN, 100), "");
- EXPECT_DEATH(samples.Accumulate(-1, 100), "");
- EXPECT_DEATH(samples.Accumulate(INT_MAX, 100), "");
+ EXPECT_DCHECK_DEATH(samples.Accumulate(INT_MIN, 100));
+ EXPECT_DCHECK_DEATH(samples.Accumulate(-1, 100));
+ EXPECT_DCHECK_DEATH(samples.Accumulate(INT_MAX, 100));
// Custom buckets: [1, 5) [5, 10)
// Note, this is not a valid BucketRanges for Histogram because it does not
@@ -155,8 +154,8 @@ TEST(SampleVectorDeathTest, BucketIndexTest) {
EXPECT_EQ(4, samples2.GetCount(5));
// Extreme case.
- EXPECT_DEATH(samples2.Accumulate(0, 100), "");
- EXPECT_DEATH(samples2.Accumulate(10, 100), "");
+ EXPECT_DCHECK_DEATH(samples2.Accumulate(0, 100));
+ EXPECT_DCHECK_DEATH(samples2.Accumulate(10, 100));
}
TEST(SampleVectorDeathTest, AddSubtractBucketNotMatchTest) {
@@ -182,25 +181,22 @@ TEST(SampleVectorDeathTest, AddSubtractBucketNotMatchTest) {
// Extra bucket in the beginning.
samples2.Accumulate(0, 100);
- EXPECT_DEATH(samples1.Add(samples2), "");
- EXPECT_DEATH(samples1.Subtract(samples2), "");
+ EXPECT_DCHECK_DEATH(samples1.Add(samples2));
+ EXPECT_DCHECK_DEATH(samples1.Subtract(samples2));
// Extra bucket in the end.
samples2.Accumulate(0, -100);
samples2.Accumulate(6, 100);
- EXPECT_DEATH(samples1.Add(samples2), "");
- EXPECT_DEATH(samples1.Subtract(samples2), "");
+ EXPECT_DCHECK_DEATH(samples1.Add(samples2));
+ EXPECT_DCHECK_DEATH(samples1.Subtract(samples2));
// Bucket not match: [3, 5) VS [3, 6)
samples2.Accumulate(6, -100);
samples2.Accumulate(3, 100);
- EXPECT_DEATH(samples1.Add(samples2), "");
- EXPECT_DEATH(samples1.Subtract(samples2), "");
+ EXPECT_DCHECK_DEATH(samples1.Add(samples2));
+ EXPECT_DCHECK_DEATH(samples1.Subtract(samples2));
}
-#endif
-// (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
TEST(SampleVectorIteratorTest, IterateTest) {
BucketRanges ranges(5);
ranges.set_range(0, 0);
@@ -261,8 +257,6 @@ TEST(SampleVectorIteratorTest, IterateTest) {
EXPECT_EQ(4, i);
}
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
TEST(SampleVectorIteratorDeathTest, IterateDoneTest) {
BucketRanges ranges(5);
ranges.set_range(0, 0);
@@ -279,17 +273,14 @@ TEST(SampleVectorIteratorDeathTest, IterateDoneTest) {
HistogramBase::Sample min;
HistogramBase::Sample max;
HistogramBase::Count count;
- EXPECT_DEATH(it->Get(&min, &max, &count), "");
+ EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
- EXPECT_DEATH(it->Next(), "");
+ EXPECT_DCHECK_DEATH(it->Next());
samples.Accumulate(2, 100);
it = samples.Iterator();
EXPECT_FALSE(it->Done());
}
-#endif
-// (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
} // namespace
} // namespace base
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 3da6793afb..9b94891dd9 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -126,12 +126,7 @@ static bool WaitForSingleNonChildProcess(base::ProcessHandle handle,
}
result = -1;
-#if defined(ANDROID)
- struct kevent event;
- memset(&event, 0, sizeof(event));
-#else
struct kevent event = {0};
-#endif
while (wait_forever || remaining_delta > base::TimeDelta()) {
struct timespec remaining_timespec;
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 29076ed913..35b2603786 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -22,12 +22,6 @@
#include "base/strings/string_piece.h" // For implicit conversions.
#include "build/build_config.h"
-#if defined(ANDROID)
-// On Android, bionic's stdio.h defines an snprintf macro when being built with
-// clang. Undefine it here so it won't collide with base::snprintf().
-#undef snprintf
-#endif // defined(ANDROID)
-
namespace base {
// C standard-library functions that aren't cross-platform are provided as
diff --git a/base/synchronization/lock_impl_posix.cc b/base/synchronization/lock_impl_posix.cc
index ff997ea65f..e54595b87f 100644
--- a/base/synchronization/lock_impl_posix.cc
+++ b/base/synchronization/lock_impl_posix.cc
@@ -21,7 +21,7 @@ namespace internal {
// Lock::PriorityInheritanceAvailable still must be checked as the code may
// compile but the underlying platform still may not correctly support priority
// inheritance locks.
-#if defined(OS_NACL) || defined(OS_ANDROID) || defined(__ANDROID__)
+#if defined(OS_NACL) || defined(OS_ANDROID)
#define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
#else
#define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index 7d3714663b..36119abf00 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -85,7 +85,10 @@ bool IsStatsZeroIfUnlimited(const base::FilePath& path) {
if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
return false;
- switch (static_cast<uint32_t>(stats.f_type)) {
+ // In some platforms, |statfs_buf.f_type| is declared as signed, but some of
+ // the values will overflow it, causing narrowing warnings. Cast to the
+ // largest possible unsigned integer type to avoid it.
+ switch (static_cast<uintmax_t>(stats.f_type)) {
case TMPFS_MAGIC:
case HUGETLBFS_MAGIC:
case RAMFS_MAGIC:
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn
deleted file mode 100644
index a1c47de5a2..0000000000
--- a/base/test/BUILD.gn
+++ /dev/null
@@ -1,377 +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.
-
-import("//build/config/ui.gni")
-import("//build/config/nacl/config.gni")
-
-if (is_android) {
- import("//build/config/android/rules.gni")
-}
-
-static_library("test_config") {
- testonly = true
- sources = [
- "test_switches.cc",
- "test_switches.h",
- "test_timeouts.cc",
- "test_timeouts.h",
- ]
- deps = [
- "//base",
- ]
-}
-
-static_library("test_support") {
- testonly = true
- sources = [
- "../trace_event/trace_config_memory_test_util.h",
- "android/java_handler_thread_for_testing.cc",
- "android/java_handler_thread_for_testing.h",
- "android/test_system_message_handler_link_android.cc",
- "android/test_system_message_handler_link_android.h",
- "fuzzed_data_provider.cc",
- "fuzzed_data_provider.h",
- "gtest_util.cc",
- "gtest_util.h",
- "gtest_xml_unittest_result_printer.cc",
- "gtest_xml_unittest_result_printer.h",
- "gtest_xml_util.cc",
- "gtest_xml_util.h",
- "histogram_tester.cc",
- "histogram_tester.h",
- "icu_test_util.cc",
- "icu_test_util.h",
- "ios/wait_util.h",
- "ios/wait_util.mm",
- "launcher/test_result.cc",
- "launcher/test_result.h",
- "launcher/test_results_tracker.h",
- "launcher/unit_test_launcher.h",
- "mock_callback.h",
- "mock_chrome_application_mac.h",
- "mock_chrome_application_mac.mm",
- "mock_devices_changed_observer.cc",
- "mock_devices_changed_observer.h",
- "mock_entropy_provider.cc",
- "mock_entropy_provider.h",
- "mock_log.cc",
- "mock_log.h",
- "multiprocess_test.cc",
- "multiprocess_test.h",
- "multiprocess_test_android.cc",
- "null_task_runner.cc",
- "null_task_runner.h",
- "opaque_ref_counted.cc",
- "opaque_ref_counted.h",
- "perf_log.cc",
- "perf_log.h",
- "perf_test_suite.cc",
- "perf_test_suite.h",
- "perf_time_logger.cc",
- "perf_time_logger.h",
- "power_monitor_test_base.cc",
- "power_monitor_test_base.h",
- "scoped_async_task_scheduler.cc",
- "scoped_async_task_scheduler.h",
- "scoped_command_line.cc",
- "scoped_command_line.h",
- "scoped_feature_list.cc",
- "scoped_feature_list.h",
- "scoped_locale.cc",
- "scoped_locale.h",
- "scoped_mock_time_message_loop_task_runner.cc",
- "scoped_mock_time_message_loop_task_runner.h",
- "scoped_path_override.cc",
- "scoped_path_override.h",
- "scoped_task_scheduler.cc",
- "scoped_task_scheduler.h",
- "sequenced_task_runner_test_template.cc",
- "sequenced_task_runner_test_template.h",
- "sequenced_worker_pool_owner.cc",
- "sequenced_worker_pool_owner.h",
- "simple_test_clock.cc",
- "simple_test_clock.h",
- "simple_test_tick_clock.cc",
- "simple_test_tick_clock.h",
- "task_runner_test_template.cc",
- "task_runner_test_template.h",
- "test_discardable_memory_allocator.cc",
- "test_discardable_memory_allocator.h",
- "test_file_util.cc",
- "test_file_util.h",
- "test_file_util_android.cc",
- "test_file_util_linux.cc",
- "test_file_util_mac.cc",
- "test_file_util_posix.cc",
- "test_file_util_win.cc",
- "test_io_thread.cc",
- "test_io_thread.h",
- "test_listener_ios.h",
- "test_listener_ios.mm",
- "test_message_loop.cc",
- "test_message_loop.h",
- "test_mock_time_task_runner.cc",
- "test_mock_time_task_runner.h",
- "test_pending_task.cc",
- "test_pending_task.h",
- "test_reg_util_win.cc",
- "test_reg_util_win.h",
- "test_shortcut_win.cc",
- "test_shortcut_win.h",
- "test_simple_task_runner.cc",
- "test_simple_task_runner.h",
- "test_suite.cc",
- "test_suite.h",
- "test_support_android.cc",
- "test_support_android.h",
- "test_support_ios.h",
- "test_support_ios.mm",
- "test_ui_thread_android.cc",
- "test_ui_thread_android.h",
- "thread_test_helper.cc",
- "thread_test_helper.h",
- "trace_event_analyzer.cc",
- "trace_event_analyzer.h",
- "trace_to_file.cc",
- "trace_to_file.h",
- "user_action_tester.cc",
- "user_action_tester.h",
- "values_test_util.cc",
- "values_test_util.h",
- ]
-
- if (is_ios) {
- sources += [ "launcher/unit_test_launcher_ios.cc" ]
- } else if (!is_nacl_nonsfi) {
- sources += [
- "launcher/test_launcher.cc",
- "launcher/test_launcher.h",
- "launcher/test_launcher_tracer.cc",
- "launcher/test_launcher_tracer.h",
- "launcher/test_results_tracker.cc",
- "launcher/unit_test_launcher.cc",
- ]
- }
-
- configs += [ "//build/config:precompiled_headers" ]
-
- data = [
- # The isolate needs this script for setting up the test. It's not actually
- # needed to run this target locally.
- "//testing/test_env.py",
- ]
-
- public_deps = [
- ":test_config",
- "//base",
- "//base:base_static",
- "//base:i18n",
- ]
- deps = [
- "//base/third_party/dynamic_annotations",
- "//testing/gmock",
- "//testing/gtest",
- "//third_party/icu:icuuc",
- "//third_party/libxml",
- ]
-
- if (!is_posix) {
- sources -= [
- "scoped_locale.cc",
- "scoped_locale.h",
- ]
- }
-
- if (is_ios) {
- set_sources_assignment_filter([])
- sources += [ "test_file_util_mac.cc" ]
- set_sources_assignment_filter(sources_assignment_filter)
- }
-
- if (is_mac) {
- libs = [ "AppKit.framework" ]
- }
-
- if (is_android) {
- deps += [
- ":base_unittests_jni_headers",
- ":test_support_jni_headers",
- ]
- public_deps += [ ":test_support_java" ]
- }
-
- if (is_nacl_nonsfi) {
- sources += [
- "launcher/test_launcher.h",
- "launcher/test_result.h",
- "launcher/unit_test_launcher.h",
- "launcher/unit_test_launcher_nacl_nonsfi.cc",
- ]
- sources -= [
- "gtest_xml_util.cc",
- "gtest_xml_util.h",
- "icu_test_util.cc",
- "icu_test_util.h",
- "perf_test_suite.cc",
- "perf_test_suite.h",
- "scoped_path_override.cc",
- "scoped_path_override.h",
- "test_discardable_memory_allocator.cc",
- "test_discardable_memory_allocator.h",
- "test_file_util.cc",
- "test_file_util.h",
- "test_file_util_posix.cc",
- "test_suite.cc",
- "test_suite.h",
- "trace_to_file.cc",
- "trace_to_file.h",
- ]
- public_deps -= [ "//base:i18n" ]
- deps -= [
- "//third_party/icu:icuuc",
- "//third_party/libxml",
- ]
- }
-}
-
-config("perf_test_config") {
- defines = [ "PERF_TEST" ]
-}
-
-# This is a source set instead of a static library because it seems like some
-# linkers get confused when "main" is in a static library, and if you link to
-# this, you always want the object file anyway.
-source_set("test_support_perf") {
- testonly = true
- sources = [
- "run_all_perftests.cc",
- ]
- deps = [
- ":test_support",
- "//base",
- "//testing/gtest",
- ]
-
- public_configs = [ ":perf_test_config" ]
-}
-
-static_library("test_launcher_nacl_nonsfi") {
- testonly = true
- sources = [
- "launcher/test_launcher_nacl_nonsfi.cc",
- "launcher/test_launcher_nacl_nonsfi.h",
- ]
- deps = [
- ":test_support",
- ]
-}
-
-static_library("run_all_unittests") {
- testonly = true
- sources = [
- "run_all_unittests.cc",
- ]
- deps = [
- ":test_support",
- ]
-}
-
-# These sources are linked into both the base_unittests binary and the test
-# shared library target below.
-source_set("native_library_test_utils") {
- testonly = true
- sources = [
- "native_library_test_utils.cc",
- "native_library_test_utils.h",
- ]
-}
-
-# This shared library is dynamically loaded by NativeLibrary unittests.
-shared_library("test_shared_library") {
- testonly = true
- sources = [
- "test_shared_library.cc",
- ]
-
- deps = [
- ":native_library_test_utils",
- ]
-}
-
-static_library("run_all_base_unittests") {
- # Only targets in base should depend on this, targets outside base
- # should depend on run_all_unittests above.
- visibility = [ "//base/*" ]
- testonly = true
- sources = [
- "run_all_base_unittests.cc",
- ]
- deps = [
- ":test_support",
- ]
-}
-
-if (is_linux) {
- shared_library("malloc_wrapper") {
- testonly = true
- sources = [
- "malloc_wrapper.cc",
- ]
- deps = [
- "//base",
- "//build/config/sanitizers:deps",
- ]
- }
-}
-
-if (is_android) {
- generate_jni("base_unittests_jni_headers") {
- sources = [
- "android/java/src/org/chromium/base/ContentUriTestUtils.java",
- "android/java/src/org/chromium/base/TestSystemMessageHandler.java",
- "android/java/src/org/chromium/base/TestUiThread.java",
- ]
- jni_package = "base"
- }
-
- generate_jni("test_support_jni_headers") {
- sources = [
- "android/java/src/org/chromium/base/MainReturnCodeResult.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java",
- ]
- jni_package = "base"
- }
-
- android_library("test_support_java") {
- testonly = true
- deps = [
- "//base:base_java",
- "//testing/android/native_test:native_main_runner_java",
- "//third_party/android_tools:android_support_annotations_java",
- "//third_party/jsr-305:jsr_305_javalib",
- ]
- srcjar_deps = [ ":test_support_java_aidl" ]
- java_files = [
- "android/java/src/org/chromium/base/MainReturnCodeResult.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService0.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService1.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService2.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService3.java",
- "android/java/src/org/chromium/base/MultiprocessTestClientService4.java",
- ]
- }
-
- android_aidl("test_support_java_aidl") {
- testonly = true
- import_include = [
- "android/java/src",
- "//base/android/java/src",
- ]
- sources = [
- "android/java/src/org/chromium/base/ITestClient.aidl",
- ]
- }
-}
diff --git a/base/threading/non_thread_safe_unittest.cc b/base/threading/non_thread_safe_unittest.cc
index 5752d5f2b3..7776228f2f 100644
--- a/base/threading/non_thread_safe_unittest.cc
+++ b/base/threading/non_thread_safe_unittest.cc
@@ -12,14 +12,6 @@
#include "base/threading/simple_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-// Duplicated from base/threading/non_thread_safe.h so that we can be
-// good citizens there and undef the macro.
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
-#define ENABLE_NON_THREAD_SAFE 1
-#else
-#define ENABLE_NON_THREAD_SAFE 0
-#endif
-
namespace base {
namespace {
diff --git a/base/trace_event/common/trace_event_common.h b/base/trace_event/common/trace_event_common.h
index bb6fa1b82b..e87665b8cd 100644
--- a/base/trace_event/common/trace_event_common.h
+++ b/base/trace_event/common/trace_event_common.h
@@ -789,15 +789,6 @@
TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
-// Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
-// with 2 associated arguments. If the category is not enabled, then this
-// does nothing.
-#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \
- category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
-
// Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2
// associated arguments. If the category is not enabled, then this
// does nothing.
diff --git a/base/trace_event/etw_manifest/BUILD.gn b/base/trace_event/etw_manifest/BUILD.gn
deleted file mode 100644
index 19c4ecfdc4..0000000000
--- a/base/trace_event/etw_manifest/BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2015 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.
-
-import("//build/win/message_compiler.gni")
-
-assert(is_win, "This only runs on Windows.")
-
-message_compiler("chrome_events_win") {
- visibility = [
- "//base/*",
- "//chrome:main_dll",
- ]
-
- sources = [
- "chrome_events_win.man",
- ]
-
- user_mode_logging = true
-
- # The only code generated from chrome_events_win.man is a header file that
- # is included by trace_event_etw_export_win.cc, so there is no need to
- # compile any generated code. The other thing which compile_generated_code
- # controls in this context is linking in the .res file generated from the
- # manifest. However this is only needed for ETW provider registration which
- # is done by UIforETW (https://github.com/google/UIforETW) and therefore the
- # manifest resource can be skipped in Chrome.
- compile_generated_code = false
-}
diff --git a/base/trace_event/etw_manifest/chrome_events_win.man b/base/trace_event/etw_manifest/chrome_events_win.man
deleted file mode 100644
index 10a8ddf16f..0000000000
--- a/base/trace_event/etw_manifest/chrome_events_win.man
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version='1.0' encoding='utf-8' standalone='yes'?>
-<instrumentationManifest
- xmlns="http://schemas.microsoft.com/win/2004/08/events"
- xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd"
- >
- <instrumentation>
- <events>
- <provider
- guid="{D2D578D9-2936-45B6-A09f-30E32715F42D}"
- messageFileName="chrome.dll"
- name="Chrome"
- resourceFileName="chrome.dll"
- symbol="CHROME"
- >
- <channels>
- <importChannel
- chid="SYSTEM"
- name="System"
- />
- </channels>
- <templates>
- <template tid="tid_chrome_event">
- <data
- inType="win:AnsiString"
- name="Name"
- />
- <data
- inType="win:AnsiString"
- name="Phase"
- />
- <data
- inType="win:AnsiString"
- name="Arg Name 1"
- />
- <data
- inType="win:AnsiString"
- name="Arg Value 1"
- />
- <data
- inType="win:AnsiString"
- name="Arg Name 2"
- />
- <data
- inType="win:AnsiString"
- name="Arg Value 2"
- />
- <data
- inType="win:AnsiString"
- name="Arg Name 3"
- />
- <data
- inType="win:AnsiString"
- name="Arg Value 3"
- />
- </template>
- </templates>
- <events>
- <event
- channel="SYSTEM"
- level="win:Informational"
- message="$(string.ChromeEvent.EventMessage)"
- opcode="win:Info"
- symbol="ChromeEvent"
- template="tid_chrome_event"
- value="1"
- />
- </events>
- </provider>
- </events>
- </instrumentation>
- <localization xmlns="http://schemas.microsoft.com/win/2004/08/events">
- <resources culture="en-US">
- <stringTable>
- <string
- id="ChromeEvent.EventMessage"
- value="Chrome Event: %1 (%2)"
- />
- </stringTable>
- </resources>
- </localization>
-</instrumentationManifest>
diff --git a/base/win/event_trace_consumer.h b/base/win/event_trace_consumer.h
deleted file mode 100644
index 9f97e0df65..0000000000
--- a/base/win/event_trace_consumer.h
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (c) 2012 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.
-//
-// Declaration of a Windows event trace consumer base class.
-#ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_
-#define BASE_WIN_EVENT_TRACE_CONSUMER_H_
-
-#include <windows.h>
-#include <wmistr.h>
-#include <evntrace.h>
-#include <stddef.h>
-#include <vector>
-
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// This class is a base class that makes it easier to consume events
-// from realtime or file sessions. Concrete consumers need to subclass
-// a specialization of this class and override the ProcessEvent and/or
-// the ProcessBuffer methods to implement the event consumption logic.
-// Usage might look like:
-// class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> {
-// protected:
-// static VOID WINAPI ProcessEvent(PEVENT_TRACE event);
-// };
-//
-// MyConsumer consumer;
-// consumer.OpenFileSession(file_path);
-// consumer.Consume();
-template <class ImplClass>
-class EtwTraceConsumerBase {
- public:
- // Constructs a closed consumer.
- EtwTraceConsumerBase() {
- }
-
- ~EtwTraceConsumerBase() {
- Close();
- }
-
- // Opens the named realtime session, which must be existent.
- // Note: You can use OpenRealtimeSession or OpenFileSession
- // to open as many as MAXIMUM_WAIT_OBJECTS (63) sessions at
- // any one time, though only one of them may be a realtime
- // session.
- HRESULT OpenRealtimeSession(const wchar_t* session_name);
-
- // Opens the event trace log in "file_name", which must be a full or
- // relative path to an existing event trace log file.
- // Note: You can use OpenRealtimeSession or OpenFileSession
- // to open as many as kNumSessions at any one time.
- HRESULT OpenFileSession(const wchar_t* file_name);
-
- // Consume all open sessions from beginning to end.
- HRESULT Consume();
-
- // Close all open sessions.
- HRESULT Close();
-
- protected:
- // Override in subclasses to handle events.
- static void ProcessEvent(EVENT_TRACE* event) {
- }
- // Override in subclasses to handle buffers.
- static bool ProcessBuffer(EVENT_TRACE_LOGFILE* buffer) {
- return true; // keep going
- }
-
- protected:
- // Currently open sessions.
- std::vector<TRACEHANDLE> trace_handles_;
-
- private:
- // These delegate to ImplClass callbacks with saner signatures.
- static void WINAPI ProcessEventCallback(EVENT_TRACE* event) {
- ImplClass::ProcessEvent(event);
- }
- static ULONG WINAPI ProcessBufferCallback(PEVENT_TRACE_LOGFILE buffer) {
- return ImplClass::ProcessBuffer(buffer);
- }
-
- DISALLOW_COPY_AND_ASSIGN(EtwTraceConsumerBase);
-};
-
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::OpenRealtimeSession(
- const wchar_t* session_name) {
- EVENT_TRACE_LOGFILE logfile = {};
- logfile.LoggerName = const_cast<wchar_t*>(session_name);
- logfile.LogFileMode = EVENT_TRACE_REAL_TIME_MODE;
- logfile.BufferCallback = &ProcessBufferCallback;
- logfile.EventCallback = &ProcessEventCallback;
- logfile.Context = this;
- TRACEHANDLE trace_handle = ::OpenTrace(&logfile);
- if (reinterpret_cast<TRACEHANDLE>(INVALID_HANDLE_VALUE) == trace_handle)
- return HRESULT_FROM_WIN32(::GetLastError());
-
- trace_handles_.push_back(trace_handle);
- return S_OK;
-}
-
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::OpenFileSession(
- const wchar_t* file_name) {
- EVENT_TRACE_LOGFILE logfile = {};
- logfile.LogFileName = const_cast<wchar_t*>(file_name);
- logfile.BufferCallback = &ProcessBufferCallback;
- logfile.EventCallback = &ProcessEventCallback;
- logfile.Context = this;
- TRACEHANDLE trace_handle = ::OpenTrace(&logfile);
- if (reinterpret_cast<TRACEHANDLE>(INVALID_HANDLE_VALUE) == trace_handle)
- return HRESULT_FROM_WIN32(::GetLastError());
-
- trace_handles_.push_back(trace_handle);
- return S_OK;
-}
-
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::Consume() {
- ULONG err = ::ProcessTrace(&trace_handles_[0],
- static_cast<ULONG>(trace_handles_.size()),
- NULL,
- NULL);
- return HRESULT_FROM_WIN32(err);
-}
-
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::Close() {
- HRESULT hr = S_OK;
- for (size_t i = 0; i < trace_handles_.size(); ++i) {
- if (NULL != trace_handles_[i]) {
- ULONG ret = ::CloseTrace(trace_handles_[i]);
- trace_handles_[i] = NULL;
-
- if (FAILED(HRESULT_FROM_WIN32(ret)))
- hr = HRESULT_FROM_WIN32(ret);
- }
- }
- trace_handles_.clear();
-
- return hr;
-}
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_
diff --git a/base/win/scoped_co_mem.h b/base/win/scoped_co_mem.h
deleted file mode 100644
index a3737dd571..0000000000
--- a/base/win/scoped_co_mem.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2011 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_WIN_SCOPED_CO_MEM_H_
-#define BASE_WIN_SCOPED_CO_MEM_H_
-
-#include <objbase.h>
-
-#include "base/logging.h"
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// Simple scoped memory releaser class for COM allocated memory.
-// Example:
-// base::win::ScopedCoMem<ITEMIDLIST> file_item;
-// SHGetSomeInfo(&file_item, ...);
-// ...
-// return; <-- memory released
-template<typename T>
-class ScopedCoMem {
- public:
- ScopedCoMem() : mem_ptr_(NULL) {}
- ~ScopedCoMem() {
- Reset(NULL);
- }
-
- T** operator&() { // NOLINT
- DCHECK(mem_ptr_ == NULL); // To catch memory leaks.
- return &mem_ptr_;
- }
-
- operator T*() {
- return mem_ptr_;
- }
-
- T* operator->() {
- DCHECK(mem_ptr_ != NULL);
- return mem_ptr_;
- }
-
- const T* operator->() const {
- DCHECK(mem_ptr_ != NULL);
- return mem_ptr_;
- }
-
- void Reset(T* ptr) {
- if (mem_ptr_)
- CoTaskMemFree(mem_ptr_);
- mem_ptr_ = ptr;
- }
-
- T* get() const {
- return mem_ptr_;
- }
-
- private:
- T* mem_ptr_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCoMem);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_CO_MEM_H_
diff --git a/base/win/scoped_com_initializer.h b/base/win/scoped_com_initializer.h
deleted file mode 100644
index 8efff856f0..0000000000
--- a/base/win/scoped_com_initializer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 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_WIN_SCOPED_COM_INITIALIZER_H_
-#define BASE_WIN_SCOPED_COM_INITIALIZER_H_
-
-#include <objbase.h>
-
-#include "base/logging.h"
-#include "base/macros.h"
-#include "build/build_config.h"
-
-namespace base {
-namespace win {
-
-// Initializes COM in the constructor (STA or MTA), and uninitializes COM in the
-// destructor.
-//
-// WARNING: This should only be used once per thread, ideally scoped to a
-// similar lifetime as the thread itself. You should not be using this in
-// random utility functions that make COM calls -- instead ensure these
-// functions are running on a COM-supporting thread!
-class ScopedCOMInitializer {
- public:
- // Enum value provided to initialize the thread as an MTA instead of STA.
- enum SelectMTA { kMTA };
-
- // Constructor for STA initialization.
- ScopedCOMInitializer() {
- Initialize(COINIT_APARTMENTTHREADED);
- }
-
- // Constructor for MTA initialization.
- explicit ScopedCOMInitializer(SelectMTA mta) {
- Initialize(COINIT_MULTITHREADED);
- }
-
- ~ScopedCOMInitializer() {
-#ifndef NDEBUG
- // Using the windows API directly to avoid dependency on platform_thread.
- DCHECK_EQ(GetCurrentThreadId(), thread_id_);
-#endif
- if (succeeded())
- CoUninitialize();
- }
-
- bool succeeded() const { return SUCCEEDED(hr_); }
-
- private:
- void Initialize(COINIT init) {
-#ifndef NDEBUG
- thread_id_ = GetCurrentThreadId();
-#endif
- hr_ = CoInitializeEx(NULL, init);
-#ifndef NDEBUG
- if (hr_ == S_FALSE)
- LOG(ERROR) << "Multiple CoInitialize() calls for thread " << thread_id_;
- else
- DCHECK_NE(RPC_E_CHANGED_MODE, hr_) << "Invalid COM thread model change";
-#endif
- }
-
- HRESULT hr_;
-#ifndef NDEBUG
- // In debug builds we use this variable to catch a potential bug where a
- // ScopedCOMInitializer instance is deleted on a different thread than it
- // was initially created on. If that ever happens it can have bad
- // consequences and the cause can be tricky to track down.
- DWORD thread_id_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCOMInitializer);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_COM_INITIALIZER_H_
diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
deleted file mode 100644
index 9442672054..0000000000
--- a/base/win/scoped_comptr.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (c) 2011 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_WIN_SCOPED_COMPTR_H_
-#define BASE_WIN_SCOPED_COMPTR_H_
-
-#include <unknwn.h>
-
-#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-
-namespace base {
-namespace win {
-
-// A fairly minimalistic smart class for COM interface pointers.
-// Uses scoped_refptr for the basic smart pointer functionality
-// and adds a few IUnknown specific services.
-template <class Interface, const IID* interface_id = &__uuidof(Interface)>
-class ScopedComPtr : public scoped_refptr<Interface> {
- public:
- // Utility template to prevent users of ScopedComPtr from calling AddRef
- // and/or Release() without going through the ScopedComPtr class.
- class BlockIUnknownMethods : public Interface {
- private:
- STDMETHOD(QueryInterface)(REFIID iid, void** object) = 0;
- STDMETHOD_(ULONG, AddRef)() = 0;
- STDMETHOD_(ULONG, Release)() = 0;
- };
-
- typedef scoped_refptr<Interface> ParentClass;
-
- ScopedComPtr() {
- }
-
- explicit ScopedComPtr(Interface* p) : ParentClass(p) {
- }
-
- ScopedComPtr(const ScopedComPtr<Interface, interface_id>& p)
- : ParentClass(p) {
- }
-
- ~ScopedComPtr() {
- // We don't want the smart pointer class to be bigger than the pointer
- // it wraps.
- static_assert(
- sizeof(ScopedComPtr<Interface, interface_id>) == sizeof(Interface*),
- "ScopedComPtrSize");
- }
-
- // Explicit Release() of the held object. Useful for reuse of the
- // ScopedComPtr instance.
- // Note that this function equates to IUnknown::Release and should not
- // be confused with e.g. unique_ptr::release().
- void Release() {
- if (this->ptr_ != NULL) {
- this->ptr_->Release();
- this->ptr_ = NULL;
- }
- }
-
- // Sets the internal pointer to NULL and returns the held object without
- // releasing the reference.
- Interface* Detach() {
- Interface* p = this->ptr_;
- this->ptr_ = NULL;
- return p;
- }
-
- // Accepts an interface pointer that has already been addref-ed.
- void Attach(Interface* p) {
- DCHECK(!this->ptr_);
- this->ptr_ = p;
- }
-
- // Retrieves the pointer address.
- // Used to receive object pointers as out arguments (and take ownership).
- // The function DCHECKs on the current value being NULL.
- // Usage: Foo(p.Receive());
- Interface** Receive() {
- DCHECK(!this->ptr_) << "Object leak. Pointer must be NULL";
- return &this->ptr_;
- }
-
- // A convenience for whenever a void pointer is needed as an out argument.
- void** ReceiveVoid() {
- return reinterpret_cast<void**>(Receive());
- }
-
- template <class Query>
- HRESULT QueryInterface(Query** p) {
- DCHECK(p != NULL);
- DCHECK(this->ptr_ != NULL);
- // IUnknown already has a template version of QueryInterface
- // so the iid parameter is implicit here. The only thing this
- // function adds are the DCHECKs.
- return this->ptr_->QueryInterface(p);
- }
-
- // QI for times when the IID is not associated with the type.
- HRESULT QueryInterface(const IID& iid, void** obj) {
- DCHECK(obj != NULL);
- DCHECK(this->ptr_ != NULL);
- return this->ptr_->QueryInterface(iid, obj);
- }
-
- // Queries |other| for the interface this object wraps and returns the
- // error code from the other->QueryInterface operation.
- HRESULT QueryFrom(IUnknown* object) {
- DCHECK(object != NULL);
- return object->QueryInterface(Receive());
- }
-
- // Convenience wrapper around CoCreateInstance
- HRESULT CreateInstance(const CLSID& clsid, IUnknown* outer = NULL,
- DWORD context = CLSCTX_ALL) {
- DCHECK(!this->ptr_);
- HRESULT hr = ::CoCreateInstance(clsid, outer, context, *interface_id,
- reinterpret_cast<void**>(&this->ptr_));
- return hr;
- }
-
- // Checks if the identity of |other| and this object is the same.
- bool IsSameObject(IUnknown* other) {
- if (!other && !this->ptr_)
- return true;
-
- if (!other || !this->ptr_)
- return false;
-
- ScopedComPtr<IUnknown> my_identity;
- QueryInterface(my_identity.Receive());
-
- ScopedComPtr<IUnknown> other_identity;
- other->QueryInterface(other_identity.Receive());
-
- return my_identity == other_identity;
- }
-
- // Provides direct access to the interface.
- // Here we use a well known trick to make sure we block access to
- // IUnknown methods so that something bad like this doesn't happen:
- // ScopedComPtr<IUnknown> p(Foo());
- // p->Release();
- // ... later the destructor runs, which will Release() again.
- // and to get the benefit of the DCHECKs we add to QueryInterface.
- // There's still a way to call these methods if you absolutely must
- // by statically casting the ScopedComPtr instance to the wrapped interface
- // and then making the call... but generally that shouldn't be necessary.
- BlockIUnknownMethods* operator->() const {
- DCHECK(this->ptr_ != NULL);
- return reinterpret_cast<BlockIUnknownMethods*>(this->ptr_);
- }
-
- // Pull in operator=() from the parent class.
- using scoped_refptr<Interface>::operator=;
-
- // static methods
-
- static const IID& iid() {
- return *interface_id;
- }
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_COMPTR_H_
diff --git a/base/win/scoped_gdi_object.h b/base/win/scoped_gdi_object.h
deleted file mode 100644
index 9d8465b25b..0000000000
--- a/base/win/scoped_gdi_object.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2010 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_WIN_SCOPED_GDI_OBJECT_H_
-#define BASE_WIN_SCOPED_GDI_OBJECT_H_
-
-#include <windows.h>
-
-#include "base/scoped_generic.h"
-
-namespace base {
-namespace win {
-
-namespace internal {
-
-template <class T>
-struct ScopedGDIObjectTraits {
- static T InvalidValue() { return nullptr; }
- static void Free(T object) { DeleteObject(object); }
-};
-
-// An explicit specialization for HICON because we have to call DestroyIcon()
-// instead of DeleteObject() for HICON.
-template <>
-void inline ScopedGDIObjectTraits<HICON>::Free(HICON icon) {
- DestroyIcon(icon);
-}
-
-} // namespace internal
-
-// Like ScopedHandle but for GDI objects.
-template <class T>
-using ScopedGDIObject = ScopedGeneric<T, internal::ScopedGDIObjectTraits<T>>;
-
-// Typedefs for some common use cases.
-typedef ScopedGDIObject<HBITMAP> ScopedBitmap;
-typedef ScopedGDIObject<HRGN> ScopedRegion;
-typedef ScopedGDIObject<HFONT> ScopedHFONT;
-typedef ScopedGDIObject<HICON> ScopedHICON;
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_GDI_OBJECT_H_
diff --git a/base/win/scoped_handle_test_dll.cc b/base/win/scoped_handle_test_dll.cc
deleted file mode 100644
index 0d70c0b627..0000000000
--- a/base/win/scoped_handle_test_dll.cc
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2016 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 <windows.h>
-
-#include <vector>
-
-#include "base/win/base_features.h"
-#include "base/win/current_module.h"
-#include "base/win/scoped_handle.h"
-
-namespace base {
-namespace win {
-namespace testing {
-
-extern "C" bool __declspec(dllexport) RunTest();
-
-namespace {
-
-struct ThreadParams {
- HANDLE ready_event;
- HANDLE start_event;
-};
-
-// Note, this must use all native functions to avoid instantiating the
-// ActiveVerifier. e.g. can't use base::Thread or even base::PlatformThread.
-DWORD __stdcall ThreadFunc(void* params) {
- ThreadParams* thread_params = reinterpret_cast<ThreadParams*>(params);
- HANDLE handle = ::CreateMutex(nullptr, false, nullptr);
-
- ::SetEvent(thread_params->ready_event);
- ::WaitForSingleObject(thread_params->start_event, INFINITE);
- ScopedHandle handle_holder(handle);
- return 0;
-}
-
-bool InternalRunThreadTest() {
- std::vector<HANDLE> threads_;
- // From manual testing, the bug fixed by crrev.com/678736a starts reliably
- // causing handle verifier asserts to trigger at around 100 threads, so make
- // it 200 to be sure to detect any future regressions.
- const size_t kNumThreads = 200;
-
- // bManualReset is set to true to allow signalling multiple threads.
- HANDLE start_event = ::CreateEvent(nullptr, true, false, nullptr);
- if (!start_event)
- return false;
-
- HANDLE ready_event = CreateEvent(nullptr, false, false, nullptr);
- if (!ready_event)
- return false;
-
- ThreadParams thread_params = { ready_event, start_event };
-
- for (size_t i = 0; i < kNumThreads; i++) {
- HANDLE thread_handle =
- ::CreateThread(nullptr, 0, ThreadFunc,
- reinterpret_cast<void*>(&thread_params), 0, nullptr);
- if (!thread_handle)
- break;
- ::WaitForSingleObject(ready_event, INFINITE);
- threads_.push_back(thread_handle);
- }
-
- ::CloseHandle(ready_event);
-
- if (threads_.size() != kNumThreads) {
- for (auto* thread : threads_)
- ::CloseHandle(thread);
- ::CloseHandle(start_event);
- return false;
- }
-
- ::SetEvent(start_event);
- ::CloseHandle(start_event);
- for (auto* thread : threads_) {
- ::WaitForSingleObject(thread, INFINITE);
- ::CloseHandle(thread);
- }
-
- return true;
-}
-
-bool InternalRunLocationTest() {
- // Create a new handle and then set LastError again.
- HANDLE handle = ::CreateMutex(nullptr, false, nullptr);
- if (!handle)
- return false;
- ScopedHandle handle_holder(handle);
-
- HMODULE verifier_module = GetHandleVerifierModuleForTesting();
- if (!verifier_module)
- return false;
-
- // Get my module
- HMODULE my_module = CURRENT_MODULE();
- if (!my_module)
- return false;
-
- HMODULE main_module = ::GetModuleHandle(NULL);
-
-#if BUILDFLAG(SINGLE_MODULE_MODE_HANDLE_VERIFIER)
- // In a component build ActiveVerifier will always be created inside base.dll
- // as the code always lives there.
- if (verifier_module == my_module || verifier_module == main_module)
- return false;
-#else
- // In a non-component build, ActiveVerifier should always be created in the
- // version of base linked with the main executable.
- if (verifier_module == my_module || verifier_module != main_module)
- return false;
-#endif
- return true;
-}
-
-} // namespace
-
-bool RunTest() {
- return InternalRunThreadTest() && InternalRunLocationTest();
-}
-
-} // testing
-} // win
-} // base
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h
deleted file mode 100644
index 890e34a82c..0000000000
--- a/base/win/scoped_hdc.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2012 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_WIN_SCOPED_HDC_H_
-#define BASE_WIN_SCOPED_HDC_H_
-
-#include <windows.h>
-
-#include "base/debug/gdi_debug_util_win.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "base/win/scoped_handle.h"
-
-namespace base {
-namespace win {
-
-// Like ScopedHandle but for HDC. Only use this on HDCs returned from
-// GetDC.
-class ScopedGetDC {
- public:
- explicit ScopedGetDC(HWND hwnd)
- : hwnd_(hwnd),
- hdc_(GetDC(hwnd)) {
- if (hwnd_) {
- DCHECK(IsWindow(hwnd_));
- DCHECK(hdc_);
- } else {
- // If GetDC(NULL) returns NULL, something really bad has happened, like
- // GDI handle exhaustion. In this case Chrome is going to behave badly no
- // matter what, so we may as well just force a crash now.
- if (!hdc_)
- base::debug::CollectGDIUsageAndDie();
- }
- }
-
- ~ScopedGetDC() {
- if (hdc_)
- ReleaseDC(hwnd_, hdc_);
- }
-
- operator HDC() { return hdc_; }
-
- private:
- HWND hwnd_;
- HDC hdc_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedGetDC);
-};
-
-// Like ScopedHandle but for HDC. Only use this on HDCs returned from
-// CreateCompatibleDC, CreateDC and CreateIC.
-class CreateDCTraits {
- public:
- typedef HDC Handle;
-
- static bool CloseHandle(HDC handle) {
- return ::DeleteDC(handle) != FALSE;
- }
-
- static bool IsHandleValid(HDC handle) {
- return handle != NULL;
- }
-
- static HDC NullHandle() {
- return NULL;
- }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(CreateDCTraits);
-};
-
-typedef GenericScopedHandle<CreateDCTraits, DummyVerifierTraits> ScopedCreateDC;
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_HDC_H_
diff --git a/base/win/scoped_hglobal.h b/base/win/scoped_hglobal.h
deleted file mode 100644
index abe9a5a3dd..0000000000
--- a/base/win/scoped_hglobal.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2010 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_WIN_SCOPED_HGLOBAL_H_
-#define BASE_WIN_SCOPED_HGLOBAL_H_
-
-#include <windows.h>
-#include <stddef.h>
-
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// Like ScopedHandle except for HGLOBAL.
-template<class T>
-class ScopedHGlobal {
- public:
- explicit ScopedHGlobal(HGLOBAL glob) : glob_(glob) {
- data_ = static_cast<T>(GlobalLock(glob_));
- }
- ~ScopedHGlobal() {
- GlobalUnlock(glob_);
- }
-
- T get() { return data_; }
-
- size_t Size() const { return GlobalSize(glob_); }
-
- T operator->() const {
- assert(data_ != 0);
- return data_;
- }
-
- T release() {
- T data = data_;
- data_ = NULL;
- return data;
- }
-
- private:
- HGLOBAL glob_;
-
- T data_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedHGlobal);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_HGLOBAL_H_
diff --git a/base/win/scoped_propvariant.h b/base/win/scoped_propvariant.h
deleted file mode 100644
index aa9afec1c1..0000000000
--- a/base/win/scoped_propvariant.h
+++ /dev/null
@@ -1,58 +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_WIN_SCOPED_PROPVARIANT_H_
-#define BASE_WIN_SCOPED_PROPVARIANT_H_
-
-#include <propidl.h>
-
-#include "base/logging.h"
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// A PROPVARIANT that is automatically initialized and cleared upon respective
-// construction and destruction of this class.
-class ScopedPropVariant {
- public:
- ScopedPropVariant() {
- PropVariantInit(&pv_);
- }
-
- ~ScopedPropVariant() {
- Reset();
- }
-
- // Returns a pointer to the underlying PROPVARIANT for use as an out param in
- // a function call.
- PROPVARIANT* Receive() {
- DCHECK_EQ(pv_.vt, VT_EMPTY);
- return &pv_;
- }
-
- // Clears the instance to prepare it for re-use (e.g., via Receive).
- void Reset() {
- if (pv_.vt != VT_EMPTY) {
- HRESULT result = PropVariantClear(&pv_);
- DCHECK_EQ(result, S_OK);
- }
- }
-
- const PROPVARIANT& get() const { return pv_; }
- const PROPVARIANT* ptr() const { return &pv_; }
-
- private:
- PROPVARIANT pv_;
-
- // Comparison operators for ScopedPropVariant are not supported at this point.
- bool operator==(const ScopedPropVariant&) const;
- bool operator!=(const ScopedPropVariant&) const;
- DISALLOW_COPY_AND_ASSIGN(ScopedPropVariant);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_PROPVARIANT_H_
diff --git a/base/win/scoped_select_object.h b/base/win/scoped_select_object.h
deleted file mode 100644
index 59b21c1335..0000000000
--- a/base/win/scoped_select_object.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 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_WIN_SCOPED_SELECT_OBJECT_H_
-#define BASE_WIN_SCOPED_SELECT_OBJECT_H_
-
-#include <windows.h>
-
-#include "base/logging.h"
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// Helper class for deselecting object from DC.
-class ScopedSelectObject {
- public:
- ScopedSelectObject(HDC hdc, HGDIOBJ object)
- : hdc_(hdc),
- oldobj_(SelectObject(hdc, object)) {
- DCHECK(hdc_);
- DCHECK(object);
- DCHECK(oldobj_ != NULL && oldobj_ != HGDI_ERROR);
- }
-
- ~ScopedSelectObject() {
- HGDIOBJ object = SelectObject(hdc_, oldobj_);
- DCHECK((GetObjectType(oldobj_) != OBJ_REGION && object != NULL) ||
- (GetObjectType(oldobj_) == OBJ_REGION && object != HGDI_ERROR));
- }
-
- private:
- HDC hdc_;
- HGDIOBJ oldobj_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedSelectObject);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_SELECT_OBJECT_H_
diff --git a/base/win/windows_version_unittest.cc b/base/win/windows_version_unittest.cc
deleted file mode 100644
index f0d6d9660d..0000000000
--- a/base/win/windows_version_unittest.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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/win/windows_version.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace win {
-namespace {
-
-TEST(WindowsVersion, GetVersionExAndKernelVersionMatch) {
- // If this fails, we're running in compatibility mode, or need to update the
- // application manifest.
- EXPECT_EQ(OSInfo::GetInstance()->version(),
- OSInfo::GetInstance()->Kernel32Version());
-}
-
-} // namespace
-} // namespace win
-} // namespace base
diff --git a/components/timers/BUILD.gn b/components/timers/BUILD.gn
deleted file mode 100644
index c6f4a12f94..0000000000
--- a/components/timers/BUILD.gn
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-static_library("timers") {
- sources = [
- "alarm_timer_chromeos.cc",
- "alarm_timer_chromeos.h",
- ]
-
- deps = [
- "//base",
- ]
-}
-
-source_set("unit_tests") {
- testonly = true
-
- sources = [
- "alarm_timer_unittest.cc",
- ]
-
- deps = [
- ":timers",
- "//base",
- "//testing/gtest",
- ]
-}
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
deleted file mode 100644
index 6b45c9d633..0000000000
--- a/crypto/BUILD.gn
+++ /dev/null
@@ -1,225 +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.
-
-import("//build/config/crypto.gni")
-import("//testing/test.gni")
-
-component("crypto") {
- output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
- sources = [
- "aead.cc",
- "aead.h",
- "apple_keychain.h",
- "apple_keychain_ios.mm",
- "apple_keychain_mac.mm",
- "capi_util.cc",
- "capi_util.h",
- "crypto_export.h",
- "cssm_init.cc",
- "cssm_init.h",
- "ec_private_key.cc",
- "ec_private_key.h",
- "ec_signature_creator.cc",
- "ec_signature_creator.h",
- "ec_signature_creator_impl.cc",
- "ec_signature_creator_impl.h",
- "encryptor.cc",
- "encryptor.h",
- "hkdf.cc",
- "hkdf.h",
- "hmac.cc",
- "hmac.h",
- "mac_security_services_lock.cc",
- "mac_security_services_lock.h",
-
- # TODO(brettw) these mocks should be moved to a test_support_crypto target
- # if possible.
- "mock_apple_keychain.cc",
- "mock_apple_keychain.h",
- "mock_apple_keychain_ios.cc",
- "mock_apple_keychain_mac.cc",
- "nss_key_util.cc",
- "nss_key_util.h",
- "nss_util.cc",
- "nss_util.h",
- "nss_util_internal.h",
- "openssl_util.cc",
- "openssl_util.h",
- "p224.cc",
- "p224.h",
- "p224_spake.cc",
- "p224_spake.h",
- "random.cc",
- "random.h",
- "rsa_private_key.cc",
- "rsa_private_key.h",
- "scoped_capi_types.h",
- "scoped_nss_types.h",
- "secure_hash.cc",
- "secure_hash.h",
- "secure_util.cc",
- "secure_util.h",
- "sha2.cc",
- "sha2.h",
- "signature_creator.cc",
- "signature_creator.h",
- "signature_verifier.cc",
- "signature_verifier.h",
- "symmetric_key.cc",
- "symmetric_key.h",
- ]
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- deps = [
- ":platform",
- "//base",
- "//base/third_party/dynamic_annotations",
- ]
-
- public_deps = [
- "//third_party/boringssl",
- ]
-
- if (!is_mac && !is_ios) {
- sources -= [
- "apple_keychain.h",
- "mock_apple_keychain.cc",
- "mock_apple_keychain.h",
- ]
- } else {
- libs = [
- "CoreFoundation.framework",
- "Security.framework",
- ]
- }
-
- if (!is_mac) {
- sources -= [
- "cssm_init.cc",
- "cssm_init.h",
- "mac_security_services_lock.cc",
- "mac_security_services_lock.h",
- ]
- }
- if (!is_win) {
- sources -= [
- "capi_util.cc",
- "capi_util.h",
- ]
- }
-
- # Some files are built when NSS is used for the platform certificate library.
- if (!use_nss_certs) {
- sources -= [
- "nss_key_util.cc",
- "nss_key_util.h",
- "nss_util.cc",
- "nss_util.h",
- "nss_util_internal.h",
- ]
- }
-
- defines = [ "CRYPTO_IMPLEMENTATION" ]
-
- if (is_nacl) {
- deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
- }
-}
-
-test("crypto_unittests") {
- sources = [
- "aead_unittest.cc",
- "ec_private_key_unittest.cc",
- "ec_signature_creator_unittest.cc",
- "encryptor_unittest.cc",
- "hkdf_unittest.cc",
- "hmac_unittest.cc",
- "nss_key_util_unittest.cc",
- "nss_util_unittest.cc",
- "p224_spake_unittest.cc",
- "p224_unittest.cc",
- "random_unittest.cc",
- "rsa_private_key_unittest.cc",
- "secure_hash_unittest.cc",
- "sha2_unittest.cc",
- "signature_creator_unittest.cc",
- "signature_verifier_unittest.cc",
- "symmetric_key_unittest.cc",
- ]
-
- # Some files are built when NSS is used for the platform certificate library.
- if (!use_nss_certs) {
- sources -= [
- "nss_key_util_unittest.cc",
- "nss_util_unittest.cc",
- ]
- }
-
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- deps = [
- ":crypto",
- ":platform",
- ":test_support",
- "//base",
- "//base/test:run_all_unittests",
- "//base/test:test_support",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
-
-# This has no sources in some cases so can't be a static library.
-source_set("test_support") {
- testonly = true
- sources = []
-
- if (use_nss_certs) {
- sources += [
- "scoped_test_nss_db.cc",
- "scoped_test_nss_db.h",
- ]
- }
-
- if (is_chromeos) {
- sources += [
- "scoped_test_nss_chromeos_user.cc",
- "scoped_test_nss_chromeos_user.h",
- "scoped_test_system_nss_key_slot.cc",
- "scoped_test_system_nss_key_slot.h",
- ]
- }
-
- deps = [
- ":crypto",
- ":platform",
- "//base",
- ]
-}
-
-config("platform_config") {
- if (use_nss_certs && is_clang) {
- # There is a broken header guard in /usr/include/nss/secmod.h:
- # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
- cflags = [ "-Wno-header-guard" ]
- }
-}
-
-# This is a meta-target that forwards to NSS's SSL library or OpenSSL,
-# according to the state of the crypto flags. A target just wanting to depend
-# on the current SSL library should just depend on this.
-group("platform") {
- public_deps = [
- "//third_party/boringssl",
- ]
-
- # Link in NSS if it is used for the platform certificate library
- # (use_nss_certs).
- if (use_nss_certs) {
- public_configs = [ ":platform_config" ]
- public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
- }
-}
diff --git a/dbus/BUILD.gn b/dbus/BUILD.gn
deleted file mode 100644
index c0bd77d8db..0000000000
--- a/dbus/BUILD.gn
+++ /dev/null
@@ -1,132 +0,0 @@
-# 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.
-
-import("//build/config/features.gni")
-import("//testing/test.gni")
-import("//third_party/protobuf/proto_library.gni")
-
-assert(use_dbus)
-
-component("dbus") {
- sources = [
- "bus.cc",
- "bus.h",
- "dbus_export.h",
- "dbus_statistics.cc",
- "dbus_statistics.h",
- "exported_object.cc",
- "exported_object.h",
- "message.cc",
- "message.h",
- "object_manager.cc",
- "object_manager.h",
- "object_path.cc",
- "object_path.h",
- "object_proxy.cc",
- "object_proxy.h",
- "property.cc",
- "property.h",
- "scoped_dbus_error.cc",
- "scoped_dbus_error.h",
- "string_util.cc",
- "string_util.h",
- "util.cc",
- "util.h",
- "values_util.cc",
- "values_util.h",
- ]
-
- defines = [ "DBUS_IMPLEMENTATION" ]
-
- deps = [
- "//third_party/protobuf:protobuf_lite",
- ]
- public_deps = [
- "//base",
- ]
-
- public_configs = [ "//build/config/linux/dbus" ]
-}
-
-proto_library("test_proto") {
- sources = [
- "test_proto.proto",
- ]
-}
-
-# This target contains mocks that can be used to write unit tests without
-# issuing actual D-Bus calls.
-static_library("test_support") {
- testonly = true
- sources = [
- "mock_bus.cc",
- "mock_bus.h",
- "mock_exported_object.cc",
- "mock_exported_object.h",
- "mock_object_manager.cc",
- "mock_object_manager.h",
- "mock_object_proxy.cc",
- "mock_object_proxy.h",
- ]
-
- public_deps = [
- ":dbus",
- ]
- deps = [
- "//testing/gmock",
- ]
-
- configs += [ "//build/config/linux/dbus" ]
-}
-
-test("dbus_unittests") {
- sources = [
- "bus_unittest.cc",
- "dbus_statistics_unittest.cc",
- "end_to_end_async_unittest.cc",
- "end_to_end_sync_unittest.cc",
- "message_unittest.cc",
- "mock_unittest.cc",
- "object_manager_unittest.cc",
- "object_proxy_unittest.cc",
- "property_unittest.cc",
- "signal_sender_verification_unittest.cc",
- "string_util_unittest.cc",
- "test_service.cc",
- "test_service.h",
- "util_unittest.cc",
- "values_util_unittest.cc",
- ]
-
- deps = [
- ":dbus",
- ":test_proto",
- ":test_support",
- "//base/test:run_all_unittests",
- "//base/test:test_support",
- "//testing/gmock",
- "//testing/gtest",
- "//third_party/protobuf:protobuf_lite",
- ]
-
- configs += [ "//build/config/linux/dbus" ]
-}
-
-executable("dbus_test_server") {
- testonly = true
- sources = [
- "test_server.cc",
- "test_service.cc",
- "test_service.h",
- ]
-
- deps = [
- ":dbus",
- "//base",
- "//base/test:test_support",
- "//build/config/sanitizers:deps",
- ]
-
- configs += [ "//build/config/linux/dbus" ]
-}