1 # Copyright 2013 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # HOW TO WRITE CONDITIONALS IN THIS FILE
6 # ======================================
8 # In many other places, one would write a conditional that expresses all the
9 # cases when a source file is used or unused, and then either add or subtract
10 # it from the sources list in that case
12 # Since base includes so many low-level things that vary widely and
13 # unpredictably for the various build types, we prefer a slightly different
14 # style. Instead, there are big per-platform blocks of inclusions and
15 # exclusions. If a given file has an inclusion or exclusion rule that applies
16 # for multiple conditions, prefer to duplicate it in both lists. This makes it
17 # a bit easier to see which files apply in which cases rather than having a
18 # huge sequence of random-looking conditionals.
20 import("//base/allocator/allocator.gni")
21 import("//base/trace_event/tracing.gni")
22 import("//build/buildflag_header.gni")
23 import("//build/config/arm.gni")
24 import("//build/config/c++/c++.gni")
25 import("//build/config/chromecast_build.gni")
26 import("//build/config/chromeos/ui_mode.gni")
27 import("//build/config/compiler/compiler.gni")
28 import("//build/config/dcheck_always_on.gni")
29 import("//build/config/ios/config.gni")
30 import("//build/config/logging.gni")
31 import("//build/config/nacl/config.gni")
32 import("//build/config/profiling/profiling.gni")
33 import("//build/config/rust.gni")
34 import("//build/config/sanitizers/sanitizers.gni")
35 import("//build/config/sysroot.gni")
36 import("//build/config/ui.gni")
37 import("//build/nocompile.gni")
38 import("//build/rust/mixed_component.gni")
39 import("//build/timestamp.gni")
40 import("//build_overrides/build.gni")
41 import("//testing/libfuzzer/fuzzer_test.gni")
42 import("//testing/test.gni")
44 import("//tizen_src/chromium_impl/base/base_efl.gni")
48 # Used to generate fuzzer corpus :base_mach_port_rendezvous_convert_corpus.
49 import("//third_party/protobuf/proto_library.gni")
53 # Indicates if the Location object contains the source code information
54 # (file, function, line). False means only the program counter (and currently
55 # file name) is saved.
56 enable_location_source = true
58 # Whether or not the FROM_HERE macro uses base::Location::Current().
59 from_here_uses_location_builtins = true
61 # Unsafe developer build. Has developer-friendly features that may weaken or
62 # disable security measures like sandboxing or ASLR.
63 # IMPORTANT: Unsafe developer builds should never be distributed to end users.
64 is_unsafe_developer_build = !is_official_build
66 # Set to true to disable COM init check hooks.
67 com_init_check_hook_disabled = false
69 # Set to true to enable mutex priority inheritance. See the comments in
70 # LockImpl::PriorityInheritanceAvailable() in lock_impl_posix.cc for the
71 # platform requirements to safely enable priority inheritance.
72 enable_mutex_priority_inheritance = false
74 # Control whether the ios stack sampling profiler is enabled. This flag is
75 # only supported on iOS 64-bit architecture, but some project build //base
76 # for 32-bit architecture.
77 ios_stack_profiler_enabled = true
80 # Mutex priority inheritance is disabled by default due to security
81 # vulnerabilities in older versions of Linux kernel and glibc. However,
82 # Chromecast builds have full control over the platform and ensure that
83 # the kernel and glibc versions used have patched the vulnerabilities,
84 # so it is safe to use mutex priority inheritance on Chromecast platform.
85 assert(!enable_mutex_priority_inheritance || is_castos || is_cast_android,
86 "Do not enable PI mutexes without consulting the security team")
88 assert(!is_nacl || is_nacl_saigo,
89 "base must not be built in most nacl toolchains")
91 # Determines whether libevent should be dep.
92 dep_libevent = !is_fuchsia && !is_win && !is_mac && !is_nacl
94 # Determines whether message_pump_libevent should be used.
95 use_libevent = dep_libevent && !is_ios
98 import("//build/config/android/rules.gni")
102 import("//third_party/fuchsia-sdk/sdk/build/fidl_library.gni")
105 # TODO(crbug.com/1280708, crbug.com/1304707): Drop toolchain_has_rust after we
106 # have support for all our toolchains: NaCl, Linux x86, etc.
107 build_rust_json_parser = enable_rust && toolchain_has_rust
109 buildflag_header("parsing_buildflags") {
110 header = "parsing_buildflags.h"
111 flags = [ "BUILD_RUST_JSON_PARSER=$build_rust_json_parser" ]
114 # TODO(crbug.com/1298039): The BUILDFLAG should be used instead. So
115 # buildflag_header() should generate a Rust config (and perhaps a Rust crate
116 # which depends on said config, so its usage can be expressed via deps).
117 config("todo_buildflag_build_rust_json_parser") {
120 "buildflag__build_rust_json_parser",
125 # This is in a separate config so the flags can be applied to dependents.
126 # ldflags in GN aren't automatically inherited.
127 config("base_win_linker_flags") {
129 "/DELAYLOAD:cfgmgr32.dll",
130 "/DELAYLOAD:powrprof.dll",
131 "/DELAYLOAD:setupapi.dll",
137 config("android_system_libs") {
140 "log", # Used by logging.cc.
146 config("fuchsia_sync_lib") {
148 "sync", # Used by spinning_mutex.h.
153 config("perfetto_config") {
154 if (use_perfetto_client_library) {
156 # Use TRACE_EVENT macro implementation from Perfetto. See
157 # trace_event/trace_event_common.h.
158 "BASE_USE_PERFETTO_CLIENT_LIBRARY=1",
163 buildflag_header("ios_cronet_buildflags") {
164 header = "ios_cronet_buildflags.h"
165 header_dir = "base/message_loop"
166 flags = [ "CRONET_BUILD=$is_cronet_build" ]
169 enable_message_pump_epoll = is_linux || is_chromeos || is_android
170 buildflag_header("message_pump_buildflags") {
171 header = "message_pump_buildflags.h"
172 header_dir = "base/message_loop"
173 flags = [ "ENABLE_MESSAGE_PUMP_EPOLL=$enable_message_pump_epoll" ]
176 # Base and everything it depends on should be a static library rather than
177 # a source set. Base is more of a "library" in the classic sense in that many
178 # small parts of it are used in many different contexts. This combined with a
179 # few static initializers floating around means that dead code stripping
180 # still leaves a lot of code behind that isn't always used. For example, this
181 # saves more than 40K for a smaller target like chrome_elf.
183 # Use static libraries for the helper stuff as well for things like
184 # //base/debug since those targets refer back to base code, which will force
185 # base compilation units to be linked in where they wouldn't have otherwise.
186 # This does not include test code (test support and anything in the test
187 # directory) which should use source_set as is recommended for GN targets).
189 # mixed_component is a regular C++ "component", but may have some Rust files
190 # if Rust is enabled.
191 mixed_component("base") {
193 "allocator/allocator_check.cc",
194 "allocator/allocator_check.h",
195 "allocator/allocator_extension.cc",
196 "allocator/allocator_extension.h",
197 "allocator/dispatcher/configuration.h",
198 "allocator/dispatcher/dispatcher.cc",
199 "allocator/dispatcher/dispatcher.h",
200 "allocator/dispatcher/initializer.h",
201 "allocator/dispatcher/internal/dispatch_data.cc",
202 "allocator/dispatcher/internal/dispatch_data.h",
203 "allocator/dispatcher/internal/dispatcher_internal.h",
204 "allocator/dispatcher/internal/tools.h",
205 "allocator/dispatcher/reentry_guard.cc",
206 "allocator/dispatcher/reentry_guard.h",
207 "allocator/dispatcher/subsystem.h",
210 "atomic_ref_count.h",
211 "atomic_sequence_num.h",
213 "atomicops_internals_atomicword_compat.h",
214 "atomicops_internals_portable.h",
216 "barrier_callback.h",
217 "barrier_closure.cc",
232 "callback_forward.h",
233 "callback_helpers.h",
236 "cancelable_callback.h",
245 "compiler_specific.h",
246 "component_export.h",
247 "containers/adapters.h",
248 "containers/buffer_iterator.h",
249 "containers/checked_iterators.h",
250 "containers/checked_range.h",
251 "containers/circular_deque.h",
252 "containers/contains.h",
253 "containers/contiguous_iterator.h",
254 "containers/cxx20_erase.h",
255 "containers/cxx20_erase_deque.h",
256 "containers/cxx20_erase_forward_list.h",
257 "containers/cxx20_erase_internal.h",
258 "containers/cxx20_erase_list.h",
259 "containers/cxx20_erase_map.h",
260 "containers/cxx20_erase_set.h",
261 "containers/cxx20_erase_string.h",
262 "containers/cxx20_erase_unordered_map.h",
263 "containers/cxx20_erase_unordered_set.h",
264 "containers/cxx20_erase_vector.h",
265 "containers/enum_set.h",
266 "containers/extend.h",
267 "containers/fixed_flat_map.h",
268 "containers/fixed_flat_set.h",
269 "containers/flat_map.h",
270 "containers/flat_set.h",
271 "containers/flat_tree.cc",
272 "containers/flat_tree.h",
273 "containers/id_map.h",
274 "containers/intrusive_heap.cc",
275 "containers/intrusive_heap.h",
276 "containers/linked_list.cc",
277 "containers/linked_list.h",
278 "containers/lru_cache.h",
279 "containers/small_map.h",
281 "containers/stack.h",
282 "containers/stack_container.h",
283 "containers/unique_ptr_adapters.h",
285 "containers/vector_buffer.h",
288 "cpu_reduction_experiment.cc",
289 "cpu_reduction_experiment.h",
290 "critical_closure.h",
292 "cxx20_is_constant_evaluated.h",
293 "cxx20_to_address.h",
295 "debug/activity_analyzer.cc",
296 "debug/activity_analyzer.h",
297 "debug/activity_tracker.cc",
298 "debug/activity_tracker.h",
301 "debug/asan_invalid_access.cc",
302 "debug/asan_invalid_access.h",
303 "debug/buffered_dwarf_reader.cc",
304 "debug/buffered_dwarf_reader.h",
305 "debug/crash_logging.cc",
306 "debug/crash_logging.h",
309 "debug/dump_without_crashing.cc",
310 "debug/dump_without_crashing.h",
311 "debug/dwarf_line_no.cc",
312 "debug/dwarf_line_no.h",
313 "debug/leak_annotations.h",
316 "debug/stack_trace.cc",
317 "debug/stack_trace.h",
318 "debug/task_trace.cc",
319 "debug/task_trace.h",
327 "file_descriptor_store.cc",
328 "file_descriptor_store.h",
329 "file_version_info.h",
330 "files/dir_reader_fallback.h",
333 "files/file_enumerator.cc",
334 "files/file_enumerator.h",
335 "files/file_error_or.h",
336 "files/file_path.cc",
338 "files/file_path_watcher.cc",
339 "files/file_path_watcher.h",
340 "files/file_proxy.cc",
341 "files/file_proxy.h",
342 "files/file_tracing.cc",
343 "files/file_tracing.h",
344 "files/file_util.cc",
346 "files/important_file_writer.cc",
347 "files/important_file_writer.h",
348 "files/important_file_writer_cleaner.cc",
349 "files/important_file_writer_cleaner.h",
350 "files/memory_mapped_file.cc",
351 "files/memory_mapped_file.h",
352 "files/platform_file.h",
353 "files/safe_base_name.cc",
354 "files/safe_base_name.h",
355 "files/scoped_file.cc",
356 "files/scoped_file.h",
357 "files/scoped_temp_dir.cc",
358 "files/scoped_temp_dir.h",
361 "functional/bind_internal.h",
362 "functional/callback.h",
363 "functional/callback_forward.h",
364 "functional/callback_helpers.cc",
365 "functional/callback_helpers.h",
366 "functional/callback_internal.cc",
367 "functional/callback_internal.h",
368 "functional/function_ref.h",
369 "functional/identity.h",
370 "functional/invoke.h",
371 "functional/not_fn.h",
372 "functional/overloaded.h",
378 "hash/legacy_hash.cc",
379 "hash/legacy_hash.h",
380 "json/json_common.h",
381 "json/json_file_value_serializer.cc",
382 "json/json_file_value_serializer.h",
383 "json/json_parser.cc",
384 "json/json_parser.h",
385 "json/json_reader.cc",
386 "json/json_reader.h",
387 "json/json_string_value_serializer.cc",
388 "json/json_string_value_serializer.h",
389 "json/json_value_converter.cc",
390 "json/json_value_converter.h",
391 "json/json_writer.cc",
392 "json/json_writer.h",
393 "json/string_escape.cc",
394 "json/string_escape.h",
395 "json/values_util.cc",
396 "json/values_util.h",
398 "lazy_instance_helpers.cc",
399 "lazy_instance_helpers.h",
406 "memory/aligned_memory.cc",
407 "memory/aligned_memory.h",
408 "memory/discardable_memory.cc",
409 "memory/discardable_memory.h",
410 "memory/discardable_memory_allocator.cc",
411 "memory/discardable_memory_allocator.h",
412 "memory/discardable_memory_internal.h",
413 "memory/discardable_shared_memory.cc",
414 "memory/discardable_shared_memory.h",
415 "memory/free_deleter.h",
416 "memory/memory_pressure_listener.cc",
417 "memory/memory_pressure_listener.h",
418 "memory/memory_pressure_monitor.cc",
419 "memory/memory_pressure_monitor.h",
420 "memory/nonscannable_memory.cc",
421 "memory/nonscannable_memory.h",
422 "memory/page_size.h",
423 "memory/platform_shared_memory_handle.cc",
424 "memory/platform_shared_memory_handle.h",
425 "memory/platform_shared_memory_mapper.h",
426 "memory/platform_shared_memory_region.cc",
427 "memory/platform_shared_memory_region.h",
431 "memory/raw_ptr_asan_bound_arg_tracker.cc",
432 "memory/raw_ptr_asan_bound_arg_tracker.h",
433 "memory/raw_ptr_asan_service.cc",
434 "memory/raw_ptr_asan_service.h",
435 "memory/raw_ptr_exclusion.h",
437 "memory/raw_scoped_refptr_mismatch_checker.h",
438 "memory/read_only_shared_memory_region.cc",
439 "memory/read_only_shared_memory_region.h",
440 "memory/ref_counted.cc",
441 "memory/ref_counted.h",
442 "memory/ref_counted_delete_on_sequence.h",
443 "memory/ref_counted_memory.cc",
444 "memory/ref_counted_memory.h",
446 "memory/scoped_policy.h",
447 "memory/scoped_refptr.h",
448 "memory/shared_memory_hooks.h",
449 "memory/shared_memory_mapper.cc",
450 "memory/shared_memory_mapper.h",
451 "memory/shared_memory_mapping.cc",
452 "memory/shared_memory_mapping.h",
453 "memory/shared_memory_security_policy.cc",
454 "memory/shared_memory_security_policy.h",
455 "memory/shared_memory_tracker.cc",
456 "memory/shared_memory_tracker.h",
457 "memory/singleton.h",
458 "memory/unsafe_shared_memory_pool.cc",
459 "memory/unsafe_shared_memory_pool.h",
460 "memory/unsafe_shared_memory_region.cc",
461 "memory/unsafe_shared_memory_region.h",
462 "memory/values_equivalent.h",
463 "memory/weak_auto_reset.h",
464 "memory/weak_ptr.cc",
466 "memory/writable_shared_memory_region.cc",
467 "memory/writable_shared_memory_region.h",
468 "message_loop/message_pump.cc",
469 "message_loop/message_pump.h",
470 "message_loop/message_pump_default.cc",
471 "message_loop/message_pump_default.h",
472 "message_loop/message_pump_for_io.h",
473 "message_loop/message_pump_for_ui.h",
474 "message_loop/message_pump_glib.cc",
475 "message_loop/message_pump_glib.h",
476 "message_loop/message_pump_type.h",
477 "message_loop/timer_slack.h",
478 "message_loop/work_id_provider.cc",
479 "message_loop/work_id_provider.h",
480 "metrics/bucket_ranges.cc",
481 "metrics/bucket_ranges.h",
484 "metrics/dummy_histogram.cc",
485 "metrics/dummy_histogram.h",
486 "metrics/field_trial.cc",
487 "metrics/field_trial.h",
488 "metrics/field_trial_param_associator.cc",
489 "metrics/field_trial_param_associator.h",
490 "metrics/field_trial_params.cc",
491 "metrics/field_trial_params.h",
492 "metrics/histogram.cc",
493 "metrics/histogram.h",
494 "metrics/histogram_base.cc",
495 "metrics/histogram_base.h",
496 "metrics/histogram_delta_serialization.cc",
497 "metrics/histogram_delta_serialization.h",
498 "metrics/histogram_flattener.h",
499 "metrics/histogram_functions.cc",
500 "metrics/histogram_functions.h",
501 "metrics/histogram_macros.h",
502 "metrics/histogram_macros_internal.h",
503 "metrics/histogram_macros_local.h",
504 "metrics/histogram_samples.cc",
505 "metrics/histogram_samples.h",
506 "metrics/histogram_snapshot_manager.cc",
507 "metrics/histogram_snapshot_manager.h",
508 "metrics/metrics_hashes.cc",
509 "metrics/metrics_hashes.h",
510 "metrics/persistent_histogram_allocator.cc",
511 "metrics/persistent_histogram_allocator.h",
512 "metrics/persistent_memory_allocator.cc",
513 "metrics/persistent_memory_allocator.h",
514 "metrics/persistent_sample_map.cc",
515 "metrics/persistent_sample_map.h",
516 "metrics/ranges_manager.cc",
517 "metrics/ranges_manager.h",
518 "metrics/record_histogram_checker.h",
519 "metrics/sample_map.cc",
520 "metrics/sample_map.h",
521 "metrics/sample_vector.cc",
522 "metrics/sample_vector.h",
523 "metrics/single_sample_metrics.cc",
524 "metrics/single_sample_metrics.h",
525 "metrics/sparse_histogram.cc",
526 "metrics/sparse_histogram.h",
527 "metrics/statistics_recorder.cc",
528 "metrics/statistics_recorder.h",
529 "metrics/user_metrics.cc",
530 "metrics/user_metrics.h",
531 "metrics/user_metrics_action.h",
537 "observer_list_internal.cc",
538 "observer_list_internal.h",
539 "observer_list_threadsafe.cc",
540 "observer_list_threadsafe.h",
541 "observer_list_types.cc",
542 "observer_list_types.h",
554 "power_monitor/battery_level_provider.cc",
555 "power_monitor/battery_level_provider.h",
556 "power_monitor/battery_state_sampler.cc",
557 "power_monitor/battery_state_sampler.h",
558 "power_monitor/moving_average.cc",
559 "power_monitor/moving_average.h",
560 "power_monitor/power_monitor.cc",
561 "power_monitor/power_monitor.h",
562 "power_monitor/power_monitor_device_source.cc",
563 "power_monitor/power_monitor_device_source.h",
564 "power_monitor/power_monitor_features.cc",
565 "power_monitor/power_monitor_features.h",
566 "power_monitor/power_monitor_source.cc",
567 "power_monitor/power_monitor_source.h",
568 "power_monitor/power_observer.h",
569 "power_monitor/sampling_event_source.cc",
570 "power_monitor/sampling_event_source.h",
571 "power_monitor/timer_sampling_event_source.cc",
572 "power_monitor/timer_sampling_event_source.h",
573 "process/environment_internal.cc",
574 "process/environment_internal.h",
582 "process/process_handle.cc",
583 "process/process_handle.h",
584 "process/process_info.h",
585 "process/process_iterator.cc",
586 "process/process_iterator.h",
587 "process/process_metrics.cc",
588 "process/process_metrics.h",
589 "process/process_metrics_iocounters.h",
590 "profiler/arm_cfi_table.cc",
591 "profiler/arm_cfi_table.h",
594 "profiler/metadata_recorder.cc",
595 "profiler/metadata_recorder.h",
596 "profiler/module_cache.cc",
597 "profiler/module_cache.h",
598 "profiler/profile_builder.h",
599 "profiler/register_context.h",
600 "profiler/sample_metadata.cc",
601 "profiler/sample_metadata.h",
602 "profiler/sampling_profiler_thread_token.cc",
603 "profiler/sampling_profiler_thread_token.h",
604 "profiler/stack_buffer.cc",
605 "profiler/stack_buffer.h",
606 "profiler/stack_copier.cc",
607 "profiler/stack_copier.h",
608 "profiler/stack_copier_suspend.cc",
609 "profiler/stack_copier_suspend.h",
610 "profiler/stack_sampler.cc",
611 "profiler/stack_sampler.h",
612 "profiler/stack_sampler_impl.cc",
613 "profiler/stack_sampler_impl.h",
614 "profiler/stack_sampling_profiler.cc",
615 "profiler/stack_sampling_profiler.h",
616 "profiler/suspendable_thread_delegate.h",
617 "profiler/thread_delegate.h",
618 "profiler/unwinder.cc",
619 "profiler/unwinder.h",
623 "ranges/algorithm.h",
624 "ranges/functional.h",
628 "sampling_heap_profiler/lock_free_address_hash_set.cc",
629 "sampling_heap_profiler/lock_free_address_hash_set.h",
630 "sampling_heap_profiler/poisson_allocation_sampler.cc",
631 "sampling_heap_profiler/poisson_allocation_sampler.h",
632 "sampling_heap_profiler/sampling_heap_profiler.cc",
633 "sampling_heap_profiler/sampling_heap_profiler.h",
634 "scoped_add_feature_flags.cc",
635 "scoped_add_feature_flags.h",
636 "scoped_clear_last_error.h",
637 "scoped_environment_variable_override.cc",
638 "scoped_environment_variable_override.h",
640 "scoped_multi_source_observation.h",
641 "scoped_native_library.cc",
642 "scoped_native_library.h",
643 "scoped_observation.h",
644 "sequence_checker.cc",
645 "sequence_checker.h",
646 "sequence_checker_impl.cc",
647 "sequence_checker_impl.h",
650 "state_transitions.h",
652 "strings/abseil_string_conversions.cc",
653 "strings/abseil_string_conversions.h",
654 "strings/abseil_string_number_conversions.cc",
655 "strings/abseil_string_number_conversions.h",
658 "strings/latin1_string_conversions.cc",
659 "strings/latin1_string_conversions.h",
660 "strings/pattern.cc",
662 "strings/safe_sprintf.cc",
663 "strings/safe_sprintf.h",
666 "strings/strcat_internal.h",
667 "strings/string_number_conversions.cc",
668 "strings/string_number_conversions.h",
669 "strings/string_number_conversions_internal.h",
670 "strings/string_piece.cc",
671 "strings/string_piece.h",
672 "strings/string_piece_forward.h",
673 "strings/string_split.cc",
674 "strings/string_split.h",
675 "strings/string_split_internal.h",
676 "strings/string_tokenizer.h",
677 "strings/string_util.cc",
678 "strings/string_util.h",
679 "strings/string_util_constants.cc",
680 "strings/string_util_internal.h",
681 "strings/stringize_macros.h",
682 "strings/stringprintf.cc",
683 "strings/stringprintf.h",
684 "strings/sys_string_conversions.h",
685 "strings/utf_offset_string_conversions.cc",
686 "strings/utf_offset_string_conversions.h",
687 "strings/utf_string_conversion_utils.cc",
688 "strings/utf_string_conversion_utils.h",
689 "strings/utf_string_conversions.cc",
690 "strings/utf_string_conversions.h",
691 "substring_set_matcher/matcher_string_pattern.cc",
692 "substring_set_matcher/matcher_string_pattern.h",
693 "substring_set_matcher/substring_set_matcher.cc",
694 "substring_set_matcher/substring_set_matcher.h",
695 "supports_user_data.cc",
696 "supports_user_data.h",
699 "synchronization/atomic_flag.cc",
700 "synchronization/atomic_flag.h",
701 "synchronization/condition_variable.h",
702 "synchronization/lock.cc",
703 "synchronization/lock.h",
704 "synchronization/lock_impl.h",
705 "synchronization/waitable_event.h",
706 "synchronization/waitable_event_watcher.h",
710 "system/sys_info.cc",
712 "system/sys_info_internal.h",
713 "system/system_monitor.cc",
714 "system/system_monitor.h",
715 "task/bind_post_task.h",
716 "task/bind_post_task_internal.h",
717 "task/cancelable_task_tracker.cc",
718 "task/cancelable_task_tracker.h",
719 "task/common/checked_lock.h",
720 "task/common/checked_lock_impl.cc",
721 "task/common/checked_lock_impl.h",
722 "task/common/lazy_now.cc",
723 "task/common/lazy_now.h",
724 "task/common/operations_controller.cc",
725 "task/common/operations_controller.h",
726 "task/common/scoped_defer_task_posting.cc",
727 "task/common/scoped_defer_task_posting.h",
728 "task/common/task_annotator.cc",
729 "task/common/task_annotator.h",
730 "task/current_thread.cc",
731 "task/current_thread.h",
732 "task/default_delayed_task_handle_delegate.cc",
733 "task/default_delayed_task_handle_delegate.h",
734 "task/deferred_sequenced_task_runner.cc",
735 "task/deferred_sequenced_task_runner.h",
736 "task/delay_policy.h",
737 "task/delayed_task_handle.cc",
738 "task/delayed_task_handle.h",
739 "task/lazy_thread_pool_task_runner.cc",
740 "task/lazy_thread_pool_task_runner.h",
743 "task/post_task_and_reply_with_result_internal.h",
744 "task/scoped_set_task_priority_for_current_thread.cc",
745 "task/scoped_set_task_priority_for_current_thread.h",
746 "task/sequence_manager/associated_thread_id.cc",
747 "task/sequence_manager/associated_thread_id.h",
748 "task/sequence_manager/atomic_flag_set.cc",
749 "task/sequence_manager/atomic_flag_set.h",
750 "task/sequence_manager/delayed_task_handle_delegate.cc",
751 "task/sequence_manager/delayed_task_handle_delegate.h",
752 "task/sequence_manager/enqueue_order.h",
753 "task/sequence_manager/enqueue_order_generator.cc",
754 "task/sequence_manager/enqueue_order_generator.h",
755 "task/sequence_manager/fence.cc",
756 "task/sequence_manager/fence.h",
757 "task/sequence_manager/hierarchical_timing_wheel.cc",
758 "task/sequence_manager/hierarchical_timing_wheel.h",
759 "task/sequence_manager/lazily_deallocated_deque.h",
760 "task/sequence_manager/sequence_manager.cc",
761 "task/sequence_manager/sequence_manager.h",
762 "task/sequence_manager/sequence_manager_impl.cc",
763 "task/sequence_manager/sequence_manager_impl.h",
764 "task/sequence_manager/sequenced_task_source.cc",
765 "task/sequence_manager/sequenced_task_source.h",
766 "task/sequence_manager/task_order.cc",
767 "task/sequence_manager/task_order.h",
768 "task/sequence_manager/task_queue.cc",
769 "task/sequence_manager/task_queue.h",
770 "task/sequence_manager/task_queue_impl.cc",
771 "task/sequence_manager/task_queue_impl.h",
772 "task/sequence_manager/task_queue_selector.cc",
773 "task/sequence_manager/task_queue_selector.h",
774 "task/sequence_manager/task_queue_selector_logic.h",
775 "task/sequence_manager/task_time_observer.h",
776 "task/sequence_manager/tasks.cc",
777 "task/sequence_manager/tasks.h",
778 "task/sequence_manager/thread_controller.cc",
779 "task/sequence_manager/thread_controller.h",
780 "task/sequence_manager/thread_controller_impl.cc",
781 "task/sequence_manager/thread_controller_impl.h",
782 "task/sequence_manager/thread_controller_power_monitor.cc",
783 "task/sequence_manager/thread_controller_power_monitor.h",
784 "task/sequence_manager/thread_controller_with_message_pump_impl.cc",
785 "task/sequence_manager/thread_controller_with_message_pump_impl.h",
786 "task/sequence_manager/time_domain.cc",
787 "task/sequence_manager/time_domain.h",
788 "task/sequence_manager/timing_wheel.cc",
789 "task/sequence_manager/timing_wheel.h",
790 "task/sequence_manager/wake_up_queue.cc",
791 "task/sequence_manager/wake_up_queue.h",
792 "task/sequence_manager/work_deduplicator.cc",
793 "task/sequence_manager/work_deduplicator.h",
794 "task/sequence_manager/work_queue.cc",
795 "task/sequence_manager/work_queue.h",
796 "task/sequence_manager/work_queue_sets.cc",
797 "task/sequence_manager/work_queue_sets.h",
798 "task/sequenced_task_runner.cc",
799 "task/sequenced_task_runner.h",
800 "task/sequenced_task_runner_helpers.h",
801 "task/simple_task_executor.cc",
802 "task/simple_task_executor.h",
803 "task/single_thread_task_executor.cc",
804 "task/single_thread_task_executor.h",
805 "task/single_thread_task_runner.cc",
806 "task/single_thread_task_runner.h",
807 "task/single_thread_task_runner_thread_mode.h",
808 "task/task_executor.cc",
809 "task/task_executor.h",
810 "task/task_features.cc",
811 "task/task_features.h",
812 "task/task_observer.h",
813 "task/task_runner.cc",
814 "task/task_runner.h",
815 "task/task_runner_util.h",
816 "task/task_traits.cc",
817 "task/task_traits.h",
818 "task/task_traits_extension.h",
819 "task/thread_pool.cc",
820 "task/thread_pool.h",
821 "task/thread_pool/delayed_priority_queue.cc",
822 "task/thread_pool/delayed_priority_queue.h",
823 "task/thread_pool/delayed_task_manager.cc",
824 "task/thread_pool/delayed_task_manager.h",
825 "task/thread_pool/environment_config.cc",
826 "task/thread_pool/environment_config.h",
827 "task/thread_pool/initialization_util.cc",
828 "task/thread_pool/initialization_util.h",
829 "task/thread_pool/job_task_source.cc",
830 "task/thread_pool/job_task_source.h",
831 "task/thread_pool/pooled_parallel_task_runner.cc",
832 "task/thread_pool/pooled_parallel_task_runner.h",
833 "task/thread_pool/pooled_sequenced_task_runner.cc",
834 "task/thread_pool/pooled_sequenced_task_runner.h",
835 "task/thread_pool/pooled_single_thread_task_runner_manager.cc",
836 "task/thread_pool/pooled_single_thread_task_runner_manager.h",
837 "task/thread_pool/pooled_task_runner_delegate.cc",
838 "task/thread_pool/pooled_task_runner_delegate.h",
839 "task/thread_pool/priority_queue.cc",
840 "task/thread_pool/priority_queue.h",
841 "task/thread_pool/sequence.cc",
842 "task/thread_pool/sequence.h",
843 "task/thread_pool/service_thread.cc",
844 "task/thread_pool/service_thread.h",
845 "task/thread_pool/task.cc",
846 "task/thread_pool/task.h",
847 "task/thread_pool/task_source.cc",
848 "task/thread_pool/task_source.h",
849 "task/thread_pool/task_source_sort_key.cc",
850 "task/thread_pool/task_source_sort_key.h",
851 "task/thread_pool/task_tracker.cc",
852 "task/thread_pool/task_tracker.h",
853 "task/thread_pool/thread_group.cc",
854 "task/thread_pool/thread_group.h",
855 "task/thread_pool/thread_group_impl.cc",
856 "task/thread_pool/thread_group_impl.h",
857 "task/thread_pool/thread_group_native.cc",
858 "task/thread_pool/thread_group_native.h",
859 "task/thread_pool/thread_pool_impl.cc",
860 "task/thread_pool/thread_pool_impl.h",
861 "task/thread_pool/thread_pool_instance.cc",
862 "task/thread_pool/thread_pool_instance.h",
863 "task/thread_pool/tracked_ref.h",
864 "task/thread_pool/worker_thread.cc",
865 "task/thread_pool/worker_thread.h",
866 "task/thread_pool/worker_thread_observer.h",
867 "task/thread_pool/worker_thread_stack.cc",
868 "task/thread_pool/worker_thread_stack.h",
869 "task/updateable_sequenced_task_runner.h",
871 "test/malloc_wrapper.h",
872 "test/scoped_logging_settings.h",
874 "third_party/cityhash/city.cc",
875 "third_party/cityhash/city.h",
876 "third_party/cityhash_v103/src/city_v103.cc",
877 "third_party/cityhash_v103/src/city_v103.h",
878 "third_party/icu/icu_utf.h",
879 "third_party/nspr/prtime.cc",
880 "third_party/nspr/prtime.h",
881 "third_party/superfasthash/superfasthash.c",
882 "thread_annotations.h",
883 "threading/hang_watcher.cc",
884 "threading/hang_watcher.h",
885 "threading/platform_thread.cc",
886 "threading/platform_thread.h",
887 "threading/platform_thread_ref.cc",
888 "threading/platform_thread_ref.h",
889 "threading/post_task_and_reply_impl.cc",
890 "threading/post_task_and_reply_impl.h",
891 "threading/scoped_blocking_call.cc",
892 "threading/scoped_blocking_call.h",
893 "threading/scoped_blocking_call_internal.cc",
894 "threading/scoped_blocking_call_internal.h",
895 "threading/scoped_thread_priority.cc",
896 "threading/scoped_thread_priority.h",
897 "threading/sequence_bound.h",
898 "threading/sequence_local_storage_map.cc",
899 "threading/sequence_local_storage_map.h",
900 "threading/sequence_local_storage_slot.cc",
901 "threading/sequence_local_storage_slot.h",
902 "threading/sequenced_task_runner_handle.cc",
903 "threading/sequenced_task_runner_handle.h",
904 "threading/simple_thread.cc",
905 "threading/simple_thread.h",
906 "threading/thread.cc",
907 "threading/thread.h",
908 "threading/thread_checker.cc",
909 "threading/thread_checker.h",
910 "threading/thread_checker_impl.cc",
911 "threading/thread_checker_impl.h",
912 "threading/thread_collision_warner.cc",
913 "threading/thread_collision_warner.h",
914 "threading/thread_id_name_manager.cc",
915 "threading/thread_id_name_manager.h",
916 "threading/thread_local.h",
917 "threading/thread_local_internal.h",
918 "threading/thread_local_storage.cc",
919 "threading/thread_local_storage.h",
920 "threading/thread_restrictions.cc",
921 "threading/thread_restrictions.h",
922 "threading/thread_task_runner_handle.cc",
923 "threading/thread_task_runner_handle.h",
924 "threading/threading_features.h",
925 "threading/watchdog.cc",
926 "threading/watchdog.h",
929 "time/default_clock.cc",
930 "time/default_clock.h",
931 "time/default_tick_clock.cc",
932 "time/default_tick_clock.h",
933 "time/tick_clock.cc",
937 "time/time_delta_from_string.cc",
938 "time/time_delta_from_string.h",
939 "time/time_override.cc",
940 "time/time_override.h",
941 "time/time_to_iso8601.cc",
942 "time/time_to_iso8601.h",
943 "timer/elapsed_timer.cc",
944 "timer/elapsed_timer.h",
945 "timer/hi_res_timer_manager.h",
946 "timer/lap_timer.cc",
950 "timer/wall_clock_timer.cc",
951 "timer/wall_clock_timer.h",
954 "trace_event/base_tracing.h",
955 "trace_event/base_tracing_forward.h",
956 "trace_event/common/trace_event_common.h",
957 "trace_event/heap_profiler_allocation_context.cc",
958 "trace_event/heap_profiler_allocation_context.h",
959 "trace_event/heap_profiler_allocation_context_tracker.cc",
960 "trace_event/heap_profiler_allocation_context_tracker.h",
961 "trace_event/memory_allocator_dump_guid.cc",
962 "trace_event/memory_allocator_dump_guid.h",
963 "trace_event/trace_id_helper.cc",
964 "trace_event/trace_id_helper.h",
967 "types/always_false.h",
969 "types/expected_internal.h",
971 "types/optional_ref.h",
972 "types/optional_util.h",
974 "types/strong_alias.h",
975 "types/token_type.h",
976 "unguessable_token.cc",
977 "unguessable_token.h",
978 "value_iterators.cc",
995 # Various files that are unused in the Chromium build, but presumably here to
996 # make downstream's life easier. They are not included in the main sources
997 # list to avoid breaking GN formatting's auto-sorting.
999 #"process/process_handle_freebsd.cc",
1000 #"process/process_iterator_freebsd.cc",
1001 #"process/process_metrics_freebsd.cc",
1002 #"system/sys_info_freebsd.cc",
1003 #"process/process_iterator_openbsd.cc",
1004 #"process/process_handle_openbsd.cc",
1005 #"process/process_metrics_openbsd.cc",
1006 #"system/sys_info_openbsd.cc",
1011 "debug/debugger_posix.cc",
1012 "debug/stack_trace_posix.cc",
1013 "file_descriptor_posix.cc",
1014 "file_descriptor_posix.h",
1015 "files/dir_reader_posix.h",
1016 "files/file_descriptor_watcher_posix.cc",
1017 "files/file_descriptor_watcher_posix.h",
1018 "files/file_enumerator_posix.cc",
1019 "files/file_posix.cc",
1020 "files/file_util_posix.cc",
1021 "files/memory_mapped_file_posix.cc",
1022 "memory/madv_free_discardable_memory_allocator_posix.cc",
1023 "memory/madv_free_discardable_memory_allocator_posix.h",
1024 "memory/madv_free_discardable_memory_posix.cc",
1025 "memory/madv_free_discardable_memory_posix.h",
1026 "memory/page_size_posix.cc",
1027 "message_loop/watchable_io_message_pump_posix.cc",
1028 "message_loop/watchable_io_message_pump_posix.h",
1029 "native_library_posix.cc",
1030 "posix/eintr_wrapper.h",
1031 "posix/file_descriptor_shuffle.cc",
1032 "posix/file_descriptor_shuffle.h",
1033 "posix/global_descriptors.cc",
1034 "posix/global_descriptors.h",
1035 "posix/safe_strerror.cc",
1036 "posix/safe_strerror.h",
1037 "posix/unix_domain_socket.cc",
1038 "posix/unix_domain_socket.h",
1039 "process/kill_posix.cc",
1040 "process/launch_posix.cc",
1041 "process/process_handle_posix.cc",
1042 "process/process_metrics_posix.cc",
1043 "process/process_posix.cc",
1044 "profiler/module_cache_posix.cc",
1045 "rand_util_posix.cc",
1046 "strings/string_util_posix.h",
1047 "strings/sys_string_conversions_posix.cc",
1048 "sync_socket_posix.cc",
1049 "synchronization/condition_variable_posix.cc",
1050 "synchronization/lock_impl_posix.cc",
1051 "synchronization/waitable_event_posix.cc",
1052 "synchronization/waitable_event_watcher_posix.cc",
1053 "system/sys_info_posix.cc",
1054 "threading/platform_thread_internal_posix.cc",
1055 "threading/platform_thread_internal_posix.h",
1056 "threading/platform_thread_posix.cc",
1057 "threading/thread_local_storage_posix.cc",
1058 "timer/hi_res_timer_manager_posix.cc",
1061 if (!is_nacl && !is_apple) {
1063 "profiler/stack_base_address_posix.cc",
1064 "profiler/stack_base_address_posix.h",
1065 "profiler/stack_copier_signal.cc",
1066 "profiler/stack_copier_signal.h",
1067 "profiler/stack_sampler_posix.cc",
1068 "profiler/thread_delegate_posix.cc",
1069 "profiler/thread_delegate_posix.h",
1076 "debug/debugger_win.cc",
1077 "debug/gdi_debug_util_win.cc",
1078 "debug/gdi_debug_util_win.h",
1079 "debug/handle_hooks_win.cc",
1080 "debug/handle_hooks_win.h",
1081 "debug/invalid_access_win.cc",
1082 "debug/invalid_access_win.h",
1083 "debug/stack_trace_win.cc",
1084 "enterprise_util.cc",
1085 "enterprise_util.h",
1086 "enterprise_util_win.cc",
1087 "file_version_info_win.cc",
1088 "file_version_info_win.h",
1089 "files/file_path_watcher_win.cc",
1090 "files/file_util_win.cc",
1091 "files/file_win.cc",
1092 "files/memory_mapped_file_win.cc",
1095 "memory/page_size_win.cc",
1096 "message_loop/message_pump_win.cc",
1097 "message_loop/message_pump_win.h",
1098 "native_library_win.cc",
1099 "power_monitor/battery_level_provider_win.cc",
1100 "power_monitor/power_monitor_device_source_win.cc",
1101 "power_monitor/speed_limit_observer_win.cc",
1102 "power_monitor/speed_limit_observer_win.h",
1103 "process/kill_win.cc",
1104 "process/launch_win.cc",
1105 "process/memory_win.cc",
1106 "process/process_handle_win.cc",
1107 "process/process_info_win.cc",
1108 "process/process_iterator_win.cc",
1109 "process/process_metrics_win.cc",
1110 "process/process_win.cc",
1111 "profiler/module_cache_win.cc",
1112 "profiler/native_unwinder_win.cc",
1113 "profiler/native_unwinder_win.h",
1114 "profiler/stack_sampler_win.cc",
1115 "profiler/suspendable_thread_delegate_win.cc",
1116 "profiler/suspendable_thread_delegate_win.h",
1117 "scoped_clear_last_error_win.cc",
1118 "strings/strcat_win.cc",
1119 "strings/strcat_win.h",
1120 "strings/string_number_conversions_win.cc",
1121 "strings/string_number_conversions_win.h",
1122 "strings/string_split_win.cc",
1123 "strings/string_split_win.h",
1124 "strings/string_util_win.cc",
1125 "strings/string_util_win.h",
1126 "strings/sys_string_conversions_win.cc",
1127 "sync_socket_win.cc",
1128 "synchronization/condition_variable_win.cc",
1129 "synchronization/lock_impl_win.cc",
1130 "synchronization/waitable_event_watcher_win.cc",
1131 "synchronization/waitable_event_win.cc",
1132 "task/thread_pool/thread_group_native_win.cc",
1133 "task/thread_pool/thread_group_native_win.h",
1134 "threading/platform_thread_win.cc",
1135 "threading/platform_thread_win.h",
1136 "threading/thread_local_storage_win.cc",
1137 "timer/hi_res_timer_manager_win.cc",
1138 "win/access_token.cc",
1139 "win/access_token.h",
1140 "win/async_operation.h",
1144 "win/com_init_balancer.cc",
1145 "win/com_init_balancer.h",
1146 "win/com_init_check_hook.cc",
1147 "win/com_init_check_hook.h",
1148 "win/com_init_util.cc",
1149 "win/com_init_util.h",
1150 "win/core_winrt_util.cc",
1151 "win/core_winrt_util.h",
1152 "win/current_module.h",
1153 "win/dark_mode_support.cc",
1154 "win/dark_mode_support.h",
1155 "win/default_apps_util.cc",
1156 "win/default_apps_util.h",
1157 "win/embedded_i18n/language_selector.cc",
1158 "win/embedded_i18n/language_selector.h",
1159 "win/enum_variant.cc",
1160 "win/enum_variant.h",
1161 "win/event_trace_consumer.h",
1162 "win/event_trace_controller.cc",
1163 "win/event_trace_controller.h",
1164 "win/event_trace_provider.cc",
1165 "win/event_trace_provider.h",
1166 "win/hstring_compare.cc",
1167 "win/hstring_compare.h",
1168 "win/hstring_reference.cc",
1169 "win/hstring_reference.h",
1172 "win/iat_patch_function.cc",
1173 "win/iat_patch_function.h",
1175 "win/message_window.cc",
1176 "win/message_window.h",
1179 "win/object_watcher.cc",
1180 "win/object_watcher.h",
1181 "win/patch_util.cc",
1183 "win/pe_image_reader.cc",
1184 "win/pe_image_reader.h",
1185 "win/post_async_results.h",
1186 "win/process_startup_helper.cc",
1187 "win/process_startup_helper.h",
1188 "win/propvarutil.h",
1192 "win/resource_util.cc",
1193 "win/resource_util.h",
1194 "win/scoped_bstr.cc",
1195 "win/scoped_bstr.h",
1196 "win/scoped_co_mem.h",
1197 "win/scoped_com_initializer.cc",
1198 "win/scoped_com_initializer.h",
1199 "win/scoped_gdi_object.h",
1200 "win/scoped_handle.cc",
1201 "win/scoped_handle.h",
1202 "win/scoped_handle_verifier.cc",
1203 "win/scoped_handle_verifier.h",
1205 "win/scoped_hglobal.h",
1206 "win/scoped_hstring.cc",
1207 "win/scoped_hstring.h",
1208 "win/scoped_localalloc.h",
1209 "win/scoped_process_information.cc",
1210 "win/scoped_process_information.h",
1211 "win/scoped_propvariant.h",
1212 "win/scoped_safearray.h",
1213 "win/scoped_select_object.h",
1214 "win/scoped_variant.cc",
1215 "win/scoped_variant.h",
1216 "win/scoped_windows_thread_environment.h",
1217 "win/scoped_winrt_initializer.cc",
1218 "win/scoped_winrt_initializer.h",
1219 "win/security_util.cc",
1220 "win/security_util.h",
1227 "win/startup_information.cc",
1228 "win/startup_information.h",
1229 "win/variant_util.h",
1230 "win/variant_vector.cc",
1231 "win/variant_vector.h",
1234 "win/win_handle_types.h",
1235 "win/win_handle_types_list.inc",
1238 "win/wincrypt_shim.h",
1239 "win/windows_defines.inc",
1240 "win/windows_h_disallowed.h",
1241 "win/windows_types.h",
1242 "win/windows_undefines.inc",
1243 "win/windows_version.cc",
1244 "win/windows_version.h",
1245 "win/windowsx_shim.h",
1246 "win/winrt_foundation_helpers.h",
1247 "win/winrt_storage_util.cc",
1248 "win/winrt_storage_util.h",
1251 "win/wrapped_window_proc.cc",
1252 "win/wrapped_window_proc.h",
1258 "allocator/partition_allocator/shim/allocator_interception_mac.h",
1259 "allocator/partition_allocator/shim/allocator_interception_mac.mm",
1260 "allocator/partition_allocator/shim/malloc_zone_functions_mac.cc",
1261 "allocator/partition_allocator/shim/malloc_zone_functions_mac.h",
1262 "enterprise_util.cc",
1263 "enterprise_util.h",
1264 "enterprise_util_mac.mm",
1265 "file_version_info_mac.h",
1266 "file_version_info_mac.mm",
1267 "files/file_path_watcher_mac.cc",
1268 "files/file_util_mac.mm",
1269 "mac/authorization_util.h",
1270 "mac/authorization_util.mm",
1271 "mac/backup_util.h",
1272 "mac/backup_util.mm",
1273 "mac/bundle_locations.h",
1274 "mac/bundle_locations.mm",
1275 "mac/call_with_eh_frame.cc",
1276 "mac/call_with_eh_frame.h",
1277 "mac/call_with_eh_frame_asm.S",
1278 "mac/close_nocancel.cc",
1279 "mac/dispatch_source_mach.cc",
1280 "mac/dispatch_source_mach.h",
1281 "mac/foundation_util.h",
1282 "mac/foundation_util.mm",
1283 "mac/launch_services_util.h",
1284 "mac/launch_services_util.mm",
1287 "mac/mac_logging.h",
1288 "mac/mac_logging.mm",
1291 "mac/mach_logging.cc",
1292 "mac/mach_logging.h",
1293 "mac/mach_port_rendezvous.cc",
1294 "mac/mach_port_rendezvous.h",
1295 "mac/os_crash_dumps.cc",
1296 "mac/os_crash_dumps.h",
1297 "mac/scoped_aedesc.h",
1298 "mac/scoped_authorizationref.h",
1299 "mac/scoped_authorizationref.mm",
1300 "mac/scoped_block.h",
1301 "mac/scoped_cffiledescriptorref.h",
1302 "mac/scoped_cftyperef.h",
1303 "mac/scoped_dispatch_object.h",
1304 "mac/scoped_ionotificationportref.h",
1305 "mac/scoped_ioobject.h",
1306 "mac/scoped_ioplugininterface.h",
1307 "mac/scoped_launch_data.h",
1308 "mac/scoped_mach_msg_destroy.h",
1309 "mac/scoped_mach_port.cc",
1310 "mac/scoped_mach_port.h",
1311 "mac/scoped_mach_vm.cc",
1312 "mac/scoped_mach_vm.h",
1313 "mac/scoped_nsautorelease_pool.h",
1314 "mac/scoped_nsautorelease_pool.mm",
1315 "mac/scoped_nsobject.h",
1316 "mac/scoped_objc_class_swizzler.h",
1317 "mac/scoped_objc_class_swizzler.mm",
1318 "mac/scoped_sending_event.h",
1319 "mac/scoped_sending_event.mm",
1320 "mac/sdk_forward_declarations.h",
1321 "mac/sdk_forward_declarations.mm",
1322 "message_loop/message_pump_mac.h",
1323 "message_loop/message_pump_mac.mm",
1324 "native_library_mac.mm",
1325 "power_monitor/battery_level_provider_mac.mm",
1326 "power_monitor/battery_state_sampler_mac.cc",
1327 "power_monitor/iopm_power_source_sampling_event_source.cc",
1328 "power_monitor/iopm_power_source_sampling_event_source.h",
1329 "power_monitor/power_monitor_device_source_mac.mm",
1330 "power_monitor/thermal_state_observer_mac.h",
1331 "power_monitor/thermal_state_observer_mac.mm",
1332 "process/kill_mac.cc",
1333 "process/launch_mac.cc",
1334 "process/memory_mac.mm",
1335 "process/port_provider_mac.cc",
1336 "process/port_provider_mac.h",
1337 "process/process_handle_mac.cc",
1338 "process/process_info_mac.cc",
1339 "process/process_iterator_mac.cc",
1340 "process/process_mac.cc",
1341 "process/process_metrics_mac.cc",
1342 "profiler/frame_pointer_unwinder.cc",
1343 "profiler/frame_pointer_unwinder.h",
1344 "profiler/module_cache_mac.cc",
1345 "profiler/stack_sampler_mac.cc",
1346 "profiler/suspendable_thread_delegate_mac.cc",
1347 "profiler/suspendable_thread_delegate_mac.h",
1348 "strings/sys_string_conversions_mac.mm",
1349 "synchronization/waitable_event_mac.cc",
1350 "synchronization/waitable_event_watcher_mac.cc",
1351 "task/thread_pool/thread_group_native_mac.h",
1352 "task/thread_pool/thread_group_native_mac.mm",
1353 "threading/platform_thread_mac.mm",
1359 "critical_closure_internal_ios.mm",
1360 "ios/block_types.h",
1361 "ios/device_util.h",
1362 "ios/device_util.mm",
1365 "ios/ns_error_util.h",
1366 "ios/ns_error_util.mm",
1368 "ios/scoped_critical_action.h",
1369 "ios/scoped_critical_action.mm",
1370 "native_library_ios.mm",
1371 "process/launch_ios.cc",
1372 "process/process_metrics_ios.cc",
1373 "profiler/module_cache_mac.cc",
1374 "profiler/stack_sampler_ios.cc",
1376 if (is_cronet_build) {
1378 "message_loop/message_pump_io_ios.cc",
1379 "message_loop/message_pump_io_ios.h",
1383 "message_loop/message_pump_kqueue.cc",
1384 "message_loop/message_pump_kqueue.h",
1388 if (ios_stack_profiler_enabled) {
1390 "profiler/frame_pointer_unwinder.cc",
1391 "profiler/frame_pointer_unwinder.h",
1392 "profiler/suspendable_thread_delegate_mac.cc",
1393 "profiler/suspendable_thread_delegate_mac.h",
1400 "debug/stack_trace_android.cc",
1401 "files/file_util_android.cc",
1402 "files/scoped_file_android.cc",
1403 "message_loop/message_pump_android.cc",
1404 "message_loop/message_pump_android.h",
1405 "os_compat_android.cc",
1406 "os_compat_android.h",
1407 "process/process_android.cc",
1408 "profiler/stack_sampler_android.cc",
1409 "threading/platform_thread_android.cc",
1413 if (is_linux || is_chromeos || is_tizen) {
1415 "debug/proc_maps_linux.cc",
1416 "debug/proc_maps_linux.h",
1417 "files/dir_reader_linux.h",
1418 "files/file_util_linux.cc",
1419 "files/scoped_file_linux.cc",
1420 "process/internal_linux.cc",
1421 "process/internal_linux.h",
1422 "process/memory_linux.cc",
1423 "process/process_handle_linux.cc",
1424 "process/process_iterator_linux.cc",
1425 "process/process_linux.cc",
1426 "process/process_metrics_linux.cc",
1427 "threading/platform_thread_linux.cc",
1431 if (is_linux || is_chromeos || is_android || is_fuchsia || is_tizen) {
1433 "files/file_path_watcher_inotify.cc",
1434 "files/file_path_watcher_inotify.h",
1442 "metrics/persistent_histogram_storage.cc",
1443 "metrics/persistent_histogram_storage.h",
1448 "base_paths_win.cc",
1456 "base_paths_mac.mm",
1462 "base_paths_android.cc",
1463 "base_paths_android.h",
1468 sources += [ "base_paths_posix.h" ]
1471 if (is_linux || is_tizen || is_chromeos) {
1473 "base_paths_posix.cc",
1474 "debug/elf_reader.cc",
1475 "debug/elf_reader.h",
1476 "stack_canary_linux.cc",
1477 "stack_canary_linux.h",
1483 sources += external_base_sources
1484 configs += external_base_configs
1487 all_dependent_configs = []
1488 defines = [ "BASE_IMPLEMENTATION" ]
1495 "//build/config:precompiled_headers",
1496 "//build/config/compiler:prevent_unsafe_narrowing",
1497 "//build/config/compiler:wexit_time_destructors",
1498 "//build/config/compiler:wglobal_constructors",
1502 ":message_pump_buildflags",
1503 "//base/allocator:buildflags",
1504 "//base/third_party/double_conversion",
1505 "//base/third_party/dynamic_annotations",
1506 "//build:branding_buildflags",
1507 "//build/config/compiler:compiler_buildflags",
1508 "//third_party/modp_b64",
1511 # native_unwinder_android is intended for use solely via a dynamic feature
1512 # module, to avoid increasing Chrome's executable size.
1513 assert_no_deps = [ ":native_unwinder_android" ]
1515 rs_crate_root = "base.rs"
1516 rs_sources = [ "base.rs" ]
1518 if (build_rust_json_parser) {
1519 # TODO(crbug.com/1298039): The BUILDFLAG should be used instead.
1520 rs_configs = [ ":todo_buildflag_build_rust_json_parser" ]
1522 "//third_party/rust/serde/v1:lib",
1523 "//third_party/rust/serde_json_lenient/v0_1:lib",
1526 "json/json_parser.rs",
1530 "values_deserialization.rs",
1534 "json/json_parser.rs",
1537 "rs_glue/values_glue.cc",
1538 "rs_glue/values_glue.h",
1541 "json/json_parser.cc",
1542 "json/json_parser.h",
1547 ":anchor_functions_buildflags",
1551 ":clang_profiling_buildflags",
1552 ":debugging_buildflags",
1553 ":feature_list_buildflags",
1554 ":ios_cronet_buildflags",
1555 ":logging_buildflags",
1556 ":orderfile_buildflags",
1557 ":parsing_buildflags",
1558 ":power_monitor_buildflags",
1559 ":profiler_buildflags",
1560 ":sanitizer_buildflags",
1561 ":synchronization_buildflags",
1562 ":tracing_buildflags",
1563 "//base/allocator/partition_allocator:buildflags",
1564 "//base/numerics:base_numerics",
1565 "//build:chromecast_buildflags",
1566 "//build:chromeos_buildflags",
1567 "//third_party/abseil-cpp:absl",
1570 if (use_custom_libcxx && !is_debug) {
1571 public_deps += [ ":nodebug_assertion" ]
1574 # Needed for <atomic> if using newer C++ library than sysroot, except if
1575 # building inside the cros_sdk environment - use host_toolchain as a
1576 # more robust check for this.
1577 if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) &&
1578 host_toolchain != "//build/toolchain/cros:host") {
1579 libs += [ "atomic" ]
1589 if (use_allocator_shim) {
1591 "allocator/partition_allocator/shim/allocator_shim.cc",
1592 "allocator/partition_allocator/shim/allocator_shim.h",
1593 "allocator/partition_allocator/shim/allocator_shim_internals.h",
1595 if (use_partition_alloc) {
1597 "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc",
1598 "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.h",
1603 "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h",
1604 "allocator/partition_allocator/shim/allocator_shim_override_linker_wrapped_symbols.h",
1606 all_dependent_configs += [ "//base/allocator:wrap_malloc_symbols" ]
1610 "allocator/early_zone_registration_mac.h",
1611 "allocator/partition_allocator/shim/allocator_shim_override_mac_default_zone.h",
1612 "allocator/partition_allocator/shim/allocator_shim_override_mac_symbols.h",
1614 configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ]
1616 if (is_chromeos || is_linux) {
1618 "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h",
1619 "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h",
1620 "allocator/partition_allocator/shim/allocator_shim_override_libc_symbols.h",
1625 "allocator/partition_allocator/shim/allocator_shim_override_ucrt_symbols_win.h",
1626 "allocator/partition_allocator/shim/winheap_stubs_win.cc",
1627 "allocator/partition_allocator/shim/winheap_stubs_win.h",
1631 if (use_allocator == "none") {
1633 sources += [ "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" ]
1636 sources += [ "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc" ]
1638 if (is_chromeos || is_linux) {
1639 sources += [ "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_glibc.cc" ]
1642 sources += [ "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_winheap.cc" ]
1647 if (enable_rust && toolchain_has_rust) {
1648 # TODO(adetaylor): we include conversions between base and cxx's Rust types.
1649 # We assume that any //base client who has flipped 'enable_rust' likely wants
1650 # these, but it's conceivable that some clients might want to enable Rust
1651 # without adding these cxx conversions. If so we would want to add an
1652 # additional gn conditional e.g. enable_rust_binding_in_base
1654 "containers/span_rust.h",
1655 "strings/string_piece_rust.h",
1657 deps += [ "//build/rust:cxx_cppdeps" ]
1660 if (use_clang_profiling) {
1661 # Call-sites use this conditional on the CLANG_PROFILING macro, for clarity.
1663 "test/clang_profiling.cc",
1664 "test/clang_profiling.h",
1668 # Allow more direct string conversions on platforms with native utf8
1670 if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
1671 defines += [ "SYSTEM_NATIVE_UTF8" ]
1677 "debug/stack_trace_posix.cc",
1678 "profiler/stack_sampler_posix.cc",
1681 "android/android_hardware_buffer_compat.cc",
1682 "android/android_hardware_buffer_compat.h",
1683 "android/android_image_reader_abi.h",
1684 "android/android_image_reader_compat.cc",
1685 "android/android_image_reader_compat.h",
1686 "android/apk_assets.cc",
1687 "android/apk_assets.h",
1688 "android/application_status_listener.cc",
1689 "android/application_status_listener.h",
1690 "android/base_feature_list.cc",
1691 "android/base_features.cc",
1692 "android/base_features.h",
1693 "android/base_jni_onload.cc",
1694 "android/base_jni_onload.h",
1695 "android/build_info.cc",
1696 "android/build_info.h",
1697 "android/bundle_utils.cc",
1698 "android/bundle_utils.h",
1699 "android/callback_android.cc",
1700 "android/callback_android.h",
1701 "android/child_process_binding_types.h",
1702 "android/child_process_service.cc",
1703 "android/command_line_android.cc",
1704 "android/content_uri_utils.cc",
1705 "android/content_uri_utils.h",
1706 "android/cpu_features.cc",
1707 "android/early_trace_event_binding.cc",
1708 "android/early_trace_event_binding.h",
1709 "android/event_log.cc",
1710 "android/event_log.h",
1711 "android/feature_list_jni.cc",
1712 "android/features_jni.cc",
1713 "android/field_trial_list.cc",
1714 "android/important_file_writer_android.cc",
1715 "android/int_string_callback.cc",
1716 "android/int_string_callback.h",
1717 "android/jank_metric_uma_recorder.cc",
1718 "android/jank_metric_uma_recorder.h",
1719 "android/java_exception_reporter.cc",
1720 "android/java_exception_reporter.h",
1721 "android/java_handler_thread.cc",
1722 "android/java_handler_thread.h",
1723 "android/java_heap_dump_generator.cc",
1724 "android/java_heap_dump_generator.h",
1725 "android/java_runtime.cc",
1726 "android/java_runtime.h",
1727 "android/jni_android.cc",
1728 "android/jni_android.h",
1729 "android/jni_array.cc",
1730 "android/jni_array.h",
1731 "android/jni_generator/jni_generator_helper.h",
1732 "android/jni_int_wrapper.h",
1733 "android/jni_registrar.cc",
1734 "android/jni_registrar.h",
1735 "android/jni_string.cc",
1736 "android/jni_string.h",
1737 "android/jni_utils.cc",
1738 "android/jni_utils.h",
1739 "android/jni_weak_ref.cc",
1740 "android/jni_weak_ref.h",
1741 "android/library_loader/anchor_functions.cc",
1742 "android/library_loader/anchor_functions.h",
1743 "android/library_loader/library_loader_hooks.cc",
1744 "android/library_loader/library_loader_hooks.h",
1745 "android/library_loader/library_prefetcher.cc",
1746 "android/library_loader/library_prefetcher.h",
1747 "android/library_loader/library_prefetcher_hooks.cc",
1748 "android/locale_utils.cc",
1749 "android/locale_utils.h",
1750 "android/memory_pressure_listener_android.cc",
1751 "android/memory_pressure_listener_android.h",
1752 "android/native_uma_recorder.cc",
1753 "android/path_service_android.cc",
1754 "android/path_utils.cc",
1755 "android/path_utils.h",
1756 "android/radio_utils.cc",
1757 "android/radio_utils.h",
1758 "android/reached_addresses_bitset.cc",
1759 "android/reached_addresses_bitset.h",
1760 "android/reached_code_profiler.cc",
1761 "android/reached_code_profiler.h",
1762 "android/remove_stale_data.cc",
1763 "android/remove_stale_data.h",
1764 "android/scoped_hardware_buffer_fence_sync.cc",
1765 "android/scoped_hardware_buffer_fence_sync.h",
1766 "android/scoped_hardware_buffer_handle.cc",
1767 "android/scoped_hardware_buffer_handle.h",
1768 "android/scoped_java_ref.cc",
1769 "android/scoped_java_ref.h",
1770 "android/statistics_recorder_android.cc",
1771 "android/sys_utils.cc",
1772 "android/sys_utils.h",
1773 "android/task_scheduler/post_task_android.cc",
1774 "android/task_scheduler/post_task_android.h",
1775 "android/task_scheduler/task_runner_android.cc",
1776 "android/task_scheduler/task_runner_android.h",
1777 "android/thread_instruction_count.cc",
1778 "android/thread_instruction_count.h",
1779 "android/timezone_utils.cc",
1780 "android/timezone_utils.h",
1781 "android/trace_event_binding.cc",
1782 "android/trace_event_binding.h",
1783 "android/unguessable_token_android.cc",
1784 "android/unguessable_token_android.h",
1785 "memory/platform_shared_memory_mapper_android.cc",
1786 "memory/platform_shared_memory_region_android.cc",
1787 "system/sys_info_android.cc",
1789 # Android uses some Linux sources.
1790 "debug/elf_reader.cc",
1791 "debug/elf_reader.h",
1792 "debug/proc_maps_linux.cc",
1793 "debug/proc_maps_linux.h",
1794 "power_monitor/power_monitor_device_source_android.cc",
1795 "process/internal_linux.cc",
1796 "process/internal_linux.h",
1797 "process/memory_linux.cc",
1798 "process/process_handle_linux.cc",
1799 "process/process_iterator_linux.cc",
1800 "process/process_metrics_linux.cc",
1801 "system/sys_info_linux.cc",
1805 ":base_jni_headers",
1806 "//third_party/android_ndk:cpu_features",
1807 "//third_party/ashmem",
1810 # Needs to be a public config so that dependent targets link against it as
1811 # well when doing a component build.
1812 public_configs = [ ":android_system_libs" ]
1814 if (can_unwind_with_cfi_table) {
1816 "trace_event/cfi_backtrace_android.cc",
1817 "trace_event/cfi_backtrace_android.h",
1820 if (current_cpu == "arm") {
1822 "profiler/chrome_unwind_info_android.cc",
1823 "profiler/chrome_unwind_info_android.h",
1824 "profiler/chrome_unwinder_android.cc",
1825 "profiler/chrome_unwinder_android.h",
1826 "profiler/chrome_unwinder_android_v2.cc",
1827 "profiler/chrome_unwinder_android_v2.h",
1831 if (current_cpu != "arm" && current_cpu != "arm64") {
1832 # The reached code profiler is only supported on Android arm arch.
1833 sources -= [ "android/reached_code_profiler.cc" ]
1834 sources += [ "android/reached_code_profiler_stub.cc" ]
1837 # This is actually a linker script, but it can be added to the link in the
1838 # same way as a library.
1839 libs += [ "android/library_loader/anchor_functions.lds" ]
1845 "logging_chromeos.cc",
1846 "system/sys_info_chromeos.cc",
1849 sources += [ "power_monitor/power_monitor_device_source_chromeos.cc" ]
1851 if (current_cpu == "x64") {
1853 "profiler/frame_pointer_unwinder.cc",
1854 "profiler/frame_pointer_unwinder.h",
1862 "base_paths_fuchsia.cc",
1863 "debug/debugger_fuchsia.cc",
1864 "debug/elf_reader.cc",
1865 "debug/elf_reader.h",
1866 "debug/stack_trace_fuchsia.cc",
1867 "file_descriptor_posix.cc",
1868 "file_descriptor_posix.h",
1869 "files/dir_reader_posix.h",
1870 "files/file_descriptor_watcher_posix.cc",
1871 "files/file_descriptor_watcher_posix.h",
1872 "files/file_enumerator_posix.cc",
1873 "files/file_posix.cc",
1874 "files/file_util_fuchsia.cc",
1875 "files/file_util_posix.cc",
1876 "files/memory_mapped_file_posix.cc",
1877 "fuchsia/default_job.cc",
1878 "fuchsia/default_job.h",
1879 "fuchsia/file_utils.cc",
1880 "fuchsia/file_utils.h",
1881 "fuchsia/filtered_service_directory.cc",
1882 "fuchsia/filtered_service_directory.h",
1883 "fuchsia/fuchsia_logging.cc",
1884 "fuchsia/fuchsia_logging.h",
1885 "fuchsia/intl_profile_watcher.cc",
1886 "fuchsia/intl_profile_watcher.h",
1889 "fuchsia/mem_buffer_util.cc",
1890 "fuchsia/mem_buffer_util.h",
1891 "fuchsia/process_context.cc",
1892 "fuchsia/process_context.h",
1893 "fuchsia/process_lifecycle.cc",
1894 "fuchsia/process_lifecycle.h",
1895 "fuchsia/scheduler.h",
1896 "fuchsia/scoped_fx_logger.cc",
1897 "fuchsia/scoped_fx_logger.h",
1898 "fuchsia/scoped_service_binding.h",
1899 "fuchsia/scoped_service_publisher.h",
1900 "fuchsia/service_provider_impl.cc",
1901 "fuchsia/service_provider_impl.h",
1902 "fuchsia/startup_context.cc",
1903 "fuchsia/startup_context.h",
1904 "fuchsia/system_info.cc",
1905 "fuchsia/system_info.h",
1906 "memory/page_size_posix.cc",
1907 "memory/platform_shared_memory_mapper_fuchsia.cc",
1908 "memory/platform_shared_memory_region_fuchsia.cc",
1909 "message_loop/message_pump_fuchsia.cc",
1910 "message_loop/message_pump_fuchsia.h",
1911 "message_loop/watchable_io_message_pump_posix.cc",
1912 "message_loop/watchable_io_message_pump_posix.h",
1913 "native_library_fuchsia.cc",
1914 "posix/eintr_wrapper.h",
1915 "posix/file_descriptor_shuffle.cc",
1916 "posix/file_descriptor_shuffle.h",
1917 "posix/global_descriptors.cc",
1918 "posix/global_descriptors.h",
1919 "posix/safe_strerror.cc",
1920 "posix/safe_strerror.h",
1921 "process/kill_fuchsia.cc",
1922 "process/launch_fuchsia.cc",
1923 "process/memory_fuchsia.cc",
1924 "process/process_fuchsia.cc",
1925 "process/process_handle_fuchsia.cc",
1926 "process/process_iterator_fuchsia.cc",
1927 "process/process_metrics_fuchsia.cc",
1928 "process/process_metrics_posix.cc",
1929 "profiler/module_cache_posix.cc",
1930 "profiler/stack_sampler_posix.cc",
1931 "rand_util_fuchsia.cc",
1932 "strings/string_util_posix.h",
1933 "strings/sys_string_conversions_posix.cc",
1934 "sync_socket_posix.cc",
1935 "synchronization/condition_variable_posix.cc",
1936 "synchronization/lock_impl_posix.cc",
1937 "synchronization/waitable_event_posix.cc",
1938 "synchronization/waitable_event_watcher_posix.cc",
1939 "system/sys_info_fuchsia.cc",
1940 "threading/platform_thread_fuchsia.cc",
1941 "threading/platform_thread_posix.cc",
1942 "threading/thread_local_storage_posix.cc",
1943 "time/time_conversion_posix.cc",
1944 "time/time_exploded_icu.cc",
1945 "time/time_fuchsia.cc",
1946 "timer/hi_res_timer_manager_posix.cc",
1949 # These only need to be public deps because of includes of their headers
1950 # by public //base headers, which requires they be on the include path.
1951 # TODO(https://crbug.com/841171): Move these back to |deps|.
1953 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.intl",
1954 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io",
1955 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.logger",
1956 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem",
1957 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.process.lifecycle",
1958 "//third_party/fuchsia-sdk/sdk/pkg/async",
1959 "//third_party/fuchsia-sdk/sdk/pkg/fdio",
1960 "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp",
1961 "//third_party/fuchsia-sdk/sdk/pkg/sync",
1962 "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
1963 "//third_party/fuchsia-sdk/sdk/pkg/syslog_structured_backend",
1964 "//third_party/fuchsia-sdk/sdk/pkg/vfs_cpp",
1965 "//third_party/fuchsia-sdk/sdk/pkg/zx",
1969 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.buildinfo",
1970 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hwinfo",
1971 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.media",
1972 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys",
1973 "//third_party/fuchsia-sdk/sdk/pkg/async-default",
1974 "//third_party/fuchsia-sdk/sdk/pkg/async-loop-cpp",
1975 "//third_party/fuchsia-sdk/sdk/pkg/async-loop-default",
1976 "//third_party/fuchsia-sdk/sdk/pkg/fidl",
1977 "//third_party/fuchsia-sdk/sdk/pkg/sys_inspect_cpp",
1978 "//third_party/icu",
1981 # Needed for users of spinning_mutex.h, which for performance reasons,
1982 # contains inlined calls to `libsync` inside the header file.
1983 # It appends an entry to the "libs" section of the dependent target.
1984 public_configs = [ ":fuchsia_sync_lib" ]
1987 # Several helpers in //base are backed by BoringSSL; however, NaCl builds
1988 # cannot easily depend on BoringSSL due to the nacl_io library, so NaCl builds
1989 # still retain a dedicated local implementation of the functionality.
1991 # TODO(crbug.com/702997) Use only boringssl when NaCl is removed.
1994 "hash/md5_constexpr.h",
1995 "hash/md5_constexpr_internal.h",
2002 "hash/sha1_nacl.cc",
2007 "hash/md5_boringssl.cc",
2008 "hash/md5_boringssl.h",
2009 "hash/sha1_boringssl.cc",
2010 "hash/sha1_boringssl.h",
2012 public_deps += [ "//third_party/boringssl" ]
2017 # Explicitly include the linux file.
2019 "debug/stack_trace_nacl.cc",
2020 "files/file_path_watcher_stub.cc",
2021 "memory/page_size_nacl.cc",
2022 "process/process_stubs.cc",
2023 "profiler/stack_sampler_posix.cc",
2024 "sync_socket_nacl.cc",
2025 "system/sys_info_nacl.cc",
2026 "threading/platform_thread_linux.cc",
2031 "debug/crash_logging.cc",
2032 "debug/crash_logging.h",
2033 "debug/stack_trace.cc",
2034 "debug/stack_trace_posix.cc",
2035 "files/file_descriptor_watcher_posix.cc",
2036 "files/file_descriptor_watcher_posix.h",
2037 "files/file_enumerator.cc",
2038 "files/file_enumerator_posix.cc",
2039 "files/file_proxy.cc",
2040 "files/file_util.cc",
2041 "files/file_util.h",
2042 "files/file_util_posix.cc",
2043 "files/important_file_writer.cc",
2044 "files/important_file_writer.h",
2045 "files/important_file_writer_cleaner.cc",
2046 "files/important_file_writer_cleaner.h",
2047 "files/scoped_temp_dir.cc",
2048 "json/json_file_value_serializer.cc",
2049 "json/json_file_value_serializer.h",
2050 "memory/discardable_memory.cc",
2051 "memory/discardable_memory.h",
2052 "memory/discardable_memory_allocator.cc",
2053 "memory/discardable_memory_allocator.h",
2054 "memory/discardable_shared_memory.cc",
2055 "memory/discardable_shared_memory.h",
2056 "memory/madv_free_discardable_memory_allocator_posix.cc",
2057 "memory/madv_free_discardable_memory_allocator_posix.h",
2058 "memory/madv_free_discardable_memory_posix.cc",
2059 "memory/madv_free_discardable_memory_posix.h",
2060 "memory/page_size_posix.cc",
2061 "native_library.cc",
2062 "native_library_posix.cc",
2064 "posix/unix_domain_socket.cc",
2067 "process/kill_posix.cc",
2068 "process/launch.cc",
2070 "process/launch_posix.cc",
2071 "process/memory.cc",
2073 "process/process_iterator.cc",
2074 "process/process_iterator.h",
2075 "process/process_metrics.cc",
2076 "process/process_metrics_posix.cc",
2077 "process/process_posix.cc",
2078 "profiler/module_cache_posix.cc",
2079 "rand_util_posix.cc",
2080 "scoped_native_library.cc",
2081 "sync_socket_posix.cc",
2082 "system/sys_info.cc",
2083 "system/sys_info_posix.cc",
2084 "task/thread_pool/initialization_util.cc",
2085 "task/thread_pool/initialization_util.h",
2088 # Remove NaCl stuff.
2090 "os_compat_nacl.cc",
2092 "rand_util_nacl.cc",
2095 if (use_partition_alloc) {
2096 # Add stuff that doesn't work in NaCl.
2098 # PartitionAlloc uses SpinLock, which doesn't work in NaCl (see below).
2099 "allocator/partition_alloc_features.cc",
2100 "allocator/partition_alloc_features.h",
2101 "allocator/partition_alloc_support.cc",
2102 "allocator/partition_alloc_support.h",
2106 # Need this to pass gn check, because gn check doesn't see
2107 # BUILDFLAG(USE_PARTITION_ALLOC). A linker will remove all
2108 # partition_alloc code if use_partition_alloc = false because no code uses
2110 public_deps += [ "allocator/partition_allocator:partition_alloc" ]
2116 "files/file_enumerator_win.cc",
2117 "memory/platform_shared_memory_mapper_win.cc",
2118 "memory/platform_shared_memory_region_win.cc",
2119 "profiler/win32_stack_frame_unwinder.cc",
2120 "profiler/win32_stack_frame_unwinder.h",
2122 "system/sys_info_win.cc",
2127 "file_descriptor_store.cc",
2128 "file_descriptor_store.h",
2131 deps += [ "//base/win:base_win_buildflags" ]
2133 data_deps += [ "//build/win:runtime_libs" ]
2135 if (com_init_check_hook_disabled) {
2136 defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
2148 all_dependent_configs += [
2149 ":base_win_linker_flags",
2150 "//tools/win/DebugVisualizers:chrome",
2153 # chrome.natvis listed as an input here instead of in
2154 # //tools/win/DebugVisualizers:chrome to prevent unnecessary size increase
2155 # in generated build files.
2156 "//tools/win/DebugVisualizers/chrome.natvis",
2162 sources -= [ "process/launch_posix.cc" ]
2164 "files/file_path_watcher_fsevents.cc",
2165 "files/file_path_watcher_fsevents.h",
2166 "files/file_path_watcher_kqueue.cc",
2167 "files/file_path_watcher_kqueue.h",
2168 "mac/scoped_typeref.h",
2169 "memory/platform_shared_memory_mapper_mac.cc",
2170 "memory/platform_shared_memory_region_mac.cc",
2171 "message_loop/message_pump_kqueue.cc",
2172 "message_loop/message_pump_kqueue.h",
2173 "system/sys_info_mac.mm",
2174 "time/time_conversion_posix.cc",
2175 "time/time_exploded_posix.cc",
2185 "ApplicationServices.framework",
2187 "CoreFoundation.framework",
2189 "OpenDirectory.framework",
2190 "Security.framework",
2197 "native_library_posix.cc",
2198 "profiler/module_cache_posix.cc",
2199 "strings/sys_string_conversions_posix.cc",
2200 "synchronization/waitable_event_posix.cc",
2201 "synchronization/waitable_event_watcher_posix.cc",
2202 "threading/platform_thread_internal_posix.cc",
2207 if (is_linux || is_tizen || is_chromeos) {
2208 # TODO(brettw) this will need to be parameterized at some point.
2211 linux_configs += [ "//build/config/linux:glib" ]
2214 configs += linux_configs
2215 all_dependent_configs += linux_configs
2218 "nix/mime_util_xdg.cc",
2219 "nix/mime_util_xdg.h",
2222 "system/sys_info_linux.cc",
2225 defines += [ "USE_SYMBOLIZE" ]
2227 # These dependencies are not required on Android, and in the case
2228 # of xdg_mime must be excluded due to licensing restrictions.
2230 "//base/third_party/symbolize",
2231 "//base/third_party/xdg_mime",
2232 "//base/third_party/xdg_user_dirs",
2246 "files/file_path_watcher.cc",
2247 "files/file_path_watcher.h",
2248 "memory/discardable_shared_memory.cc",
2249 "memory/discardable_shared_memory.h",
2252 "process/kill_posix.cc",
2253 "process/launch.cc",
2255 "process/launch_posix.cc",
2256 "process/memory.cc",
2258 "process/process_iterator.cc",
2259 "process/process_iterator.h",
2260 "process/process_metrics_posix.cc",
2261 "process/process_posix.cc",
2263 "sync_socket_posix.cc",
2264 "synchronization/waitable_event_watcher.h",
2268 "base_paths_mac.mm",
2269 "file_version_info_mac.h",
2270 "file_version_info_mac.mm",
2271 "files/file_util_mac.mm",
2272 "mac/backup_util.h",
2273 "mac/backup_util.mm",
2275 "mac/bundle_locations.h",
2276 "mac/bundle_locations.mm",
2277 "mac/call_with_eh_frame.cc",
2278 "mac/call_with_eh_frame.h",
2279 "mac/call_with_eh_frame_asm.S",
2280 "mac/foundation_util.h",
2281 "mac/foundation_util.mm",
2282 "mac/mac_logging.h",
2283 "mac/mac_logging.mm",
2284 "mac/mach_logging.cc",
2285 "mac/mach_logging.h",
2286 "mac/scoped_block.h",
2287 "mac/scoped_mach_port.cc",
2288 "mac/scoped_mach_port.h",
2289 "mac/scoped_mach_vm.cc",
2290 "mac/scoped_mach_vm.h",
2291 "mac/scoped_nsautorelease_pool.h",
2292 "mac/scoped_nsautorelease_pool.mm",
2293 "mac/scoped_nsobject.h",
2294 "mac/scoped_objc_class_swizzler.h",
2295 "mac/scoped_objc_class_swizzler.mm",
2296 "mac/scoped_typeref.h",
2297 "memory/platform_shared_memory_mapper_mac.cc",
2298 "memory/platform_shared_memory_region_mac.cc",
2299 "message_loop/message_pump_mac.h",
2300 "message_loop/message_pump_mac.mm",
2301 "power_monitor/power_monitor_device_source_ios.mm",
2302 "process/memory_stubs.cc",
2303 "process/process_stubs.cc",
2304 "strings/sys_string_conversions_mac.mm",
2305 "synchronization/waitable_event_mac.cc",
2306 "system/sys_info_ios.mm",
2307 "task/thread_pool/thread_group_native_mac.h",
2308 "task/thread_pool/thread_group_native_mac.mm",
2309 "threading/platform_thread_mac.mm",
2310 "time/time_conversion_posix.cc",
2314 if (use_allocator_shim) {
2316 "allocator/partition_allocator/shim/allocator_interception_mac.h",
2317 "allocator/partition_allocator/shim/allocator_interception_mac.mm",
2318 "allocator/partition_allocator/shim/malloc_zone_functions_mac.cc",
2319 "allocator/partition_allocator/shim/malloc_zone_functions_mac.h",
2323 "sampling_heap_profiler/poisson_allocation_sampler.cc",
2324 "sampling_heap_profiler/poisson_allocation_sampler.h",
2325 "sampling_heap_profiler/sampling_heap_profiler.cc",
2326 "sampling_heap_profiler/sampling_heap_profiler.h",
2330 if (current_cpu == "x64" || current_cpu == "arm64") {
2331 sources += [ "time/time_exploded_posix.cc" ]
2333 sources += [ "time/time_exploded_ios.cc" ]
2336 frameworks += [ "UIKit.framework" ]
2340 deps += [ "//third_party/libevent" ]
2345 "message_loop/message_pump_libevent.cc",
2346 "message_loop/message_pump_libevent.h",
2350 if (enable_message_pump_epoll) {
2352 "message_loop/message_pump_epoll.cc",
2353 "message_loop/message_pump_epoll.h",
2357 # Android and MacOS have their own custom shared memory handle
2358 # implementations. e.g. due to supporting both POSIX and native handles.
2359 if (is_posix && !is_android && !is_apple) {
2361 "memory/platform_shared_memory_mapper_posix.cc",
2362 "memory/platform_shared_memory_region_posix.cc",
2366 if (is_posix && !is_apple) {
2368 "time/time_conversion_posix.cc",
2369 "time/time_exploded_posix.cc",
2370 "time/time_now_posix.cc",
2373 # TODO(b/167763382) Find an alternate solution for Chromecast devices, since
2374 # adding the icui18n and icuuc deps significantly increases the binary size.
2375 if (!is_castos && !is_cast_android) {
2376 sources += [ "time/time_exploded_icu.cc" ]
2378 # The ICU dependency is only needed on systems with a 32-bit time_t.
2379 # However, that cannot be determined from build variables, like
2380 # |current_cpu|, since some 32-bit systems have a 64-bit time_t (and vice
2381 # versa). Thus, the dependency is taken here for all POSIX platforms and
2382 # the compiler+linker should be able to easily detect when the ICU
2383 # routines will not be called and delete them in the final linking.
2385 "//third_party/icu:icui18n",
2386 "//third_party/icu:icuuc",
2391 if (is_posix && !is_apple && !is_nacl) {
2393 "posix/can_lower_nice_to.cc",
2394 "posix/can_lower_nice_to.h",
2398 if ((is_posix && !is_apple && !is_android && !is_chromeos) || is_fuchsia) {
2399 sources += [ "power_monitor/power_monitor_device_source_stub.cc" ]
2402 # On ARC++-enabled ChromeOS system, we need TimeTicks::FromUptimeMillis to
2403 # interpret time values sent from Android container.
2404 if (is_android || is_chromeos_ash) {
2405 sources += [ "time/time_android.cc" ]
2410 "message_loop/message_pump_glib.cc",
2411 "message_loop/message_pump_glib.h",
2415 if (enable_base_tracing) {
2417 "trace_event/auto_open_close_event.h",
2418 "trace_event/builtin_categories.cc",
2419 "trace_event/builtin_categories.h",
2420 "trace_event/category_registry.cc",
2421 "trace_event/category_registry.h",
2422 "trace_event/event_name_filter.cc",
2423 "trace_event/event_name_filter.h",
2424 "trace_event/heap_profiler.h",
2425 "trace_event/interned_args_helper.cc",
2426 "trace_event/interned_args_helper.h",
2427 "trace_event/log_message.cc",
2428 "trace_event/log_message.h",
2429 "trace_event/malloc_dump_provider.cc",
2430 "trace_event/malloc_dump_provider.h",
2431 "trace_event/memory_allocator_dump.cc",
2432 "trace_event/memory_allocator_dump.h",
2433 "trace_event/memory_dump_manager.cc",
2434 "trace_event/memory_dump_manager.h",
2435 "trace_event/memory_dump_manager_test_utils.h",
2436 "trace_event/memory_dump_provider.h",
2437 "trace_event/memory_dump_provider_info.cc",
2438 "trace_event/memory_dump_provider_info.h",
2439 "trace_event/memory_dump_request_args.cc",
2440 "trace_event/memory_dump_request_args.h",
2441 "trace_event/memory_dump_scheduler.cc",
2442 "trace_event/memory_dump_scheduler.h",
2443 "trace_event/memory_infra_background_allowlist.cc",
2444 "trace_event/memory_infra_background_allowlist.h",
2445 "trace_event/memory_pressure_level_proto.cc",
2446 "trace_event/memory_pressure_level_proto.h",
2447 "trace_event/memory_usage_estimator.cc",
2448 "trace_event/memory_usage_estimator.h",
2449 "trace_event/optional_trace_event.h",
2450 "trace_event/process_memory_dump.cc",
2451 "trace_event/process_memory_dump.h",
2452 "trace_event/task_execution_macros.h",
2453 "trace_event/trace_arguments.cc",
2454 "trace_event/trace_arguments.h",
2455 "trace_event/trace_buffer.cc",
2456 "trace_event/trace_buffer.h",
2457 "trace_event/trace_category.h",
2458 "trace_event/trace_config.cc",
2459 "trace_event/trace_config.h",
2460 "trace_event/trace_config_category_filter.cc",
2461 "trace_event/trace_config_category_filter.h",
2462 "trace_event/trace_conversion_helper.h",
2463 "trace_event/trace_event.h",
2464 "trace_event/trace_event_filter.cc",
2465 "trace_event/trace_event_filter.h",
2466 "trace_event/trace_event_impl.cc",
2467 "trace_event/trace_event_impl.h",
2468 "trace_event/trace_event_memory_overhead.cc",
2469 "trace_event/trace_event_memory_overhead.h",
2470 "trace_event/trace_log.cc",
2471 "trace_event/trace_log.h",
2472 "trace_event/trace_log_constants.cc",
2473 "trace_event/traced_value.cc",
2474 "trace_event/traced_value.h",
2475 "trace_event/traced_value_support.h",
2476 "trace_event/tracing_agent.cc",
2477 "trace_event/tracing_agent.h",
2478 "trace_event/typed_macros.h",
2479 "trace_event/typed_macros_embedder_support.h",
2480 "trace_event/typed_macros_internal.cc",
2481 "trace_event/typed_macros_internal.h",
2482 "tracing/perfetto_platform.cc",
2483 "tracing/perfetto_platform.h",
2484 "tracing/perfetto_task_runner.cc",
2485 "tracing/perfetto_task_runner.h",
2486 "tracing/trace_time.cc",
2487 "tracing/trace_time.h",
2488 "tracing/tracing_tls.cc",
2489 "tracing/tracing_tls.h",
2493 "//base/tracing/protos:chrome_track_event_zero",
2494 "//third_party/perfetto:libperfetto",
2498 "//base/tracing/protos:chrome_track_event",
2499 "//third_party/perfetto/include/perfetto/protozero",
2502 all_dependent_configs += [
2504 "//third_party/perfetto/gn:public_config",
2509 "trace_event/trace_event_etw_export_win.cc",
2510 "trace_event/trace_event_etw_export_win.h",
2511 "trace_event/trace_logging_minimal_win.cc",
2512 "trace_event/trace_logging_minimal_win.h",
2518 "trace_event/application_state_proto_android.cc",
2519 "trace_event/application_state_proto_android.h",
2520 "trace_event/cpufreq_monitor_android.cc",
2521 "trace_event/cpufreq_monitor_android.h",
2522 "trace_event/java_heap_dump_provider_android.cc",
2523 "trace_event/java_heap_dump_provider_android.h",
2524 "trace_event/trace_event_android.cc",
2528 if (use_allocator == "partition") {
2530 "trace_event/address_space_dump_provider.cc",
2531 "trace_event/address_space_dump_provider.h",
2536 "trace_event/trace_event_stub.cc",
2537 "trace_event/trace_event_stub.h",
2541 if (using_sanitizer && !is_fuchsia) {
2542 data += [ "//tools/valgrind/asan/" ]
2544 [ "//build/config/clang:llvm-symbolizer_data($host_toolchain)" ]
2548 configs -= [ "//build/config/compiler:default_optimization" ]
2549 configs += [ "//build/config/compiler:optimize_max" ]
2553 # Build flags for Control Flow Integrity
2554 # https://www.chromium.org/developers/testing/control-flow-integrity
2555 buildflag_header("cfi_buildflags") {
2556 header = "cfi_buildflags.h"
2559 # TODO(pcc): remove CFI_CAST_CHECK, see https://crbug.com/626794.
2560 "CFI_CAST_CHECK=$is_cfi && $use_cfi_cast",
2561 "CFI_ICALL_CHECK=$is_cfi && $use_cfi_icall",
2562 "CFI_ENFORCEMENT_TRAP=$is_cfi && !$use_cfi_diag",
2563 "CFI_ENFORCEMENT_DIAGNOSTIC=$is_cfi && $use_cfi_diag && !$use_cfi_recover",
2567 buildflag_header("debugging_buildflags") {
2568 header = "debugging_buildflags.h"
2569 header_dir = "base/debug"
2570 enable_gdbinit_warning =
2571 is_debug && (strip_absolute_paths_from_debug_symbols || use_custom_libcxx)
2572 enable_lldbinit_warning =
2573 is_debug && strip_absolute_paths_from_debug_symbols && is_mac
2576 "DCHECK_IS_CONFIGURABLE=$dcheck_is_configurable",
2577 "ENABLE_LOCATION_SOURCE=$enable_location_source",
2578 "FROM_HERE_USES_LOCATION_BUILTINS=$from_here_uses_location_builtins",
2579 "ENABLE_PROFILING=$enable_profiling",
2580 "CAN_UNWIND_WITH_FRAME_POINTERS=$can_unwind_with_frame_pointers",
2581 "UNSAFE_DEVELOPER_BUILD=$is_unsafe_developer_build",
2582 "CAN_UNWIND_WITH_CFI_TABLE=$can_unwind_with_cfi_table",
2583 "EXCLUDE_UNWIND_TABLES=$exclude_unwind_tables",
2584 "ENABLE_GDBINIT_WARNING=$enable_gdbinit_warning",
2585 "ENABLE_LLDBINIT_WARNING=$enable_lldbinit_warning",
2586 "EXPENSIVE_DCHECKS_ARE_ON=$enable_expensive_dchecks",
2587 "ENABLE_STACK_TRACE_LINE_NUMBERS=$enable_stack_trace_line_numbers",
2591 buildflag_header("feature_list_buildflags") {
2592 header = "feature_list_buildflags.h"
2594 if (is_chromeos_ash) {
2596 "ENABLE_BANNED_BASE_FEATURE_PREFIX=true",
2597 "BANNED_BASE_FEATURE_PREFIX=\"CrOSLateBoot\"",
2600 flags = [ "ENABLE_BANNED_BASE_FEATURE_PREFIX=false" ]
2604 buildflag_header("logging_buildflags") {
2605 header = "logging_buildflags.h"
2608 "ENABLE_LOG_ERROR_NOT_REACHED=$enable_log_error_not_reached",
2609 "USE_RUNTIME_VLOG=$use_runtime_vlog",
2613 buildflag_header("orderfile_buildflags") {
2614 header = "orderfile_buildflags.h"
2615 header_dir = "base/android/orderfile"
2616 using_order_profiling = is_android && use_order_profiling
2617 using_devtools_dumping =
2618 is_android && devtools_instrumentation_dumping && enable_base_tracing
2621 "DEVTOOLS_INSTRUMENTATION_DUMPING=$using_devtools_dumping",
2622 "ORDERFILE_INSTRUMENTATION=$using_order_profiling",
2626 buildflag_header("synchronization_buildflags") {
2627 header = "synchronization_buildflags.h"
2628 header_dir = "base/synchronization"
2631 [ "ENABLE_MUTEX_PRIORITY_INHERITANCE=$enable_mutex_priority_inheritance" ]
2634 buildflag_header("anchor_functions_buildflags") {
2635 header = "anchor_functions_buildflags.h"
2636 header_dir = "base/android/library_loader"
2637 _supports_code_ordering =
2638 is_android && (current_cpu == "arm" || current_cpu == "arm64" ||
2639 current_cpu == "x86" || current_cpu == "x64")
2643 "SUPPORTS_CODE_ORDERING=$_supports_code_ordering",
2647 buildflag_header("clang_profiling_buildflags") {
2648 header = "clang_profiling_buildflags.h"
2652 "CLANG_PROFILING=$use_clang_profiling",
2653 "CLANG_PROFILING_INSIDE_SANDBOX=$use_clang_profiling_inside_sandbox",
2654 "USE_CLANG_COVERAGE=$use_clang_coverage",
2658 buildflag_header("sanitizer_buildflags") {
2659 header = "sanitizer_buildflags.h"
2663 "IS_HWASAN=$is_hwasan",
2664 "USING_SANITIZER=$using_sanitizer",
2668 buildflag_header("tracing_buildflags") {
2669 header = "tracing_buildflags.h"
2672 "ENABLE_BASE_TRACING=$enable_base_tracing",
2673 "USE_PERFETTO_CLIENT_LIBRARY=$use_perfetto_client_library",
2674 "OPTIONAL_TRACE_EVENTS_ENABLED=$optional_trace_events_enabled",
2678 buildflag_header("profiler_buildflags") {
2679 header = "profiler_buildflags.h"
2680 header_dir = "base/profiler"
2683 "ENABLE_ARM_CFI_TABLE=$enable_arm_cfi_table",
2684 "IOS_STACK_PROFILER_ENABLED=$ios_stack_profiler_enabled",
2685 "USE_ANDROID_UNWINDER_V2=$use_android_unwinder_v2",
2689 buildflag_header("power_monitor_buildflags") {
2690 header = "power_monitor_buildflags.h"
2691 header_dir = "base/power_monitor"
2692 _has_battery_provider_impl = is_win || is_mac
2694 flags = [ "HAS_BATTERY_LEVEL_PROVIDER_IMPL=$_has_battery_provider_impl" ]
2697 # This is the subset of files from base that should not be used with a dynamic
2698 # library. Note that this library cannot depend on base because base depends on
2700 static_library("base_static") {
2705 "immediate_crash.h",
2708 deps = [ "//build:chromeos_buildflags" ]
2712 "win/static_constants.cc",
2713 "win/static_constants.h",
2716 public_deps = [ "//base/win:pe_image" ]
2718 # Disable sanitizer coverage in win/pe_image.cc. It is called by the sandbox
2719 # before sanitizer coverage can initialize. http://crbug.com/484711
2720 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
2722 [ "//build/config/sanitizers:default_sanitizer_flags_but_coverage" ]
2726 configs -= [ "//build/config/compiler:default_optimization" ]
2727 configs += [ "//build/config/compiler:optimize_max" ]
2731 if (use_custom_libcxx && !is_debug) {
2732 # nodebug_assertion.cc has to be in its own source_set instead of being
2733 # included as a source in //base as otherwise its symbols won't be linked in
2734 # if they end up in an archive.
2735 source_set("nodebug_assertion") {
2736 defines = [ "BASE_IMPLEMENTATION" ]
2737 sources = [ "nodebug_assertion.cc" ]
2738 deps = [ ":base_static" ]
2743 output_name = "base_i18n"
2745 "i18n/base_i18n_export.h",
2746 "i18n/base_i18n_switches.cc",
2747 "i18n/base_i18n_switches.h",
2748 "i18n/break_iterator.cc",
2749 "i18n/break_iterator.h",
2750 "i18n/case_conversion.cc",
2751 "i18n/case_conversion.h",
2752 "i18n/char_iterator.cc",
2753 "i18n/char_iterator.h",
2754 "i18n/character_encoding.cc",
2755 "i18n/character_encoding.h",
2756 "i18n/encoding_detection.cc",
2757 "i18n/encoding_detection.h",
2758 "i18n/file_util_icu.cc",
2759 "i18n/file_util_icu.h",
2760 "i18n/i18n_constants.cc",
2761 "i18n/i18n_constants.h",
2762 "i18n/icu_string_conversions.cc",
2763 "i18n/icu_string_conversions.h",
2766 "i18n/message_formatter.cc",
2767 "i18n/message_formatter.h",
2768 "i18n/number_formatting.cc",
2769 "i18n/number_formatting.h",
2772 "i18n/streaming_utf8_validator.cc",
2773 "i18n/streaming_utf8_validator.h",
2774 "i18n/string_compare.cc",
2775 "i18n/string_compare.h",
2776 "i18n/string_search.cc",
2777 "i18n/string_search.h",
2778 "i18n/time_formatting.cc",
2779 "i18n/time_formatting.h",
2782 "i18n/unicodestring.h",
2783 "i18n/utf8_validator_tables.cc",
2784 "i18n/utf8_validator_tables.h",
2786 defines = [ "BASE_I18N_IMPLEMENTATION" ]
2787 configs += [ "//build/config/compiler:wexit_time_destructors" ]
2789 "//third_party/ced",
2790 "//third_party/icu",
2794 "//base/third_party/dynamic_annotations",
2795 "//build:chromecast_buildflags",
2796 "//build:chromeos_buildflags",
2800 configs -= [ "//build/config/compiler:default_optimization" ]
2801 configs += [ "//build/config/compiler:optimize_max" ]
2804 if (is_chromeos_lacros) {
2806 "i18n/icu_mergeable_data_file.cc",
2807 "i18n/icu_mergeable_data_file.h",
2812 frameworks = [ "CoreFoundation.framework" ]
2816 test("base_perftests") {
2818 "hash/hash_perftest.cc",
2819 "message_loop/message_pump_perftest.cc",
2820 "observer_list_perftest.cc",
2821 "rand_util_perftest.cc",
2822 "strings/string_util_perftest.cc",
2823 "substring_set_matcher/substring_set_matcher_perftest.cc",
2824 "task/job_perftest.cc",
2825 "task/sequence_manager/sequence_manager_perftest.cc",
2826 "task/thread_pool/thread_pool_perftest.cc",
2827 "threading/counter_perftest.cc",
2828 "threading/thread_local_storage_perftest.cc",
2830 # "test/run_all_unittests.cc",
2831 "json/json_perftest.cc",
2832 "synchronization/lock_perftest.cc",
2833 "synchronization/waitable_event_perftest.cc",
2834 "threading/thread_perftest.cc",
2839 "//base/test:test_support",
2840 "//base/test:test_support_perf",
2845 if (use_partition_alloc) {
2847 "allocator/partition_allocator/partition_alloc_perftest.cc",
2848 "allocator/partition_allocator/partition_lock_perftest.cc",
2850 deps += [ ":partition_alloc_test_support" ]
2854 # Needed for isolate script to execute.
2855 "//testing:run_perf_test",
2859 deps += [ "//testing/android/native_test:native_test_native_code" ]
2863 if (!is_official_build) {
2864 # The extra data tables required by stack traces are turned off for official
2865 # build, only do stack trace perftest for unofficial build
2866 sources += [ "debug/stack_trace_perftest.cc" ]
2870 test("base_i18n_perftests") {
2871 sources = [ "i18n/streaming_utf8_validator_perftest.cc" ]
2875 "//base/test:test_support",
2876 "//base/test:test_support_perf",
2882 executable("build_utf8_validator_tables") {
2883 sources = [ "i18n/build_utf8_validator_tables.cc" ]
2886 "//build/win:default_exe_manifest",
2887 "//third_party/icu:icuuc",
2891 executable("check_example") {
2892 sources = [ "check_example.cc" ]
2895 "//build/win:default_exe_manifest",
2899 executable("json_perftest_decodebench") {
2900 sources = [ "json/json_perftest_decodebench.cc" ]
2906 # Target to manually rebuild pe_image_test.dll which is checked into
2907 # base/test/data/pe_image.
2908 shared_library("pe_image_test") {
2909 sources = [ "win/pe_image_test.cc" ]
2911 "/DELAYLOAD:cfgmgr32.dll",
2912 "/DELAYLOAD:shell32.dll",
2913 "/SUBSYSTEM:WINDOWS",
2921 loadable_module("scoped_handle_test_dll") {
2922 sources = [ "win/scoped_handle_test_dll.cc" ]
2925 "//base/win:base_win_buildflags",
2930 if ((is_win && (current_cpu == "x64" || current_cpu == "arm64")) || is_mac ||
2931 (is_android && (current_cpu == "arm" || current_cpu == "arm64")) ||
2932 (is_chromeos && current_cpu == "x64")) {
2933 # Must be a loadable module so that it can be loaded/unloaded at runtime
2935 loadable_module("base_profiler_test_support_library") {
2937 sources = [ "profiler/test_support_library.cc" ]
2942 source_set("native_unwinder_android") {
2943 # This target is intended to be used only within the stack_unwinder dynamic
2944 # feature module, to avoid binary size increase in Chrome due to the
2945 # libunwindstack dependency. The additional :* visibility is needed to allow
2946 # use by base test targets.
2949 "//chrome/android/modules/stack_unwinder/internal:*",
2952 "profiler/libunwindstack_unwinder_android.cc",
2953 "profiler/libunwindstack_unwinder_android.h",
2954 "profiler/native_unwinder_android.cc",
2955 "profiler/native_unwinder_android.h",
2960 "//third_party/libunwindstack",
2965 source_set("base_stack_sampling_profiler_test_util") {
2968 "profiler/stack_sampling_profiler_test_util.cc",
2969 "profiler/stack_sampling_profiler_test_util.h",
2973 "//base/test:test_support",
2978 "profiler/stack_sampling_profiler_java_test_util.cc",
2979 "profiler/stack_sampling_profiler_java_test_util.h",
2982 ":base_profiler_test_support_jni_headers",
2983 ":native_unwinder_android",
2989 bundle_data("base_unittests_bundle_data") {
2992 "//tools/metrics/histograms/enums.xml",
2993 "test/data/file_util/binary_file.bin",
2994 "test/data/file_util/binary_file_diff.bin",
2995 "test/data/file_util/binary_file_same.bin",
2996 "test/data/file_util/blank_line.txt",
2997 "test/data/file_util/blank_line_crlf.txt",
2998 "test/data/file_util/crlf.txt",
2999 "test/data/file_util/different.txt",
3000 "test/data/file_util/different_first.txt",
3001 "test/data/file_util/different_last.txt",
3002 "test/data/file_util/empty1.txt",
3003 "test/data/file_util/empty2.txt",
3004 "test/data/file_util/first1.txt",
3005 "test/data/file_util/first2.txt",
3006 "test/data/file_util/original.txt",
3007 "test/data/file_util/same.txt",
3008 "test/data/file_util/same_length.txt",
3009 "test/data/file_util/shortened.txt",
3010 "test/data/json/bom_feff.json",
3011 "test/data/pe_image_reader/signed.exe",
3012 "test/data/serializer_nested_test.json",
3013 "test/data/serializer_test.json",
3014 "test/data/serializer_test_nowhitespace.json",
3016 outputs = [ "{{bundle_resources_dir}}/" +
3017 "{{source_root_relative_dir}}/{{source_file_part}}" ]
3022 source_set("base_unittests_arc") {
3025 "ios/crb_protocol_observers_unittest.mm",
3026 "mac/bind_objc_block_unittest_arc.mm",
3028 configs += [ "//build/config/compiler:enable_arc" ]
3032 "//base/test:test_support",
3038 if (!is_nacl && (is_linux || is_chromeos)) {
3039 # This test must compile with -fstack-protector-all
3040 source_set("stack_canary_linux_unittests") {
3043 sources = [ "stack_canary_linux_unittest.cc" ]
3044 cflags = [ "-fstack-protector-all" ]
3054 fidl_library("testfidl") {
3055 library_name = "base.testfidl"
3057 sources = [ "fuchsia/test.test-fidl" ]
3060 source_set("test_interface_impl") {
3063 "fuchsia/test_interface_impl.cc",
3064 "fuchsia/test_interface_impl.h",
3072 source_set("test_log_listener_safe") {
3075 "fuchsia/test_log_listener_safe.cc",
3076 "fuchsia/test_log_listener_safe.h",
3080 "//base/test:test_support",
3083 public_deps = [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.logger" ]
3087 source_set("base_unittests_tasktraits") {
3090 "task/test_task_traits_extension.cc",
3091 "task/test_task_traits_extension.h",
3096 source_set("arm_bti_testfunctions") {
3101 if (target_cpu == "arm64" && (is_linux || is_android)) {
3103 "allocator/partition_allocator/arm_bti_test_functions.S",
3104 "allocator/partition_allocator/arm_bti_test_functions.h",
3109 test("base_unittests") {
3111 "allocator/dispatcher/dispatcher_unittest.cc",
3112 "allocator/dispatcher/initializer_unittest.cc",
3113 "allocator/dispatcher/internal/dispatcher_internal_unittest.cc",
3114 "allocator/dispatcher/testing/dispatcher_test.cc",
3115 "allocator/dispatcher/testing/dispatcher_test.h",
3116 "allocator/dispatcher/testing/observer_mock.h",
3117 "allocator/dispatcher/testing/tools.h",
3118 "at_exit_unittest.cc",
3119 "atomicops_unittest.cc",
3120 "auto_reset_unittest.cc",
3121 "barrier_callback_unittest.cc",
3122 "barrier_closure_unittest.cc",
3123 "base64_unittest.cc",
3124 "base64url_unittest.cc",
3125 "big_endian_unittest.cc",
3126 "bit_cast_unittest.cc",
3128 "build_time_unittest.cc",
3129 "callback_list_unittest.cc",
3130 "cancelable_callback_unittest.cc",
3131 "check_is_test_unittest.cc",
3132 "check_unittest.cc",
3133 "command_line_unittest.cc",
3134 "component_export_unittest.cc",
3135 "containers/adapters_unittest.cc",
3136 "containers/buffer_iterator_unittest.cc",
3137 "containers/checked_iterators_unittest.cc",
3138 "containers/checked_range_unittest.cc",
3139 "containers/circular_deque_unittest.cc",
3140 "containers/contains_unittest.cc",
3141 "containers/contiguous_iterator_unittest.cc",
3142 "containers/enum_set_unittest.cc",
3143 "containers/erase_unittest.cc",
3144 "containers/extend_unittest.cc",
3145 "containers/fixed_flat_map_unittest.cc",
3146 "containers/fixed_flat_set_unittest.cc",
3147 "containers/flat_map_unittest.cc",
3148 "containers/flat_set_unittest.cc",
3149 "containers/flat_tree_unittest.cc",
3150 "containers/id_map_unittest.cc",
3151 "containers/intrusive_heap_unittest.cc",
3152 "containers/linked_list_unittest.cc",
3153 "containers/lru_cache_unittest.cc",
3154 "containers/small_map_unittest.cc",
3155 "containers/span_unittest.cc",
3156 "containers/stack_container_unittest.cc",
3157 "containers/unique_ptr_adapters_unittest.cc",
3158 "containers/vector_buffer_unittest.cc",
3160 "cxx17_backports_unittest.cc",
3161 "cxx20_is_constant_evaluated_unittest.cc",
3162 "debug/activity_analyzer_unittest.cc",
3163 "debug/activity_tracker_unittest.cc",
3164 "debug/alias_unittest.cc",
3165 "debug/crash_logging_unittest.cc",
3166 "debug/debugger_unittest.cc",
3167 "debug/dump_without_crashing_unittest.cc",
3168 "debug/stack_trace_unittest.cc",
3169 "debug/task_trace_unittest.cc",
3170 "environment_unittest.cc",
3171 "feature_list_unittest.cc",
3172 "files/file_enumerator_unittest.cc",
3173 "files/file_error_or_unittest.cc",
3174 "files/file_path_unittest.cc",
3175 "files/file_path_watcher_unittest.cc",
3176 "files/file_proxy_unittest.cc",
3177 "files/file_unittest.cc",
3178 "files/file_util_unittest.cc",
3179 "files/important_file_writer_cleaner_unittest.cc",
3180 "files/important_file_writer_unittest.cc",
3181 "files/memory_mapped_file_unittest.cc",
3182 "files/safe_base_name_unittest.cc",
3183 "files/scoped_temp_dir_unittest.cc",
3184 "functional/bind_unittest.cc",
3185 "functional/callback_helpers_unittest.cc",
3186 "functional/callback_unittest.cc",
3187 "functional/function_ref_unittest.cc",
3188 "functional/identity_unittest.cc",
3189 "functional/invoke_unittest.cc",
3190 "functional/not_fn_unittest.cc",
3191 "functional/overloaded_unittest.cc",
3192 "gmock_unittest.cc",
3194 "hash/hash_unittest.cc",
3195 "hash/legacy_hash_unittest.cc",
3196 "hash/md5_constexpr_unittest.cc",
3197 "hash/md5_unittest.cc",
3198 "hash/sha1_unittest.cc",
3199 "i18n/break_iterator_unittest.cc",
3200 "i18n/case_conversion_unittest.cc",
3201 "i18n/char_iterator_unittest.cc",
3202 "i18n/character_encoding_unittest.cc",
3203 "i18n/file_util_icu_unittest.cc",
3204 "i18n/icu_string_conversions_unittest.cc",
3205 "i18n/icu_util_unittest.cc",
3206 "i18n/message_formatter_unittest.cc",
3207 "i18n/number_formatting_unittest.cc",
3208 "i18n/rtl_unittest.cc",
3209 "i18n/streaming_utf8_validator_unittest.cc",
3210 "i18n/string_search_unittest.cc",
3211 "i18n/time_formatting_unittest.cc",
3212 "i18n/timezone_unittest.cc",
3213 "i18n/transliterator_unittest.cc",
3214 "immediate_crash_unittest.cc",
3215 "json/json_parser_unittest.cc",
3216 "json/json_reader_unittest.cc",
3217 "json/json_value_converter_unittest.cc",
3218 "json/json_value_serializer_unittest.cc",
3219 "json/json_writer_unittest.cc",
3220 "json/string_escape_unittest.cc",
3221 "json/values_util_unittest.cc",
3222 "lazy_instance_unittest.cc",
3223 "location_unittest.cc",
3224 "logging_unittest.cc",
3225 "memory/aligned_memory_unittest.cc",
3226 "memory/discardable_memory_backing_field_trial_unittest.cc",
3227 "memory/discardable_shared_memory_unittest.cc",
3228 "memory/memory_pressure_listener_unittest.cc",
3229 "memory/platform_shared_memory_region_unittest.cc",
3230 "memory/ptr_util_unittest.cc",
3231 "memory/raw_ptr_unittest.cc",
3232 "memory/raw_ref_unittest.cc",
3233 "memory/ref_counted_memory_unittest.cc",
3234 "memory/ref_counted_unittest.cc",
3235 "memory/safe_ref_unittest.cc",
3236 "memory/shared_memory_hooks_unittest.cc",
3237 "memory/shared_memory_mapping_unittest.cc",
3238 "memory/shared_memory_region_unittest.cc",
3239 "memory/singleton_unittest.cc",
3240 "memory/unsafe_shared_memory_pool_unittest.cc",
3241 "memory/values_equivalent_unittest.cc",
3242 "memory/weak_auto_reset_unittest.cc",
3243 "memory/weak_ptr_unittest.cc",
3244 "message_loop/message_pump_glib_unittest.cc",
3245 "message_loop/message_pump_unittest.cc",
3246 "message_loop/work_id_provider_unittest.cc",
3247 "metrics/bucket_ranges_unittest.cc",
3248 "metrics/crc32_unittest.cc",
3249 "metrics/field_trial_params_unittest.cc",
3250 "metrics/field_trial_unittest.cc",
3251 "metrics/histogram_base_unittest.cc",
3252 "metrics/histogram_delta_serialization_unittest.cc",
3253 "metrics/histogram_functions_unittest.cc",
3254 "metrics/histogram_macros_unittest.cc",
3255 "metrics/histogram_samples_unittest.cc",
3256 "metrics/histogram_snapshot_manager_unittest.cc",
3257 "metrics/histogram_unittest.cc",
3258 "metrics/metrics_hashes_unittest.cc",
3259 "metrics/persistent_histogram_allocator_unittest.cc",
3260 "metrics/persistent_histogram_storage_unittest.cc",
3261 "metrics/persistent_memory_allocator_unittest.cc",
3262 "metrics/persistent_sample_map_unittest.cc",
3263 "metrics/ranges_manager_unittest.cc",
3264 "metrics/sample_map_unittest.cc",
3265 "metrics/sample_vector_unittest.cc",
3266 "metrics/single_sample_metrics_unittest.cc",
3267 "metrics/sparse_histogram_unittest.cc",
3268 "metrics/statistics_recorder_unittest.cc",
3269 "native_library_unittest.cc",
3270 "no_destructor_unittest.cc",
3271 "observer_list_threadsafe_unittest.cc",
3272 "observer_list_unittest.cc",
3273 "one_shot_event_unittest.cc",
3274 "parameter_pack_unittest.cc",
3275 "path_service_unittest.cc",
3276 "pickle_unittest.cc",
3277 "power_monitor/battery_level_provider_unittest.cc",
3278 "power_monitor/battery_state_sampler_unittest.cc",
3279 "power_monitor/moving_average_unittest.cc",
3280 "power_monitor/power_monitor_device_source_unittest.cc",
3281 "power_monitor/power_monitor_unittest.cc",
3282 "power_monitor/timer_sampling_event_source_unittest.cc",
3283 "process/environment_internal_unittest.cc",
3284 "process/memory_unittest.cc",
3285 "process/process_metrics_unittest.cc",
3286 "process/process_unittest.cc",
3287 "process/process_util_unittest.cc",
3288 "profiler/arm_cfi_table_unittest.cc",
3289 "profiler/metadata_recorder_unittest.cc",
3290 "profiler/module_cache_unittest.cc",
3291 "profiler/sample_metadata_unittest.cc",
3292 "profiler/stack_buffer_unittest.cc",
3293 "profiler/stack_copier_suspend_unittest.cc",
3294 "profiler/stack_copier_unittest.cc",
3295 "profiler/stack_sampler_impl_unittest.cc",
3296 "profiler/stack_sampling_profiler_unittest.cc",
3297 "rand_util_unittest.cc",
3298 "ranges/algorithm_unittest.cc",
3299 "ranges/functional_unittest.cc",
3300 "ranges/ranges_unittest.cc",
3301 "run_loop_unittest.cc",
3302 "safe_numerics_unittest.cc",
3303 "sampling_heap_profiler/lock_free_address_hash_set_unittest.cc",
3304 "scoped_add_feature_flags_unittest.cc",
3305 "scoped_clear_last_error_unittest.cc",
3306 "scoped_generic_unittest.cc",
3307 "scoped_multi_source_observation_unittest.cc",
3308 "scoped_native_library_unittest.cc",
3309 "scoped_observation_unittest.cc",
3310 "security_unittest.cc",
3311 "sequence_checker_unittest.cc",
3312 "sequence_token_unittest.cc",
3313 "state_transitions_unittest.cc",
3314 "stl_util_unittest.cc",
3315 "strings/abseil_string_conversions_unittest.cc",
3316 "strings/abseil_string_number_conversions_unittest.cc",
3317 "strings/escape_unittest.cc",
3318 "strings/no_trigraphs_unittest.cc",
3319 "strings/pattern_unittest.cc",
3320 "strings/safe_sprintf_unittest.cc",
3321 "strings/strcat_unittest.cc",
3322 "strings/string_number_conversions_unittest.cc",
3323 "strings/string_piece_unittest.cc",
3324 "strings/string_split_unittest.cc",
3325 "strings/string_tokenizer_unittest.cc",
3326 "strings/string_util_unittest.cc",
3327 "strings/stringize_macros_unittest.cc",
3328 "strings/stringprintf_unittest.cc",
3329 "strings/sys_string_conversions_unittest.cc",
3330 "strings/utf_offset_string_conversions_unittest.cc",
3331 "strings/utf_string_conversions_unittest.cc",
3332 "substring_set_matcher/string_pattern_unittest.cc",
3333 "substring_set_matcher/substring_set_matcher_unittest.cc",
3334 "supports_user_data_unittest.cc",
3335 "sync_socket_unittest.cc",
3336 "synchronization/atomic_flag_unittest.cc",
3337 "synchronization/condition_variable_unittest.cc",
3338 "synchronization/lock_unittest.cc",
3339 "synchronization/waitable_event_unittest.cc",
3340 "synchronization/waitable_event_watcher_unittest.cc",
3341 "sys_byteorder_unittest.cc",
3342 "system/sys_info_unittest.cc",
3343 "system/system_monitor_unittest.cc",
3344 "task/bind_post_task_unittest.cc",
3345 "task/cancelable_task_tracker_unittest.cc",
3346 "task/common/checked_lock_unittest.cc",
3347 "task/common/operations_controller_unittest.cc",
3348 "task/common/task_annotator_unittest.cc",
3349 "task/default_delayed_task_handle_delegate_unittest.cc",
3350 "task/deferred_sequenced_task_runner_unittest.cc",
3351 "task/delayed_task_handle_unittest.cc",
3352 "task/lazy_thread_pool_task_runner_unittest.cc",
3353 "task/post_job_unittest.cc",
3354 "task/scoped_set_task_priority_for_current_thread_unittest.cc",
3355 "task/sequence_manager/atomic_flag_set_unittest.cc",
3356 "task/sequence_manager/hierarchical_timing_wheel_unittest.cc",
3357 "task/sequence_manager/lazily_deallocated_deque_unittest.cc",
3358 "task/sequence_manager/sequence_manager_impl_unittest.cc",
3359 "task/sequence_manager/task_order_unittest.cc",
3360 "task/sequence_manager/task_queue_selector_unittest.cc",
3361 "task/sequence_manager/task_queue_unittest.cc",
3362 "task/sequence_manager/test/mock_time_message_pump_unittest.cc",
3363 "task/sequence_manager/thread_controller_power_monitor_unittest.cc",
3364 "task/sequence_manager/thread_controller_with_message_pump_impl_unittest.cc",
3365 "task/sequence_manager/timing_wheel_unittest.cc",
3366 "task/sequence_manager/wake_up_queue_unittest.cc",
3367 "task/sequence_manager/work_deduplicator_unittest.cc",
3368 "task/sequence_manager/work_queue_sets_unittest.cc",
3369 "task/sequence_manager/work_queue_unittest.cc",
3370 "task/sequenced_task_runner_unittest.cc",
3371 "task/single_thread_task_executor_unittest.cc",
3372 "task/single_thread_task_runner_unittest.cc",
3373 "task/task_runner_unittest.cc",
3374 "task/task_runner_util_unittest.cc",
3375 "task/task_traits_extension_unittest.cc",
3376 "task/task_traits_unittest.cc",
3377 "task/thread_pool/can_run_policy_test.h",
3378 "task/thread_pool/delayed_priority_queue_unittest.cc",
3379 "task/thread_pool/delayed_task_manager_unittest.cc",
3380 "task/thread_pool/environment_config_unittest.cc",
3381 "task/thread_pool/job_task_source_unittest.cc",
3382 "task/thread_pool/pooled_single_thread_task_runner_manager_unittest.cc",
3383 "task/thread_pool/priority_queue_unittest.cc",
3384 "task/thread_pool/sequence_unittest.cc",
3385 "task/thread_pool/service_thread_unittest.cc",
3386 "task/thread_pool/task_source_sort_key_unittest.cc",
3387 "task/thread_pool/task_tracker_unittest.cc",
3388 "task/thread_pool/test_task_factory.cc",
3389 "task/thread_pool/test_task_factory.h",
3390 "task/thread_pool/test_utils.cc",
3391 "task/thread_pool/test_utils.h",
3392 "task/thread_pool/thread_group_impl_unittest.cc",
3393 "task/thread_pool/thread_group_unittest.cc",
3394 "task/thread_pool/thread_pool_impl_unittest.cc",
3395 "task/thread_pool/tracked_ref_unittest.cc",
3396 "task/thread_pool/worker_thread_stack_unittest.cc",
3397 "task/thread_pool/worker_thread_unittest.cc",
3398 "task/thread_pool_unittest.cc",
3399 "template_util_unittest.cc",
3400 "test/gmock_callback_support_unittest.cc",
3401 "test/gmock_move_support_unittest.cc",
3402 "test/gtest_links_unittest.cc",
3403 "test/gtest_xml_unittest_result_printer_unittest.cc",
3404 "test/launcher/test_launcher_unittest.cc",
3405 "test/launcher/test_results_tracker_unittest.cc",
3406 "test/metrics/histogram_enum_reader_unittest.cc",
3407 "test/metrics/histogram_tester_unittest.cc",
3408 "test/metrics/user_action_tester_unittest.cc",
3409 "test/mock_callback_unittest.cc",
3410 "test/repeating_test_future_unittest.cc",
3411 "test/scoped_feature_list_unittest.cc",
3412 "test/scoped_logging_settings.h",
3413 "test/scoped_mock_clock_override_unittest.cc",
3414 "test/scoped_mock_time_message_loop_task_runner_unittest.cc",
3415 "test/scoped_run_loop_timeout_unittest.cc",
3416 "test/task_environment_unittest.cc",
3417 "test/test_future_unittest.cc",
3418 "test/test_mock_time_task_runner_unittest.cc",
3419 "test/test_pending_task_unittest.cc",
3420 "test/test_waitable_event_unittest.cc",
3421 "third_party/dynamic_annotations/dynamic_annotations_compiletest.cc",
3422 "thread_annotations_unittest.cc",
3423 "threading/hang_watcher_unittest.cc",
3424 "threading/platform_thread_unittest.cc",
3425 "threading/post_task_and_reply_impl_unittest.cc",
3426 "threading/scoped_blocking_call_unittest.cc",
3427 "threading/scoped_thread_priority_unittest.cc",
3428 "threading/sequence_bound_unittest.cc",
3429 "threading/sequence_local_storage_map_unittest.cc",
3430 "threading/sequence_local_storage_slot_unittest.cc",
3431 "threading/sequenced_task_runner_handle_unittest.cc",
3432 "threading/simple_thread_unittest.cc",
3433 "threading/thread_checker_unittest.cc",
3434 "threading/thread_collision_warner_unittest.cc",
3435 "threading/thread_id_name_manager_unittest.cc",
3436 "threading/thread_local_storage_unittest.cc",
3437 "threading/thread_local_unittest.cc",
3438 "threading/thread_restrictions_unittest.cc",
3439 "threading/thread_task_runner_handle_unittest.cc",
3440 "threading/thread_unittest.cc",
3441 "threading/watchdog_unittest.cc",
3442 "time/pr_time_unittest.cc",
3443 "time/time_delta_from_string_unittest.cc",
3444 "time/time_unittest.cc",
3445 "timer/elapsed_timer_unittest.cc",
3446 "timer/hi_res_timer_manager_unittest.cc",
3447 "timer/lap_timer_unittest.cc",
3448 "timer/mock_timer_unittest.cc",
3449 "timer/timer_unittest.cc",
3450 "timer/wall_clock_timer_unittest.cc",
3451 "token_unittest.cc",
3452 "tools_sanity_unittest.cc",
3453 "traits_bag_unittest.cc",
3454 "tuple_unittest.cc",
3455 "types/expected_unittest.cc",
3456 "types/id_type_unittest.cc",
3457 "types/optional_ref_unittest.cc",
3458 "types/optional_unittest.cc",
3459 "types/optional_util_unittest.cc",
3460 "types/pass_key_unittest.cc",
3461 "types/strong_alias_unittest.cc",
3462 "types/token_type_unittest.cc",
3463 "unguessable_token_unittest.cc",
3464 "value_iterators_unittest.cc",
3465 "values_unittest.cc",
3466 "version_unittest.cc",
3470 if (use_custom_libcxx) {
3471 sources += [ "libcpp_hardening_test.cc" ]
3474 # TODO(crbug.com/1304253): iOS test() targets don't support mixing Rust code
3479 if (build_rust_json_parser) {
3480 # TODO(crbug.com/1298039): The BUILDFLAG should be used instead.
3481 rs_configs = [ ":todo_buildflag_build_rust_json_parser" ]
3483 "json/json_parser_unittest.rs",
3484 "values_unittest.rs",
3487 sources -= [ "json/json_parser_unittest.cc" ]
3494 ":arm_bti_testfunctions",
3496 ":base_stack_sampling_profiler_test_util",
3497 ":base_unittests_tasktraits",
3498 ":feature_list_buildflags",
3500 ":sanitizer_buildflags",
3501 "//base/allocator:buildflags",
3502 "//base/test:native_library_test_utils",
3503 "//base/test:run_all_unittests",
3504 "//base/test:test_support",
3505 "//base/third_party/dynamic_annotations",
3506 "//build:chromecast_buildflags",
3507 "//build:chromeos_buildflags",
3510 "//third_party/icu",
3511 "//third_party/modp_b64",
3514 # TODO(crbug.com/1304253): iOS test() targets don't support mixing Rust code
3517 rs_deps = [ ":base" ]
3521 "//base/test:immediate_crash_test_helper",
3522 "//base/test:test_child_process",
3523 "//base/test:test_shared_library",
3524 "//testing/buildbot/filters:base_unittests_filters",
3528 public_deps = [ ":base_unittests_bundle_data" ]
3530 deps += [ ":base_unittests_arc" ]
3534 sources += [ "allocator/partition_allocator/tagging_unittest.cc" ]
3539 "//tools/metrics/histograms/enums.xml",
3543 deps += [ "//base/win:base_win_buildflags" ]
3546 "debug/gdi_debug_util_win_unittest.cc",
3547 "file_version_info_win_unittest.cc",
3548 "process/launch_unittest_win.cc",
3549 "test/fake_iasync_operation_win_unittest.cc",
3550 "test/test_file_util_win_unittest.cc",
3551 "test/test_reg_util_win_unittest.cc",
3552 "threading/platform_thread_win_unittest.cc",
3553 "time/time_win_unittest.cc",
3554 "win/access_token_unittest.cc",
3555 "win/async_operation_unittest.cc",
3556 "win/com_init_balancer_unittest.cc",
3557 "win/com_init_check_hook_unittest.cc",
3558 "win/com_init_util_unittest.cc",
3559 "win/core_winrt_util_unittest.cc",
3560 "win/dark_mode_support_unittest.cc",
3561 "win/dispatch_stub.cc",
3562 "win/dispatch_stub.h",
3564 "win/embedded_i18n/language_selector_unittest.cc",
3565 "win/enum_variant_unittest.cc",
3566 "win/event_trace_consumer_unittest.cc",
3567 "win/event_trace_controller_unittest.cc",
3568 "win/event_trace_provider_unittest.cc",
3569 "win/hstring_compare_unittest.cc",
3570 "win/hstring_reference_unittest.cc",
3571 "win/i18n_unittest.cc",
3572 "win/map_unittest.cc",
3573 "win/message_window_unittest.cc",
3574 "win/object_watcher_unittest.cc",
3575 "win/pe_image_reader_unittest.cc",
3576 "win/pe_image_unittest.cc",
3577 "win/post_async_results_unittest.cc",
3578 "win/reference_unittest.cc",
3579 "win/registry_unittest.cc",
3580 "win/scoped_bstr_unittest.cc",
3581 "win/scoped_handle_unittest.cc",
3582 "win/scoped_hstring_unittest.cc",
3583 "win/scoped_localalloc_unittest.cc",
3584 "win/scoped_process_information_unittest.cc",
3585 "win/scoped_safearray_unittest.cc",
3586 "win/scoped_variant_unittest.cc",
3587 "win/scoped_winrt_initializer_unittest.cc",
3588 "win/security_util_unittest.cc",
3589 "win/shortcut_unittest.cc",
3590 "win/sid_unittest.cc",
3591 "win/startup_information_unittest.cc",
3592 "win/variant_util_unittest.cc",
3593 "win/variant_vector_unittest.cc",
3594 "win/vector_unittest.cc",
3595 "win/win_includes_unittest.cc",
3596 "win/win_util_unittest.cc",
3597 "win/windows_version_unittest.cc",
3598 "win/winrt_storage_util_unittest.cc",
3599 "win/wmi_unittest.cc",
3600 "win/wrapped_window_proc_unittest.cc",
3603 if (enable_cet_shadow_stack) {
3604 sources += [ "win/cet_shadow_stack_unittest.cc" ]
3608 if (is_linux || is_chromeos) {
3610 "debug/proc_maps_linux_unittest.cc",
3611 "files/scoped_file_linux_unittest.cc",
3615 deps += [ ":stack_canary_linux_unittests" ]
3621 "allocator/partition_allocator/shim/allocator_interception_mac_unittest.mm",
3622 "allocator/partition_allocator/shim/malloc_zone_functions_mac_unittest.cc",
3623 "enterprise_util_mac_unittest.mm",
3624 "mac/backup_util_unittest.mm",
3625 "mac/bind_objc_block_unittest.mm",
3626 "mac/call_with_eh_frame_unittest.mm",
3627 "mac/dispatch_source_mach_unittest.cc",
3628 "mac/foundation_util_unittest.mm",
3629 "mac/mac_util_unittest.mm",
3630 "mac/mach_port_rendezvous_unittest.cc",
3631 "mac/scoped_mach_vm_unittest.cc",
3632 "mac/scoped_nsobject_unittest.mm",
3633 "mac/scoped_objc_class_swizzler_unittest.mm",
3634 "mac/scoped_sending_event_unittest.mm",
3635 "message_loop/message_pump_mac_unittest.mm",
3636 "power_monitor/thermal_state_observer_mac_unittest.mm",
3637 "process/memory_unittest_mac.h",
3638 "process/memory_unittest_mac.mm",
3639 "strings/sys_string_conversions_mac_unittest.mm",
3640 "time/time_mac_unittest.mm",
3646 "files/dir_reader_posix_unittest.cc",
3647 "files/file_descriptor_watcher_posix_unittest.cc",
3648 "memory/madv_free_discardable_memory_allocator_posix_unittest.cc",
3649 "memory/madv_free_discardable_memory_posix_unittest.cc",
3650 "message_loop/fd_watch_controller_posix_unittest.cc",
3651 "posix/file_descriptor_shuffle_unittest.cc",
3652 "posix/unix_domain_socket_unittest.cc",
3654 if (!is_nacl && !is_apple) {
3656 "profiler/stack_base_address_posix_unittest.cc",
3657 "profiler/stack_copier_signal_unittest.cc",
3658 "profiler/thread_delegate_posix_unittest.cc",
3663 # Allow more direct string conversions on platforms with native utf8
3665 if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
3666 defines += [ "SYSTEM_NATIVE_UTF8" ]
3670 # Add unwind tables in base_unittests_apk test apk. The unwind tables are
3671 # generated from debug info in the binary. Removing "default_symbols" and
3672 # adding symbols config removes the "strip_debug" config that strips the
3673 # debug info, on base unittests apk.
3674 if (can_unwind_with_cfi_table || enable_arm_cfi_table) {
3675 configs -= [ "//build/config/compiler:default_symbols" ]
3676 if (symbol_level == 2) {
3677 configs += [ "//build/config/compiler:symbols" ]
3679 configs += [ "//build/config/compiler:minimal_symbols" ]
3681 add_unwind_tables_in_apk = true
3683 if (can_unwind_with_cfi_table) {
3684 sources += [ "trace_event/cfi_backtrace_android_unittest.cc" ]
3686 if (current_cpu == "arm") {
3688 "profiler/chrome_unwind_info_android_unittest.cc",
3689 "profiler/chrome_unwinder_android_unittest.cc",
3690 "profiler/chrome_unwinder_android_v2_unittest.cc",
3693 if (!exclude_unwind_tables &&
3694 (current_cpu == "arm" || current_cpu == "arm64")) {
3696 "profiler/libunwindstack_unwinder_android_unittest.cc",
3697 "profiler/native_unwinder_android_unittest.cc",
3700 ":base_profiler_test_support_java",
3701 ":base_profiler_test_support_jni_headers",
3702 ":base_profiler_test_support_library",
3703 ":native_unwinder_android",
3708 "android/android_image_reader_compat_unittest.cc",
3709 "android/application_status_listener_unittest.cc",
3710 "android/child_process_unittest.cc",
3711 "android/content_uri_utils_unittest.cc",
3712 "android/jank_metric_uma_recorder_unittest.cc",
3713 "android/java_handler_thread_unittest.cc",
3714 "android/jni_android_unittest.cc",
3715 "android/jni_array_unittest.cc",
3716 "android/jni_string_unittest.cc",
3717 "android/library_loader/library_prefetcher_unittest.cc",
3718 "android/linker/linker_jni.cc",
3719 "android/linker/linker_jni.h",
3720 "android/linker/modern_linker_jni.cc",
3721 "android/linker/modern_linker_jni.h",
3722 "android/linker/modern_linker_unittest.cc",
3723 "android/path_utils_unittest.cc",
3724 "android/radio_utils_unittest.cc",
3725 "android/reached_addresses_bitset_unittest.cc",
3726 "android/scoped_java_ref_unittest.cc",
3727 "android/sys_utils_unittest.cc",
3728 "android/unguessable_token_android_unittest.cc",
3729 "os_compat_android_unittest.cc",
3732 # Android does not use test_launcher to run gtests.
3734 "process/process_unittest.cc",
3735 "process/process_util_unittest.cc",
3736 "test/gtest_links_unittest.cc",
3737 "test/gtest_xml_unittest_result_printer_unittest.cc",
3738 "test/launcher/test_launcher_unittest.cc",
3739 "test/launcher/test_results_tracker_unittest.cc",
3742 ":base_java_unittest_support",
3743 "//base/test:test_support_java",
3749 "ios/device_util_unittest.mm",
3750 "ios/weak_nsobject_unittest.mm",
3753 if (is_cronet_build) {
3754 sources += [ "message_loop/message_pump_io_ios_unittest.cc" ]
3756 sources += [ "message_loop/message_pump_kqueue_unittest.cc" ]
3759 # ios does not use test_launcher to run gtests.
3761 "files/file_path_watcher_unittest.cc",
3762 "memory/discardable_shared_memory_unittest.cc",
3763 "process/memory_unittest.cc",
3764 "process/process_unittest.cc",
3765 "process/process_util_unittest.cc",
3766 "sync_socket_unittest.cc",
3767 "synchronization/waitable_event_watcher_unittest.cc",
3768 "test/gtest_links_unittest.cc",
3769 "test/gtest_xml_unittest_result_printer_unittest.cc",
3770 "test/launcher/test_launcher_unittest.cc",
3771 "test/launcher/test_results_tracker_unittest.cc",
3775 # Pull in specific Mac files for iOS.
3776 "mac/backup_util_unittest.mm",
3777 "mac/bind_objc_block_unittest.mm",
3778 "mac/foundation_util_unittest.mm",
3779 "mac/scoped_nsobject_unittest.mm",
3780 "strings/sys_string_conversions_mac_unittest.mm",
3784 # The immediate crash tests require shared libraries, which we don't
3785 # support loading on iOS.
3786 "immediate_crash_unittest.cc",
3789 if (use_allocator_shim) {
3791 "allocator/partition_allocator/shim/allocator_interception_mac_unittest.mm",
3792 "allocator/partition_allocator/shim/malloc_zone_functions_mac_unittest.cc",
3797 if (use_partition_alloc) {
3799 "allocator/partition_allocator/address_pool_manager_unittest.cc",
3800 "allocator/partition_allocator/address_space_randomization_unittest.cc",
3801 "allocator/partition_allocator/freeslot_bitmap_unittest.cc",
3802 "allocator/partition_allocator/hardening_unittest.cc",
3803 "allocator/partition_allocator/memory_reclaimer_unittest.cc",
3804 "allocator/partition_allocator/page_allocator_unittest.cc",
3805 "allocator/partition_allocator/partition_alloc_base/bits_pa_unittest.cc",
3806 "allocator/partition_allocator/partition_alloc_base/component_export_pa_unittest.cc",
3807 "allocator/partition_allocator/partition_alloc_base/cpu_pa_unittest.cc",
3808 "allocator/partition_allocator/partition_alloc_base/cxx17_backports_pa_unittest.cc",
3809 "allocator/partition_allocator/partition_alloc_base/logging_pa_unittest.cc",
3810 "allocator/partition_allocator/partition_alloc_base/rand_util_pa_unittest.cc",
3811 "allocator/partition_allocator/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc",
3812 "allocator/partition_allocator/partition_alloc_base/strings/stringprintf_pa_unittest.cc",
3813 "allocator/partition_allocator/partition_alloc_base/thread_annotations_pa_unittest.cc",
3814 "allocator/partition_allocator/partition_alloc_unittest.cc",
3815 "allocator/partition_allocator/partition_lock_unittest.cc",
3816 "allocator/partition_allocator/reverse_bytes_unittest.cc",
3817 "allocator/partition_allocator/starscan/pcscan_scheduling_unittest.cc",
3818 "allocator/partition_allocator/starscan/pcscan_unittest.cc",
3819 "allocator/partition_allocator/starscan/scan_loop_unittest.cc",
3820 "allocator/partition_allocator/starscan/stack/stack_unittest.cc",
3821 "allocator/partition_allocator/starscan/state_bitmap_unittest.cc",
3822 "allocator/partition_allocator/thread_cache_unittest.cc",
3825 if ((is_android || is_linux) && target_cpu == "arm64") {
3836 "allocator/partition_allocator/partition_alloc_base/files/file_path_pa_unittest.cc",
3837 "allocator/partition_allocator/partition_alloc_base/native_library_pa_unittest.cc",
3839 } else if (is_fuchsia) {
3840 sources += [ "allocator/partition_allocator/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc" ]
3842 deps += [ ":partition_alloc_test_support" ]
3846 sources += [ "message_loop/message_pump_kqueue_unittest.cc" ]
3848 "CoreFoundation.framework",
3849 "Foundation.framework",
3852 if (current_cpu == "x64") {
3853 deps += [ ":base_profiler_test_support_library" ]
3857 if (is_fuchsia || is_linux || is_chromeos) {
3859 "debug/elf_reader_unittest.cc",
3860 "debug/test_elf_image_builder.cc",
3861 "debug/test_elf_image_builder.h",
3864 deps += [ "//base/test:malloc_wrapper" ]
3866 # This library is used by ElfReaderTest to test reading elf files.
3867 "MALLOC_WRAPPER_LIB=\"${shlib_prefix}malloc_wrapper${shlib_extension}\"",
3870 if (!is_component_build) {
3871 # Set rpath to find libmalloc_wrapper.so even in a non-component build.
3872 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
3876 if (is_chromeos_lacros) {
3877 sources += [ "i18n/icu_mergeable_data_file_unittest.cc" ]
3880 if (is_linux || is_chromeos_lacros) {
3882 "linux_util_unittest.cc",
3883 "nix/xdg_util_unittest.cc",
3888 sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
3892 sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
3894 ":message_pump_buildflags",
3895 "//third_party/libevent",
3901 "files/dir_reader_posix_unittest.cc",
3902 "files/file_descriptor_watcher_posix_unittest.cc",
3903 "fuchsia/file_utils_unittest.cc",
3904 "fuchsia/filtered_service_directory_unittest.cc",
3905 "fuchsia/fuchsia_logging_unittest.cc",
3906 "fuchsia/intl_profile_watcher_unittest.cc",
3907 "fuchsia/mem_buffer_util_unittest.cc",
3908 "fuchsia/scoped_service_binding_unittest.cc",
3909 "fuchsia/scoped_service_publisher_unittest.cc",
3910 "fuchsia/service_directory_test_base.cc",
3911 "fuchsia/service_directory_test_base.h",
3912 "fuchsia/service_provider_impl_unittest.cc",
3913 "fuchsia/system_build_info_unittest.cc",
3914 "fuchsia/system_product_info_unittest.cc",
3915 "fuchsia/test_component_context_for_process_unittest.cc",
3916 "fuchsia/time_zone_data_unittest.cc",
3917 "message_loop/fd_watch_controller_posix_unittest.cc",
3918 "posix/file_descriptor_shuffle_unittest.cc",
3922 ":test_interface_impl",
3923 ":test_log_listener_safe",
3925 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.buildinfo",
3926 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hwinfo",
3927 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.intl",
3928 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.logger",
3929 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem",
3930 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys",
3931 "//third_party/fuchsia-sdk/sdk/pkg/async",
3932 "//third_party/fuchsia-sdk/sdk/pkg/async-default",
3933 "//third_party/fuchsia-sdk/sdk/pkg/fdio",
3934 "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
3937 additional_manifest_fragments =
3938 [ "//build/config/fuchsia/test/logger.shard.test-cml" ]
3941 if (!is_fuchsia && !is_ios) {
3942 sources += [ "files/file_locking_unittest.cc" ]
3946 deps += [ "//testing/android/native_test:native_test_native_code" ]
3948 "debug/elf_reader_unittest.cc",
3949 "debug/proc_maps_linux_unittest.cc",
3950 "debug/test_elf_image_builder.cc",
3951 "debug/test_elf_image_builder.h",
3956 deps += [ "//base:scoped_handle_test_dll" ]
3957 if (current_cpu == "x64" || current_cpu == "arm64") {
3958 sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ]
3959 deps += [ ":base_profiler_test_support_library" ]
3961 sources += [ "files/os_validation_win_unittest.cc" ]
3964 sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ]
3966 if (is_chromeos && current_cpu == "x64") {
3967 sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ]
3968 deps += [ ":base_profiler_test_support_library" ]
3971 if (use_allocator_shim) {
3973 "allocator/partition_allocator/shim/allocator_shim_unittest.cc",
3974 "sampling_heap_profiler/poisson_allocation_sampler_unittest.cc",
3975 "sampling_heap_profiler/sampling_heap_profiler_unittest.cc",
3980 [ "allocator/partition_allocator/shim/winheap_stubs_win_unittest.cc" ]
3984 "allocator/partition_alloc_support_unittest.cc",
3985 "allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc",
3989 if (enable_base_tracing) {
3991 "test/trace_event_analyzer_unittest.cc",
3992 "trace_event/event_name_filter_unittest.cc",
3993 "trace_event/heap_profiler_allocation_context_tracker_unittest.cc",
3994 "trace_event/memory_allocator_dump_unittest.cc",
3995 "trace_event/memory_dump_manager_unittest.cc",
3996 "trace_event/memory_dump_scheduler_unittest.cc",
3997 "trace_event/memory_infra_background_allowlist_unittest.cc",
3998 "trace_event/memory_usage_estimator_unittest.cc",
3999 "trace_event/process_memory_dump_unittest.cc",
4000 "trace_event/trace_arguments_unittest.cc",
4001 "trace_event/trace_category_unittest.cc",
4002 "trace_event/trace_config_unittest.cc",
4003 "trace_event/trace_conversion_helper_unittest.cc",
4004 "trace_event/trace_event_filter_test_utils.cc",
4005 "trace_event/trace_event_filter_test_utils.h",
4006 "trace_event/trace_event_unittest.cc",
4007 "trace_event/traced_value_support_unittest.cc",
4008 "trace_event/traced_value_unittest.cc",
4009 "trace_event/typed_macros_unittest.cc",
4010 "tracing/perfetto_task_runner_unittest.cc",
4015 "trace_event/cpufreq_monitor_android_unittest.cc",
4016 "trace_event/java_heap_dump_provider_android_unittest.cc",
4017 "trace_event/trace_event_android_unittest.cc",
4022 "//third_party/perfetto/include/perfetto/trace_processor:storage",
4023 "//third_party/perfetto/protos/perfetto/trace:lite",
4024 "//third_party/perfetto/protos/perfetto/trace/interned_data:lite",
4025 "//third_party/perfetto/protos/perfetto/trace/track_event:lite",
4029 if (enable_rust && toolchain_has_rust) {
4031 "containers/span_rust_unittest.cc",
4032 "strings/string_piece_rust_unittest.cc",
4034 deps += [ "//build/rust:cxx_cppdeps" ]
4038 action("build_date") {
4039 script = "//build/write_build_date_header.py"
4041 outputs = [ "$target_gen_dir/generated_build_date.h" ]
4044 [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ]
4046 # FIXME: ewk_bringup definition should be removed.
4048 args += [ "1539234000" ]
4050 args += [ "build_timestamp" ]
4054 if (enable_nocompile_tests) {
4055 nocompile_test("base_nocompile_tests") {
4057 "allocator/partition_allocator/partition_alloc_base/thread_annotations_pa_unittest.nc",
4058 "callback_list_unittest.nc",
4059 "containers/buffer_iterator_unittest.nc",
4060 "containers/checked_iterators_unittest.nc",
4061 "containers/contains_unittest.nc",
4062 "containers/enum_set_unittest.nc",
4063 "containers/span_unittest.nc",
4064 "debug/crash_logging_unittest.nc",
4065 "functional/bind_unittest.nc",
4066 "functional/callback_unittest.nc",
4067 "functional/function_ref_unittest.nc",
4068 "functional/overloaded_unittest.nc",
4069 "memory/raw_ptr_unittest.nc",
4070 "memory/ref_counted_unittest.nc",
4071 "memory/weak_ptr_unittest.nc",
4072 "metrics/field_trial_params_unittest.nc",
4073 "metrics/histogram_unittest.nc",
4074 "no_destructor_unittest.nc",
4075 "observer_list_unittest.nc",
4076 "sequence_checker_unittest.nc",
4077 "strings/string_piece_unittest.nc",
4078 "task/bind_post_task_unittest.nc",
4079 "task/task_traits_extension_unittest.nc",
4080 "task/task_traits_unittest.nc",
4081 "thread_annotations_unittest.nc",
4082 "traits_bag_unittest.nc",
4083 "types/pass_key_unittest.nc",
4084 "values_unittest.nc",
4089 ":base_unittests_tasktraits",
4090 "//base/test:run_all_unittests",
4094 # Since the nocompile test is not able to inspect the contents of
4095 # include_dirs, we need to specify the Abseil include dir manually.
4096 include_dirs = [ "//third_party/abseil-cpp" ]
4101 generate_jni("base_jni_headers") {
4103 "android/java/src/org/chromium/base/ApkAssets.java",
4104 "android/java/src/org/chromium/base/ApplicationStatus.java",
4105 "android/java/src/org/chromium/base/BaseFeatureList.java",
4106 "android/java/src/org/chromium/base/BuildInfo.java",
4107 "android/java/src/org/chromium/base/BundleUtils.java",
4108 "android/java/src/org/chromium/base/Callback.java",
4109 "android/java/src/org/chromium/base/CommandLine.java",
4110 "android/java/src/org/chromium/base/ContentUriUtils.java",
4111 "android/java/src/org/chromium/base/CpuFeatures.java",
4112 "android/java/src/org/chromium/base/EarlyTraceEvent.java",
4113 "android/java/src/org/chromium/base/EventLog.java",
4114 "android/java/src/org/chromium/base/FeatureList.java",
4115 "android/java/src/org/chromium/base/Features.java",
4116 "android/java/src/org/chromium/base/FieldTrialList.java",
4117 "android/java/src/org/chromium/base/FileUtils.java",
4118 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
4119 "android/java/src/org/chromium/base/IntStringCallback.java",
4120 "android/java/src/org/chromium/base/JNIUtils.java",
4121 "android/java/src/org/chromium/base/JavaExceptionReporter.java",
4122 "android/java/src/org/chromium/base/JavaHandlerThread.java",
4123 "android/java/src/org/chromium/base/LocaleUtils.java",
4124 "android/java/src/org/chromium/base/MemoryPressureListener.java",
4125 "android/java/src/org/chromium/base/PathService.java",
4126 "android/java/src/org/chromium/base/PathUtils.java",
4127 "android/java/src/org/chromium/base/PowerMonitor.java",
4128 "android/java/src/org/chromium/base/RadioUtils.java",
4129 "android/java/src/org/chromium/base/SysUtils.java",
4130 "android/java/src/org/chromium/base/ThreadUtils.java",
4131 "android/java/src/org/chromium/base/TimezoneUtils.java",
4132 "android/java/src/org/chromium/base/TraceEvent.java",
4133 "android/java/src/org/chromium/base/UnguessableToken.java",
4134 "android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java",
4135 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
4136 "android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java",
4137 "android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java",
4138 "android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java",
4139 "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java",
4140 "android/java/src/org/chromium/base/process_launcher/ChildProcessService.java",
4141 "android/java/src/org/chromium/base/task/PostTask.java",
4142 "android/java/src/org/chromium/base/task/TaskRunnerImpl.java",
4145 public_deps = [ ":android_runtime_jni_headers" ]
4148 generate_jar_jni("android_runtime_jni_headers") {
4150 "java/lang/Runnable.class",
4151 "java/lang/Runtime.class",
4155 java_library("jni_java") {
4156 supports_android = true
4158 "android/java/src/org/chromium/base/JniException.java",
4159 "android/java/src/org/chromium/base/JniStaticTestMocker.java",
4160 "android/java/src/org/chromium/base/NativeLibraryLoadedStatus.java",
4161 "android/java/src/org/chromium/base/annotations/AccessedByNative.java",
4162 "android/java/src/org/chromium/base/annotations/CalledByNative.java",
4163 "android/java/src/org/chromium/base/annotations/CalledByNativeForTesting.java",
4164 "android/java/src/org/chromium/base/annotations/CalledByNativeUnchecked.java",
4165 "android/java/src/org/chromium/base/annotations/JNIAdditionalImport.java",
4166 "android/java/src/org/chromium/base/annotations/JNINamespace.java",
4167 "android/java/src/org/chromium/base/annotations/JniIgnoreNatives.java",
4168 "android/java/src/org/chromium/base/annotations/NativeClassQualifiedName.java",
4169 "android/java/src/org/chromium/base/annotations/NativeMethods.java",
4172 deps = [ "//build/android:build_java" ]
4175 java_cpp_features("java_features_srcjar") {
4176 # External code should depend on ":base_java" instead.
4177 visibility = [ ":*" ]
4179 "android/base_features.cc",
4181 "task/task_features.cc",
4183 template = "android/java/src/org/chromium/base/BaseFeatures.java.tmpl"
4186 java_cpp_strings("java_switches_srcjar") {
4187 # External code should depend on ":base_java" instead.
4188 visibility = [ ":*" ]
4189 sources = [ "base_switches.cc" ]
4190 template = "android/java/src/org/chromium/base/BaseSwitches.java.tmpl"
4193 android_library("base_java") {
4195 ":base_android_java_enums_srcjar",
4197 ":java_features_srcjar",
4198 ":java_switches_srcjar",
4203 "//build/android:build_java",
4204 "//third_party/android_deps:com_google_code_findbugs_jsr305_java",
4205 "//third_party/androidx:androidx_annotation_annotation_experimental_java",
4206 "//third_party/androidx:androidx_annotation_annotation_java",
4207 "//third_party/androidx:androidx_collection_collection_java",
4208 "//third_party/androidx:androidx_core_core_java",
4209 "//third_party/androidx:androidx_multidex_multidex_java",
4213 "android/java/src/org/chromium/base/ActivityState.java",
4214 "android/java/src/org/chromium/base/ApiCompatibilityUtils.java",
4215 "android/java/src/org/chromium/base/ApkAssets.java",
4216 "android/java/src/org/chromium/base/ApplicationStatus.java",
4217 "android/java/src/org/chromium/base/BaseFeatureList.java",
4218 "android/java/src/org/chromium/base/BuildInfo.java",
4219 "android/java/src/org/chromium/base/BundleUtils.java",
4220 "android/java/src/org/chromium/base/ByteArrayGenerator.java",
4221 "android/java/src/org/chromium/base/Callback.java",
4222 "android/java/src/org/chromium/base/CallbackController.java",
4223 "android/java/src/org/chromium/base/CollectionUtil.java",
4224 "android/java/src/org/chromium/base/CommandLine.java",
4225 "android/java/src/org/chromium/base/CommandLineInitUtil.java",
4226 "android/java/src/org/chromium/base/Consumer.java",
4227 "android/java/src/org/chromium/base/ContentUriUtils.java",
4228 "android/java/src/org/chromium/base/ContextUtils.java",
4229 "android/java/src/org/chromium/base/CpuFeatures.java",
4230 "android/java/src/org/chromium/base/DiscardableReferencePool.java",
4231 "android/java/src/org/chromium/base/EarlyTraceEvent.java",
4232 "android/java/src/org/chromium/base/EventLog.java",
4233 "android/java/src/org/chromium/base/FeatureList.java",
4234 "android/java/src/org/chromium/base/Features.java",
4235 "android/java/src/org/chromium/base/FieldTrialList.java",
4236 "android/java/src/org/chromium/base/FileUtils.java",
4237 "android/java/src/org/chromium/base/Function.java",
4238 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
4239 "android/java/src/org/chromium/base/IntStringCallback.java",
4240 "android/java/src/org/chromium/base/IntentUtils.java",
4241 "android/java/src/org/chromium/base/JNIUtils.java",
4242 "android/java/src/org/chromium/base/JavaExceptionReporter.java",
4243 "android/java/src/org/chromium/base/JavaHandlerThread.java",
4244 "android/java/src/org/chromium/base/LifetimeAssert.java",
4245 "android/java/src/org/chromium/base/LocaleUtils.java",
4246 "android/java/src/org/chromium/base/Log.java",
4247 "android/java/src/org/chromium/base/MathUtils.java",
4248 "android/java/src/org/chromium/base/MemoryPressureListener.java",
4249 "android/java/src/org/chromium/base/ObserverList.java",
4250 "android/java/src/org/chromium/base/PackageManagerUtils.java",
4251 "android/java/src/org/chromium/base/PackageUtils.java",
4252 "android/java/src/org/chromium/base/PathService.java",
4253 "android/java/src/org/chromium/base/PathUtils.java",
4254 "android/java/src/org/chromium/base/PiiElider.java",
4255 "android/java/src/org/chromium/base/PowerMonitor.java",
4256 "android/java/src/org/chromium/base/PowerMonitorForQ.java",
4257 "android/java/src/org/chromium/base/Predicate.java",
4258 "android/java/src/org/chromium/base/Promise.java",
4259 "android/java/src/org/chromium/base/RadioUtils.java",
4260 "android/java/src/org/chromium/base/StreamUtil.java",
4261 "android/java/src/org/chromium/base/StrictModeContext.java",
4262 "android/java/src/org/chromium/base/SysUtils.java",
4263 "android/java/src/org/chromium/base/ThreadUtils.java",
4264 "android/java/src/org/chromium/base/TimeUtils.java",
4265 "android/java/src/org/chromium/base/TimezoneUtils.java",
4266 "android/java/src/org/chromium/base/TraceEvent.java",
4267 "android/java/src/org/chromium/base/UnguessableToken.java",
4268 "android/java/src/org/chromium/base/UnownedUserData.java",
4269 "android/java/src/org/chromium/base/UnownedUserDataHost.java",
4270 "android/java/src/org/chromium/base/UnownedUserDataKey.java",
4271 "android/java/src/org/chromium/base/UserData.java",
4272 "android/java/src/org/chromium/base/UserDataHost.java",
4273 "android/java/src/org/chromium/base/WrappedClassLoader.java",
4274 "android/java/src/org/chromium/base/compat/ApiHelperForM.java",
4275 "android/java/src/org/chromium/base/compat/ApiHelperForN.java",
4276 "android/java/src/org/chromium/base/compat/ApiHelperForO.java",
4277 "android/java/src/org/chromium/base/compat/ApiHelperForOMR1.java",
4278 "android/java/src/org/chromium/base/compat/ApiHelperForP.java",
4279 "android/java/src/org/chromium/base/compat/ApiHelperForQ.java",
4280 "android/java/src/org/chromium/base/compat/ApiHelperForR.java",
4281 "android/java/src/org/chromium/base/compat/ApiHelperForS.java",
4282 "android/java/src/org/chromium/base/jank_tracker/DummyJankTracker.java",
4283 "android/java/src/org/chromium/base/jank_tracker/FrameMetrics.java",
4284 "android/java/src/org/chromium/base/jank_tracker/FrameMetricsListener.java",
4285 "android/java/src/org/chromium/base/jank_tracker/FrameMetricsStore.java",
4286 "android/java/src/org/chromium/base/jank_tracker/JankActivityTracker.java",
4287 "android/java/src/org/chromium/base/jank_tracker/JankMetricCalculator.java",
4288 "android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java",
4289 "android/java/src/org/chromium/base/jank_tracker/JankMetrics.java",
4290 "android/java/src/org/chromium/base/jank_tracker/JankReportingRunnable.java",
4291 "android/java/src/org/chromium/base/jank_tracker/JankReportingScheduler.java",
4292 "android/java/src/org/chromium/base/jank_tracker/JankScenario.java",
4293 "android/java/src/org/chromium/base/jank_tracker/JankTracker.java",
4294 "android/java/src/org/chromium/base/jank_tracker/JankTrackerImpl.java",
4295 "android/java/src/org/chromium/base/library_loader/LegacyLinker.java",
4296 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
4297 "android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java",
4298 "android/java/src/org/chromium/base/library_loader/Linker.java",
4299 "android/java/src/org/chromium/base/library_loader/LinkerJni.java",
4300 "android/java/src/org/chromium/base/library_loader/LoaderErrors.java",
4301 "android/java/src/org/chromium/base/library_loader/ModernLinker.java",
4302 "android/java/src/org/chromium/base/library_loader/ModernLinkerJni.java",
4303 "android/java/src/org/chromium/base/library_loader/NativeLibraryPreloader.java",
4304 "android/java/src/org/chromium/base/library_loader/ProcessInitException.java",
4305 "android/java/src/org/chromium/base/lifetime/DestroyChecker.java",
4306 "android/java/src/org/chromium/base/lifetime/Destroyable.java",
4307 "android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java",
4308 "android/java/src/org/chromium/base/memory/MemoryPressureCallback.java",
4309 "android/java/src/org/chromium/base/memory/MemoryPressureMonitor.java",
4310 "android/java/src/org/chromium/base/memory/MemoryPressureUma.java",
4311 "android/java/src/org/chromium/base/memory/MemoryPurgeManager.java",
4312 "android/java/src/org/chromium/base/metrics/CachingUmaRecorder.java",
4313 "android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java",
4314 "android/java/src/org/chromium/base/metrics/NoopUmaRecorder.java",
4315 "android/java/src/org/chromium/base/metrics/RecordHistogram.java",
4316 "android/java/src/org/chromium/base/metrics/RecordUserAction.java",
4317 "android/java/src/org/chromium/base/metrics/ScopedSysTraceEvent.java",
4318 "android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java",
4319 "android/java/src/org/chromium/base/metrics/TimingMetric.java",
4320 "android/java/src/org/chromium/base/metrics/UmaRecorder.java",
4321 "android/java/src/org/chromium/base/metrics/UmaRecorderHolder.java",
4322 "android/java/src/org/chromium/base/multidex/ChromiumMultiDexInstaller.java",
4323 "android/java/src/org/chromium/base/process_launcher/BindService.java",
4324 "android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java",
4325 "android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java",
4326 "android/java/src/org/chromium/base/process_launcher/ChildProcessConstants.java",
4327 "android/java/src/org/chromium/base/process_launcher/ChildProcessLauncher.java",
4328 "android/java/src/org/chromium/base/process_launcher/ChildProcessService.java",
4329 "android/java/src/org/chromium/base/process_launcher/ChildProcessServiceDelegate.java",
4330 "android/java/src/org/chromium/base/process_launcher/ChildServiceConnection.java",
4331 "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionDelegate.java",
4332 "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionFactory.java",
4333 "android/java/src/org/chromium/base/process_launcher/ChildServiceConnectionImpl.java",
4334 "android/java/src/org/chromium/base/process_launcher/FileDescriptorInfo.java",
4335 "android/java/src/org/chromium/base/supplier/BooleanSupplier.java",
4336 "android/java/src/org/chromium/base/supplier/DestroyableObservableSupplier.java",
4337 "android/java/src/org/chromium/base/supplier/ObservableSupplier.java",
4338 "android/java/src/org/chromium/base/supplier/ObservableSupplierImpl.java",
4339 "android/java/src/org/chromium/base/supplier/OneShotCallback.java",
4340 "android/java/src/org/chromium/base/supplier/OneshotSupplier.java",
4341 "android/java/src/org/chromium/base/supplier/OneshotSupplierImpl.java",
4342 "android/java/src/org/chromium/base/supplier/Supplier.java",
4343 "android/java/src/org/chromium/base/supplier/UnownedUserDataSupplier.java",
4344 "android/java/src/org/chromium/base/task/AsyncTask.java",
4345 "android/java/src/org/chromium/base/task/BackgroundOnlyAsyncTask.java",
4346 "android/java/src/org/chromium/base/task/ChainedTasks.java",
4347 "android/java/src/org/chromium/base/task/ChoreographerTaskRunner.java",
4348 "android/java/src/org/chromium/base/task/ChromeThreadPoolExecutor.java",
4349 "android/java/src/org/chromium/base/task/DefaultTaskExecutor.java",
4350 "android/java/src/org/chromium/base/task/PostTask.java",
4351 "android/java/src/org/chromium/base/task/SequencedTaskRunner.java",
4352 "android/java/src/org/chromium/base/task/SequencedTaskRunnerImpl.java",
4353 "android/java/src/org/chromium/base/task/SerialExecutor.java",
4354 "android/java/src/org/chromium/base/task/SingleThreadTaskRunner.java",
4355 "android/java/src/org/chromium/base/task/SingleThreadTaskRunnerImpl.java",
4356 "android/java/src/org/chromium/base/task/TaskExecutor.java",
4357 "android/java/src/org/chromium/base/task/TaskRunner.java",
4358 "android/java/src/org/chromium/base/task/TaskRunnerImpl.java",
4359 "android/java/src/org/chromium/base/task/TaskTraits.java",
4360 "android/java/src/org/chromium/base/task/TaskTraitsExtensionDescriptor.java",
4363 annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
4365 resources_package = "org.chromium.base"
4367 proguard_configs = [
4368 "android/proguard/chromium_apk.flags",
4369 "android/proguard/chromium_code.flags",
4370 "android/proguard/remove_logging.flags",
4374 android_aidl("base_java_aidl") {
4375 import_include = [ "android/java/src" ]
4377 "android/java/src/org/chromium/base/process_launcher/IChildProcessService.aidl",
4378 "android/java/src/org/chromium/base/process_launcher/IParentProcess.aidl",
4382 android_library("base_javatests") {
4387 ":base_java_test_support",
4389 "//base/test:test_support_java",
4390 "//build/android:build_java",
4391 "//third_party/android_support_test_runner:runner_java",
4392 "//third_party/androidx:androidx_test_runner_java",
4393 "//third_party/hamcrest:hamcrest_java",
4394 "//third_party/junit:junit",
4395 "//third_party/mockito:mockito_java",
4399 # AssertsTest doesn't really belong in //base but it's preferable to
4400 # stick it here than create another target for a single test.
4401 "android/javatests/src/org/chromium/base/AdvancedMockContextTest.java",
4402 "android/javatests/src/org/chromium/base/AssertsTest.java",
4403 "android/javatests/src/org/chromium/base/CommandLineFlagsTest.java",
4404 "android/javatests/src/org/chromium/base/CommandLineInitUtilTest.java",
4405 "android/javatests/src/org/chromium/base/CommandLineTest.java",
4406 "android/javatests/src/org/chromium/base/EarlyTraceEventTest.java",
4407 "android/javatests/src/org/chromium/base/IntentUtilsTest.java",
4408 "android/javatests/src/org/chromium/base/LocaleUtilsTest.java",
4409 "android/javatests/src/org/chromium/base/ObserverListTest.java",
4410 "android/javatests/src/org/chromium/base/PackageUtilsTest.java",
4411 "android/javatests/src/org/chromium/base/StrictModeContextTest.java",
4412 "android/javatests/src/org/chromium/base/UserDataHostTest.java",
4413 "android/javatests/src/org/chromium/base/library_loader/EarlyNativeTest.java",
4414 "android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java",
4415 "android/javatests/src/org/chromium/base/task/AsyncTaskTest.java",
4416 "android/javatests/src/org/chromium/base/task/PostTaskTest.java",
4417 "android/javatests/src/org/chromium/base/task/SequencedTaskRunnerImplTest.java",
4418 "android/javatests/src/org/chromium/base/task/SingleThreadTaskRunnerImplTest.java",
4419 "android/javatests/src/org/chromium/base/task/TaskRunnerImplTest.java",
4420 "android/javatests/src/org/chromium/base/test/metrics/HistogramTestRuleTest.java",
4421 "android/javatests/src/org/chromium/base/util/GarbageCollectionTestUtilsTest.java",
4424 annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
4427 source_set("base_javatests_lib") {
4431 ":base_javatests_jni_headers",
4433 sources = [ "test/library_loader/early_native_test_helper.cc" ]
4436 generate_jni("base_javatests_jni_headers") {
4438 sources = [ "android/javatests/src/org/chromium/base/library_loader/EarlyNativeTest.java" ]
4441 android_library("base_java_test_support") {
4447 "//build/android:build_java",
4448 "//third_party/android_sdk:android_test_base_java",
4449 "//third_party/android_sdk:android_test_mock_java",
4450 "//third_party/android_support_test_runner:runner_java",
4451 "//third_party/androidx:androidx_annotation_annotation_java",
4452 "//third_party/androidx:androidx_core_core_java",
4453 "//third_party/androidx:androidx_test_uiautomator_uiautomator_java",
4454 "//third_party/hamcrest:hamcrest_java",
4455 "//third_party/junit",
4459 "test/android/javatests/src/org/chromium/base/FakeTimeTestRule.java",
4460 "test/android/javatests/src/org/chromium/base/test/BaseActivityTestRule.java",
4461 "test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java",
4462 "test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java",
4463 "test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java",
4464 "test/android/javatests/src/org/chromium/base/test/BaseJUnit4TestRule.java",
4465 "test/android/javatests/src/org/chromium/base/test/BundleTestRule.java",
4466 "test/android/javatests/src/org/chromium/base/test/LoadNative.java",
4467 "test/android/javatests/src/org/chromium/base/test/MockitoErrorHandler.java",
4468 "test/android/javatests/src/org/chromium/base/test/ReachedCodeProfiler.java",
4469 "test/android/javatests/src/org/chromium/base/test/ScreenshotOnFailureStatement.java",
4470 "test/android/javatests/src/org/chromium/base/test/SetUpStatement.java",
4471 "test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java",
4472 "test/android/javatests/src/org/chromium/base/test/TestListInstrumentationRunListener.java",
4473 "test/android/javatests/src/org/chromium/base/test/TestTraceEvent.java",
4474 "test/android/javatests/src/org/chromium/base/test/UiThreadStatement.java",
4475 "test/android/javatests/src/org/chromium/base/test/UiThreadTest.java",
4476 "test/android/javatests/src/org/chromium/base/test/UnitTestNoBrowserProcessHook.java",
4477 "test/android/javatests/src/org/chromium/base/test/metrics/HistogramTestRule.java",
4478 "test/android/javatests/src/org/chromium/base/test/params/BaseJUnit4RunnerDelegate.java",
4479 "test/android/javatests/src/org/chromium/base/test/params/BlockJUnit4RunnerDelegate.java",
4480 "test/android/javatests/src/org/chromium/base/test/params/MethodParamAnnotationRule.java",
4481 "test/android/javatests/src/org/chromium/base/test/params/MethodParamRule.java",
4482 "test/android/javatests/src/org/chromium/base/test/params/ParameterAnnotations.java",
4483 "test/android/javatests/src/org/chromium/base/test/params/ParameterProvider.java",
4484 "test/android/javatests/src/org/chromium/base/test/params/ParameterSet.java",
4485 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedCommandLineFlags.java",
4486 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedFrameworkMethod.java",
4487 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunner.java",
4488 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegate.java",
4489 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegateCommon.java",
4490 "test/android/javatests/src/org/chromium/base/test/params/ParameterizedRunnerDelegateFactory.java",
4491 "test/android/javatests/src/org/chromium/base/test/params/SkipCommandLineParameterization.java",
4492 "test/android/javatests/src/org/chromium/base/test/task/SchedulerTestHelpers.java",
4493 "test/android/javatests/src/org/chromium/base/test/task/ThreadPoolTestHelpers.java",
4494 "test/android/javatests/src/org/chromium/base/test/util/AdvancedMockContext.java",
4495 "test/android/javatests/src/org/chromium/base/test/util/AndroidSdkLevelSkipCheck.java",
4496 "test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessingUtils.java",
4497 "test/android/javatests/src/org/chromium/base/test/util/AnnotationRule.java",
4498 "test/android/javatests/src/org/chromium/base/test/util/ApplicationContextWrapper.java",
4499 "test/android/javatests/src/org/chromium/base/test/util/ApplicationTestUtils.java",
4500 "test/android/javatests/src/org/chromium/base/test/util/Batch.java",
4501 "test/android/javatests/src/org/chromium/base/test/util/CallbackHelper.java",
4502 "test/android/javatests/src/org/chromium/base/test/util/CloseableOnMainThread.java",
4503 "test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java",
4504 "test/android/javatests/src/org/chromium/base/test/util/Criteria.java",
4505 "test/android/javatests/src/org/chromium/base/test/util/CriteriaHelper.java",
4506 "test/android/javatests/src/org/chromium/base/test/util/CriteriaNotSatisfiedException.java",
4507 "test/android/javatests/src/org/chromium/base/test/util/DisableIf.java",
4508 "test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java",
4509 "test/android/javatests/src/org/chromium/base/test/util/DisabledTest.java",
4510 "test/android/javatests/src/org/chromium/base/test/util/DoNotBatch.java",
4511 "test/android/javatests/src/org/chromium/base/test/util/DoNotRevive.java",
4512 "test/android/javatests/src/org/chromium/base/test/util/EnormousTest.java",
4513 "test/android/javatests/src/org/chromium/base/test/util/Feature.java",
4514 "test/android/javatests/src/org/chromium/base/test/util/Features.java",
4515 "test/android/javatests/src/org/chromium/base/test/util/FeaturesBase.java",
4516 "test/android/javatests/src/org/chromium/base/test/util/FlakyTest.java",
4517 "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferences.java",
4518 "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferencesContext.java",
4519 "test/android/javatests/src/org/chromium/base/test/util/InstrumentationUtils.java",
4520 "test/android/javatests/src/org/chromium/base/test/util/IntegrationTest.java",
4521 "test/android/javatests/src/org/chromium/base/test/util/JniMocker.java",
4522 "test/android/javatests/src/org/chromium/base/test/util/LooperUtils.java",
4523 "test/android/javatests/src/org/chromium/base/test/util/Manual.java",
4524 "test/android/javatests/src/org/chromium/base/test/util/Matchers.java",
4525 "test/android/javatests/src/org/chromium/base/test/util/MaxAndroidSdkLevel.java",
4526 "test/android/javatests/src/org/chromium/base/test/util/MetricsUtils.java",
4527 "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevel.java",
4528 "test/android/javatests/src/org/chromium/base/test/util/PackageManagerWrapper.java",
4529 "test/android/javatests/src/org/chromium/base/test/util/PayloadCallbackHelper.java",
4530 "test/android/javatests/src/org/chromium/base/test/util/RequiresRestart.java",
4531 "test/android/javatests/src/org/chromium/base/test/util/Restriction.java",
4532 "test/android/javatests/src/org/chromium/base/test/util/RestrictionSkipCheck.java",
4533 "test/android/javatests/src/org/chromium/base/test/util/ScalableTimeout.java",
4534 "test/android/javatests/src/org/chromium/base/test/util/SkipCheck.java",
4535 "test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java",
4536 "test/android/javatests/src/org/chromium/base/test/util/TimeoutScale.java",
4537 "test/android/javatests/src/org/chromium/base/test/util/TimeoutTimer.java",
4538 "test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java",
4539 "test/android/javatests/src/org/chromium/base/test/util/UserActionTester.java",
4541 annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
4544 android_library("base_java_process_launcher_test_support") {
4547 deps = [ ":base_java" ]
4549 sources = [ "test/android/javatests/src/org/chromium/base/process_launcher/TestChildProcessConnection.java" ]
4552 robolectric_library("base_junit_test_support") {
4554 "//third_party/robolectric/custom_asynctask/java/src/org/chromium/base/task/test/ShadowAsyncTask.java",
4555 "//third_party/robolectric/custom_asynctask/java/src/org/chromium/base/task/test/ShadowAsyncTaskBridge.java",
4556 "test/android/junit/src/org/chromium/base/task/test/BackgroundShadowAsyncTask.java",
4557 "test/android/junit/src/org/chromium/base/task/test/CustomShadowAsyncTask.java",
4558 "test/android/junit/src/org/chromium/base/task/test/ShadowPostTask.java",
4559 "test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java",
4560 "test/android/junit/src/org/chromium/base/test/ShadowBuildInfo.java",
4561 "test/android/junit/src/org/chromium/base/test/util/TestRunnerTestRule.java",
4564 # Make sure robolectric tests have classes filtered out of base_java by
4565 # jar_excluded_patterns.
4566 srcjar_deps = [ "//build/android:native_libraries_gen" ]
4570 ":base_java_test_support",
4571 "//testing/android/junit:junit_test_support",
4572 "//third_party/android_support_test_runner:runner_java",
4573 "//third_party/androidx:androidx_test_core_java",
4574 "//third_party/hamcrest:hamcrest_java",
4575 "//third_party/junit:junit",
4579 robolectric_binary("base_junit_tests") {
4581 "android/junit/src/org/chromium/base/ApplicationStatusTest.java",
4582 "android/junit/src/org/chromium/base/BuildInfoTest.java",
4583 "android/junit/src/org/chromium/base/CallbackControllerTest.java",
4584 "android/junit/src/org/chromium/base/CollectionUtilTest.java",
4585 "android/junit/src/org/chromium/base/DiscardableReferencePoolTest.java",
4586 "android/junit/src/org/chromium/base/FileUtilsTest.java",
4587 "android/junit/src/org/chromium/base/LifetimeAssertTest.java",
4588 "android/junit/src/org/chromium/base/LogTest.java",
4589 "android/junit/src/org/chromium/base/MathUtilsTest.java",
4590 "android/junit/src/org/chromium/base/PiiEliderTest.java",
4591 "android/junit/src/org/chromium/base/PromiseTest.java",
4592 "android/junit/src/org/chromium/base/TimeUtilsTest.java",
4593 "android/junit/src/org/chromium/base/TraceEventTest.java",
4594 "android/junit/src/org/chromium/base/UnownedUserDataHostTest.java",
4595 "android/junit/src/org/chromium/base/UnownedUserDataKeyTest.java",
4596 "android/junit/src/org/chromium/base/jank_tracker/FrameMetricsListenerTest.java",
4597 "android/junit/src/org/chromium/base/jank_tracker/FrameMetricsStoreTest.java",
4598 "android/junit/src/org/chromium/base/jank_tracker/JankActivityTrackerTest.java",
4599 "android/junit/src/org/chromium/base/jank_tracker/JankMetricCalculatorTest.java",
4600 "android/junit/src/org/chromium/base/jank_tracker/JankMetricUMARecorderTest.java",
4601 "android/junit/src/org/chromium/base/jank_tracker/JankReportingRunnableTest.java",
4602 "android/junit/src/org/chromium/base/jank_tracker/JankReportingSchedulerTest.java",
4603 "android/junit/src/org/chromium/base/library_loader/LinkerTest.java",
4604 "android/junit/src/org/chromium/base/memory/MemoryPressureMonitorTest.java",
4605 "android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java",
4606 "android/junit/src/org/chromium/base/metrics/CachingUmaRecorderTest.java",
4607 "android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java",
4608 "android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java",
4609 "android/junit/src/org/chromium/base/supplier/ObservableSupplierImplTest.java",
4610 "android/junit/src/org/chromium/base/supplier/OneShotCallbackTest.java",
4611 "android/junit/src/org/chromium/base/supplier/OneshotSupplierImplTest.java",
4612 "android/junit/src/org/chromium/base/supplier/UnownedUserDataSupplierTest.java",
4613 "android/junit/src/org/chromium/base/task/AsyncTaskThreadTest.java",
4614 "android/junit/src/org/chromium/base/task/SequencedTaskRunnerTaskMigrationTest.java",
4615 "android/junit/src/org/chromium/base/task/TaskTraitsTest.java",
4616 "android/junit/src/org/chromium/base/util/GarbageCollectionTestUtilsUnitTest.java",
4617 "test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java",
4618 "test/android/junit/src/org/chromium/base/test/TestListInstrumentationRunListenerTest.java",
4619 "test/android/junit/src/org/chromium/base/test/params/ExampleParameterizedTest.java",
4620 "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerDelegateCommonTest.java",
4621 "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerDelegateFactoryTest.java",
4622 "test/android/junit/src/org/chromium/base/test/params/ParameterizedRunnerTest.java",
4623 "test/android/junit/src/org/chromium/base/test/params/ParameterizedTestNameTest.java",
4624 "test/android/junit/src/org/chromium/base/test/util/AndroidSdkLevelSkipCheckTest.java",
4625 "test/android/junit/src/org/chromium/base/test/util/AnnotationProcessingUtilsTest.java",
4626 "test/android/junit/src/org/chromium/base/test/util/CommandLineFlagsNoClassAnnotationCheckTest.java",
4627 "test/android/junit/src/org/chromium/base/test/util/CommandLineFlagsWithClassAnnotationCheckTest.java",
4628 "test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java",
4629 "test/android/junit/src/org/chromium/base/test/util/DisabledTestForClassRobolectricTest.java",
4630 "test/android/junit/src/org/chromium/base/test/util/DisabledTestRobolectricTest.java",
4631 "test/android/junit/src/org/chromium/base/test/util/RestrictionSkipCheckTest.java",
4632 "test/android/junit/src/org/chromium/base/test/util/SkipCheckTest.java",
4636 ":base_java_process_launcher_test_support",
4637 ":base_java_test_support",
4638 ":base_junit_test_support",
4639 "//base/test:test_support_java",
4640 "//third_party/androidx:androidx_annotation_annotation_java",
4641 "//third_party/androidx:androidx_test_runner_java",
4642 "//third_party/hamcrest:hamcrest_java",
4646 java_cpp_enum("base_android_java_enums_srcjar") {
4648 "android/application_status_listener.h",
4649 "android/child_process_binding_types.h",
4650 "android/library_loader/library_loader_hooks.h",
4651 "android/linker/modern_linker_jni.h",
4652 "android/task_scheduler/task_runner_android.h",
4653 "memory/memory_pressure_listener.h",
4654 "metrics/histogram_base.h",
4655 "task/task_traits.h",
4657 if (enable_base_tracing) {
4658 sources += [ "trace_event/trace_config.h" ]
4662 generate_jni("base_profiler_test_support_jni_headers") {
4665 [ "android/javatests/src/org/chromium/base/profiler/TestSupport.java" ]
4668 android_library("base_profiler_test_support_java") {
4671 [ "android/javatests/src/org/chromium/base/profiler/TestSupport.java" ]
4673 annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
4677 "//build/android:build_java",
4681 android_library("base_java_unittest_support") {
4690 "test/android/java/src/org/chromium/base/ContentUriTestUtils.java",
4691 "test/android/java/src/org/chromium/base/JavaHandlerThreadHelpers.java",
4696 # Keep the list of fuzzer_tests in alphabetical order.
4697 fuzzer_test("base64_decode_fuzzer") {
4698 sources = [ "base64_decode_fuzzer.cc" ]
4702 fuzzer_test("base64_encode_fuzzer") {
4703 sources = [ "base64_encode_fuzzer.cc" ]
4707 fuzzer_test("base_json_correctness_fuzzer") {
4708 sources = [ "json/json_correctness_fuzzer.cc" ]
4710 dict = "//testing/libfuzzer/fuzzers/dicts/json.dict"
4713 fuzzer_test("base_json_reader_fuzzer") {
4714 sources = [ "json/json_reader_fuzzer.cc" ]
4716 dict = "//testing/libfuzzer/fuzzers/dicts/json.dict"
4719 fuzzer_test("base_json_string_escape_fuzzer") {
4720 sources = [ "json/string_escape_fuzzer.cc" ]
4725 protoc_convert("base_mach_port_rendezvous_convert_corpus") {
4727 "test/data/mach_port_rendezvous_fuzz/dead_name.textproto",
4728 "test/data/mach_port_rendezvous_fuzz/send.textproto",
4730 inputs = [ "//testing/libfuzzer/fuzzers/mach/mach_message.proto" ]
4731 output_pattern = "$target_gen_dir/base_mach_port_rendezvous_corpus/{{source_name_part}}.binarypb"
4733 "--encode=mach_fuzzer.MachMessage",
4736 rebase_path(inputs[0]),
4739 fuzzer_test("base_mach_port_rendezvous_fuzzer") {
4740 sources = [ "mac/mach_port_rendezvous_fuzzer.cc" ]
4743 "//testing/libfuzzer/fuzzers/mach:converter",
4744 "//third_party/libprotobuf-mutator",
4746 seed_corpus = "$target_gen_dir/base_mach_port_rendezvous_corpus"
4747 seed_corpus_deps = [ ":base_mach_port_rendezvous_convert_corpus" ]
4751 fuzzer_test("string_number_conversions_fuzzer") {
4752 sources = [ "strings/string_number_conversions_fuzzer.cc" ]
4756 fuzzer_test("string_tokenizer_fuzzer") {
4757 sources = [ "strings/string_tokenizer_fuzzer.cc" ]
4761 fuzzer_test("time_delta_from_string_fuzzer") {
4762 sources = [ "time/time_delta_from_string_fuzzer.cc" ]
4766 fuzzer_test("time_fuzzer") {
4767 sources = [ "time/time_fuzzer.cc" ]
4770 "//base/test:test_support",
4774 fuzzer_test("utf_string_conversions_fuzzer") {
4775 sources = [ "strings/utf_string_conversions_fuzzer.cc" ]
4779 fuzzer_test("pickle_fuzzer") {
4780 sources = [ "pickle_fuzzer.cc" ]
4783 "//base/test:test_support",
4787 # TODO(1151236): Temporarily move test_support from
4788 # //base/allocator/partition_allocator/BUILD.gn to //base/BUILD.gn. After
4789 # fixing partition_allocator tests issue, we will move test_support to
4790 # //base/allocator/partition_allocator/BUILD.gn again.
4791 source_set("partition_alloc_test_support") {
4795 "allocator/partition_allocator/extended_api.cc",
4796 "allocator/partition_allocator/extended_api.h",
4797 "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_for_testing.h",
4800 sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix_for_testing.cc" ]
4804 "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc",
4805 "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix_for_testing.cc",
4809 sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_win_for_testing.cc" ]
4811 if (is_mac || is_ios) {
4812 sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_mac_for_testing.mm" ]
4814 if (is_linux || is_chromeos) {
4815 sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_linux_for_testing.cc" ]
4818 sources += [ "allocator/partition_allocator/partition_alloc_base/threading/platform_thread_android_for_testing.cc" ]
4821 "allocator/partition_allocator:buildflags",
4822 "//build:branding_buildflags",
4823 "//build/config/compiler:compiler_buildflags",
4828 "//third_party/fuchsia-sdk/sdk/pkg/fit",
4829 "//third_party/fuchsia-sdk/sdk/pkg/sync",
4830 "//third_party/fuchsia-sdk/sdk/pkg/zx",
4833 # Needed for users of spinning_mutex.h, which for performance reasons,
4834 # contains inlined calls to `libsync` inside the header file.
4835 # It appends an entry to the "libs" section of the dependent target.
4836 public_configs += [ ":fuchsia_sync_lib" ]
4841 configs -= [ "//build/config/compiler:default_optimization" ]
4842 configs += [ "//build/config/compiler:optimize_speed" ]