• Home
Name Date Size #Lines LOC

..--

allocator/04-Jul-2025-80,28853,833

android/04-Jul-2025-59,56139,047

apple/04-Jul-2025-7,0914,895

containers/04-Jul-2025-25,25417,008

debug/04-Jul-2025-11,6907,585

files/04-Jul-2025-31,03721,323

fuchsia/04-Jul-2025-4,8433,175

functional/04-Jul-2025-8,7405,732

hash/04-Jul-2025-2,0391,286

i18n/04-Jul-2025-9,3256,273

ios/04-Jul-2025-1,8541,313

json/04-Jul-2025-6,6034,734

logging/04-Jul-2025-241153

mac/04-Jul-2025-4,7053,398

macros/04-Jul-2025-10943

memory/04-Jul-2025-19,48112,550

message_loop/04-Jul-2025-12,2227,872

metrics/04-Jul-2025-27,62117,601

nix/04-Jul-2025-1,6781,164

numerics/04-Jul-2025-5,2793,671

posix/04-Jul-2025-1,7281,099

power_monitor/04-Jul-2025-4,1292,726

process/04-Jul-2025-17,30111,490

profiler/04-Jul-2025-17,02811,212

ranges/04-Jul-2025-7,1044,033

sampling_heap_profiler/04-Jul-2025-2,4731,595

strings/04-Jul-2025-17,47911,849

substring_set_matcher/04-Jul-2025-1,301780

synchronization/04-Jul-2025-5,9183,714

system/04-Jul-2025-3,4122,362

task/04-Jul-2025-60,83040,744

test/04-Jul-2025-57,92538,579

third_party/04-Jul-2025-12,3657,835

threading/04-Jul-2025-21,56113,564

time/04-Jul-2025-8,2085,244

timer/04-Jul-2025-3,0511,944

trace_event/04-Jul-2025-27,64619,495

tracing/04-Jul-2025-8,0965,957

types/04-Jul-2025-9,4086,483

version_info/04-Jul-2025-411243

win/04-Jul-2025-31,85222,297

Android.bpD04-Jul-2025175.9 KiB4,5514,488

DEPSD04-Jul-20251.4 KiB4641

DIR_METADATAD04-Jul-202590 76

PRESUBMIT.pyD04-Jul-20255.7 KiB160125

README.mdD04-Jul-20254.2 KiB8874

at_exit.ccD04-Jul-20253.2 KiB11372

at_exit.hD04-Jul-20252.8 KiB8939

at_exit_unittest.ccD04-Jul-20252.4 KiB8864

atomic_ref_count.hD04-Jul-20252.7 KiB7632

atomic_sequence_num.hD04-Jul-2025992 3215

atomicops.hD04-Jul-20256.5 KiB15457

atomicops_internals_atomicword_compat.hD04-Jul-20253.3 KiB9560

atomicops_internals_portable.hD04-Jul-20257.5 KiB196132

atomicops_unittest.ccD04-Jul-20257.4 KiB242171

auto_reset.hD04-Jul-20252.3 KiB7037

auto_reset_unittest.ccD04-Jul-2025822 3420

barrier_callback.hD04-Jul-20254 KiB12069

barrier_callback_unittest.ccD04-Jul-20255.2 KiB168121

barrier_closure.ccD04-Jul-20251.5 KiB6042

barrier_closure.hD04-Jul-2025930 299

barrier_closure_unittest.ccD04-Jul-20252.8 KiB8961

base64.ccD04-Jul-20254.4 KiB12776

base64.hD04-Jul-20251.7 KiB5826

base64_decode_fuzzer.ccD04-Jul-2025453 169

base64_encode_fuzzer.ccD04-Jul-2025905 2814

base64_unittest.ccD04-Jul-20255.8 KiB175112

base64url.ccD04-Jul-20254.6 KiB154106

base64url.hD04-Jul-20252.2 KiB6832

base64url_fuzzer.ccD04-Jul-20252 KiB6244

base64url_unittest.ccD04-Jul-20256.9 KiB202135

base_export.hD04-Jul-2025699 3020

base_paths.ccD04-Jul-20253.7 KiB11491

base_paths.hD04-Jul-20254.3 KiB10041

base_paths_android.ccD04-Jul-20252.3 KiB7147

base_paths_android.hD04-Jul-2025661 2611

base_paths_apple.ccD04-Jul-20251.8 KiB5128

base_paths_apple.hD04-Jul-2025711 239

base_paths_fuchsia.ccD04-Jul-20251.7 KiB5733

base_paths_ios.hD04-Jul-2025624 2610

base_paths_ios.mmD04-Jul-20252.1 KiB7056

base_paths_mac.hD04-Jul-2025629 2610

base_paths_mac.mmD04-Jul-20252.3 KiB7162

base_paths_posix.ccD04-Jul-20253.1 KiB10282

base_paths_posix.hD04-Jul-2025837 2910

base_paths_win.ccD04-Jul-20258.5 KiB232192

base_paths_win.hD04-Jul-20253.3 KiB6629

base_switches.ccD04-Jul-20258.5 KiB18651

base_switches.hD04-Jul-20251.9 KiB6952

big_endian.hD04-Jul-2025640 2513

big_endian_perftest.ccD04-Jul-20254.7 KiB142115

bit_cast.hD04-Jul-20251.7 KiB4626

bit_cast_unittest.ccD04-Jul-2025558 3220

bits.hD04-Jul-20255.3 KiB15172

bits_unittest.ccD04-Jul-20256.3 KiB161131

build_time.hD04-Jul-20251.2 KiB3710

build_time_unittest.ccD04-Jul-20251,022 3424

callback_list.ccD04-Jul-20251,007 4024

callback_list.hD04-Jul-202512.8 KiB349161

callback_list_nocompile.ncD04-Jul-20251.4 KiB5038

callback_list_unittest.ccD04-Jul-202517.5 KiB581391

cancelable_callback.hD04-Jul-20255.2 KiB15977

cancelable_callback_unittest.ccD04-Jul-20257.9 KiB266163

check.ccD04-Jul-202515.6 KiB440340

check.hD04-Jul-202512.5 KiB321163

check_deref.hD04-Jul-20251.6 KiB5626

check_example.ccD04-Jul-20251.2 KiB4221

check_is_test.ccD04-Jul-20251.2 KiB3818

check_is_test.hD04-Jul-20251.8 KiB5412

check_is_test_unittest.ccD04-Jul-2025451 165

check_nocompile.ncD04-Jul-2025635 1813

check_op.ccD04-Jul-20252.7 KiB11283

check_op.hD04-Jul-202511.9 KiB285183

check_unittest.ccD04-Jul-202530.1 KiB826615

check_version_internal.h.inD04-Jul-2025444 149

command_line.ccD04-Jul-202525.3 KiB750582

command_line.hD04-Jul-202515.1 KiB355137

command_line_fuzzer.ccD04-Jul-20254.1 KiB143111

command_line_unittest.ccD04-Jul-202530.4 KiB856704

compiler_specific.hD04-Jul-202538.9 KiB1,071245

component_export.hD04-Jul-20253.5 KiB7732

component_export_unittest.ccD04-Jul-20252 KiB8355

cpu.ccD04-Jul-202510.9 KiB327223

cpu.hD04-Jul-20255.7 KiB179131

cpu_reduction_experiment.ccD04-Jul-20252.2 KiB7846

cpu_reduction_experiment.hD04-Jul-20251.1 KiB309

cpu_unittest.ccD04-Jul-20256.7 KiB199119

critical_closure.hD04-Jul-20254.8 KiB13278

critical_closure_internal_ios.mmD04-Jul-20251.1 KiB4129

dcheck_is_on.hD04-Jul-2025537 2314

enterprise_util.ccD04-Jul-2025310 146

enterprise_util.hD04-Jul-20252.2 KiB6627

enterprise_util_mac.mmD04-Jul-20258 KiB224191

enterprise_util_mac_unittest.mmD04-Jul-2025559 1912

enterprise_util_win.ccD04-Jul-20251 KiB3012

environment.ccD04-Jul-20253.9 KiB13193

environment.hD04-Jul-20251.7 KiB6133

environment_unittest.ccD04-Jul-20252.8 KiB10359

export_template.hD04-Jul-20256.3 KiB14839

feature_list.ccD04-Jul-202538.1 KiB1,045741

feature_list.hD04-Jul-202536.2 KiB750238

feature_list_unittest.ccD04-Jul-202544.5 KiB1,044796

feature_visitor.hD04-Jul-20251.8 KiB6031

features.ccD04-Jul-20255.3 KiB15297

features.hD04-Jul-20252 KiB6030

file_descriptor_posix.ccD04-Jul-2025913 3420

file_descriptor_posix.hD04-Jul-20252 KiB5520

file_descriptor_store.ccD04-Jul-20252.2 KiB7453

file_descriptor_store.hD04-Jul-20252.3 KiB7441

file_version_info.hD04-Jul-20252.4 KiB7038

file_version_info_apple.hD04-Jul-20251.4 KiB4527

file_version_info_apple.mmD04-Jul-20252.9 KiB9879

file_version_info_win.ccD04-Jul-20256 KiB201151

file_version_info_win.hD04-Jul-20252.6 KiB7947

file_version_info_win_unittest.ccD04-Jul-20255.9 KiB175132

format_macros.hD04-Jul-20251.9 KiB7542

gmock_unittest.ccD04-Jul-20253.8 KiB13685

gtest_prod_util.hD04-Jul-20251.9 KiB6813

immediate_crash.hD04-Jul-20257.4 KiB19875

immediate_crash_unittest.ccD04-Jul-20259.4 KiB259154

lazy_instance.hD04-Jul-20257.6 KiB21499

lazy_instance_helpers.ccD04-Jul-20252.7 KiB6936

lazy_instance_helpers.hD04-Jul-20254.5 KiB10141

lazy_instance_unittest.ccD04-Jul-202510 KiB323230

libcpp_hardening_test.ccD04-Jul-20252.6 KiB6629

linux_util.ccD04-Jul-20256.5 KiB235179

linux_util.hD04-Jul-20252.6 KiB6624

linux_util_unittest.ccD04-Jul-20252.6 KiB7764

location.ccD04-Jul-20254.8 KiB146103

location.hD04-Jul-20254.1 KiB11253

location_unittest.ccD04-Jul-20251.5 KiB4629

logging.ccD04-Jul-202544.4 KiB1,336940

logging.hD04-Jul-202530.2 KiB754320

logging_chromeos.ccD04-Jul-20253.2 KiB9164

logging_nocompile.ncD04-Jul-20251.6 KiB4134

logging_unittest.ccD04-Jul-202533.8 KiB1,056755

logging_win.ccD04-Jul-20254.3 KiB14696

logging_win.hD04-Jul-20252.5 KiB8541

moving_window.hD04-Jul-202521 KiB718467

moving_window_unittest.ccD04-Jul-20256.5 KiB210179

native_library.ccD04-Jul-2025438 168

native_library.hD04-Jul-20254.5 KiB13067

native_library_apple.mmD04-Jul-20253 KiB11196

native_library_fuchsia.ccD04-Jul-20253.4 KiB11186

native_library_posix.ccD04-Jul-20252.3 KiB7650

native_library_unittest.ccD04-Jul-20256.2 KiB187123

native_library_win.ccD04-Jul-20256.2 KiB189128

no_destructor.hD04-Jul-20255.3 KiB14440

no_destructor_nocompile.ncD04-Jul-20251.1 KiB2921

no_destructor_unittest.ccD04-Jul-20257.5 KiB230145

not_fatal_until.hD04-Jul-20251.8 KiB10489

notimplemented.hD04-Jul-20251.3 KiB3521

notreached.hD04-Jul-20251.9 KiB5125

observer_list.hD04-Jul-202513.8 KiB437243

observer_list_internal.ccD04-Jul-2025666 2112

observer_list_internal.hD04-Jul-20256 KiB182127

observer_list_nocompile.ncD04-Jul-20251.8 KiB5341

observer_list_perftest.ccD04-Jul-20254.2 KiB13193

observer_list_threadsafe.ccD04-Jul-2025868 2915

observer_list_threadsafe.hD04-Jul-202512.7 KiB334207

observer_list_threadsafe_unittest.ccD04-Jul-202519.2 KiB600420

observer_list_types.ccD04-Jul-2025401 178

observer_list_types.hD04-Jul-20251.5 KiB4821

observer_list_unittest.ccD04-Jul-202531.4 KiB1,146870

one_shot_event.ccD04-Jul-20252.8 KiB9364

one_shot_event.hD04-Jul-20254.1 KiB10640

one_shot_event_unittest.ccD04-Jul-20255.2 KiB175136

os_compat_android.ccD04-Jul-20251.1 KiB4430

os_compat_android.hD04-Jul-2025405 179

os_compat_nacl.ccD04-Jul-2025561 3121

os_compat_nacl.hD04-Jul-2025395 177

parameter_pack.hD04-Jul-20252.3 KiB8149

parameter_pack_unittest.ccD04-Jul-20252.6 KiB7457

path_service.ccD04-Jul-20259.8 KiB385279

path_service.hD04-Jul-20253.6 KiB9431

path_service_unittest.ccD04-Jul-202518 KiB493358

pending_task.ccD04-Jul-20252.4 KiB7755

pending_task.hD04-Jul-20254 KiB11158

pickle.ccD04-Jul-202513.7 KiB495389

pickle.hD04-Jul-202516.3 KiB411192

pickle_fuzzer.ccD04-Jul-20253.5 KiB136121

pickle_unittest.ccD04-Jul-202518.7 KiB668477

rand_util.ccD04-Jul-20256.5 KiB205134

rand_util.hD04-Jul-20257.8 KiB239107

rand_util_fuchsia.ccD04-Jul-20251.6 KiB6940

rand_util_nacl.ccD04-Jul-2025613 2717

rand_util_perftest.ccD04-Jul-20251.8 KiB5940

rand_util_posix.ccD04-Jul-20256.2 KiB214142

rand_util_unittest.ccD04-Jul-202514.9 KiB442282

rand_util_win.ccD04-Jul-20252.7 KiB10565

run_loop.ccD04-Jul-202511.3 KiB348226

run_loop.hD04-Jul-202514 KiB352137

run_loop_nocompile.ncD04-Jul-2025871 2014

run_loop_unittest.ccD04-Jul-202522.7 KiB670472

safe_numerics_unittest.ccD04-Jul-202587.4 KiB1,9431,638

scoped_add_feature_flags.ccD04-Jul-20253.1 KiB9477

scoped_add_feature_flags.hD04-Jul-20252.2 KiB6435

scoped_add_feature_flags_unittest.ccD04-Jul-20253.5 KiB8967

scoped_clear_last_error.hD04-Jul-20251.6 KiB5630

scoped_clear_last_error_unittest.ccD04-Jul-20251.2 KiB5843

scoped_clear_last_error_win.ccD04-Jul-2025473 2111

scoped_environment_variable_override.ccD04-Jul-20251.6 KiB5137

scoped_environment_variable_override.hD04-Jul-20251.5 KiB4730

scoped_generic.hD04-Jul-202510.7 KiB313147

scoped_generic_unittest.ccD04-Jul-20256.9 KiB322229

scoped_multi_source_observation.hD04-Jul-20253.7 KiB11352

scoped_multi_source_observation_unittest.ccD04-Jul-20256.4 KiB227172

scoped_native_library.ccD04-Jul-20251.2 KiB4125

scoped_native_library.hD04-Jul-20252 KiB6530

scoped_native_library_unittest.ccD04-Jul-20251.7 KiB4930

scoped_observation.hD04-Jul-20254.7 KiB14941

scoped_observation_traits.hD04-Jul-20252.6 KiB8123

scoped_observation_unittest.ccD04-Jul-20258.2 KiB298217

security_unittest.ccD04-Jul-20253.9 KiB11572

sequence_checker.ccD04-Jul-2025771 3019

sequence_checker.hD04-Jul-20255 KiB13448

sequence_checker_impl.ccD04-Jul-20256.8 KiB205125

sequence_checker_impl.hD04-Jul-20253.6 KiB9439

sequence_checker_nocompile.ncD04-Jul-20251.1 KiB4732

sequence_checker_unittest.ccD04-Jul-202517.1 KiB534371

sequence_token.ccD04-Jul-20252.9 KiB10677

sequence_token.hD04-Jul-20254.6 KiB13257

sequence_token_unittest.ccD04-Jul-20254.9 KiB163115

stack_canary_linux.ccD04-Jul-20253.9 KiB11472

stack_canary_linux.hD04-Jul-20251.3 KiB338

stack_canary_linux_unittest.ccD04-Jul-20251.5 KiB4624

state_transitions.hD04-Jul-20253.3 KiB10136

state_transitions_unittest.ccD04-Jul-20253.8 KiB10176

std_clamp_unittest.ccD04-Jul-20251.2 KiB4833

stl_util.hD04-Jul-20253.4 KiB10871

stl_util_unittest.ccD04-Jul-20255.6 KiB237203

supports_user_data.ccD04-Jul-20254.8 KiB14697

supports_user_data.hD04-Jul-20253.3 KiB9853

supports_user_data_unittest.ccD04-Jul-20254.9 KiB155109

sync_socket.ccD04-Jul-2025829 3216

sync_socket.hD04-Jul-20254.7 KiB13763

sync_socket_nacl.ccD04-Jul-20251.7 KiB7653

sync_socket_posix.ccD04-Jul-20256.3 KiB214147

sync_socket_unittest.ccD04-Jul-20255.8 KiB199141

sync_socket_win.ccD04-Jul-202510.9 KiB325232

sys_byteorder.hD04-Jul-20251.7 KiB7653

sys_byteorder_unittest.ccD04-Jul-20251.8 KiB7660

syslog_logging.ccD04-Jul-20255 KiB184130

syslog_logging.hD04-Jul-20251.9 KiB5730

thread_annotations.hD04-Jul-20259.7 KiB26463

thread_annotations_nocompile.ncD04-Jul-20251.7 KiB6249

thread_annotations_unittest.ccD04-Jul-20251.2 KiB6044

token.ccD04-Jul-20252.2 KiB8558

token.hD04-Jul-20252.9 KiB9044

token_unittest.ccD04-Jul-20253 KiB9264

tools_sanity_unittest.ccD04-Jul-202514.2 KiB467323

traits_bag.hD04-Jul-20259.4 KiB247108

traits_bag_nocompile.ncD04-Jul-20252.3 KiB5338

traits_bag_unittest.ccD04-Jul-20256.5 KiB218152

tuple.hD04-Jul-20254.1 KiB11362

tuple_unittest.ccD04-Jul-20252.8 KiB11178

unguessable_token.ccD04-Jul-20252.3 KiB7649

unguessable_token.hD04-Jul-20255.5 KiB14967

unguessable_token_unittest.ccD04-Jul-20257.1 KiB217166

unsafe_buffers_nocompile.ncD04-Jul-2025710 2619

unsafe_buffers_unittest.ccD04-Jul-2025955 3619

uuid.ccD04-Jul-20254.8 KiB172112

uuid.hD04-Jul-20254.4 KiB11749

uuid_unittest.ccD04-Jul-20256.9 KiB221170

value_iterators.ccD04-Jul-20253.1 KiB12985

value_iterators.hD04-Jul-20254.5 KiB14189

value_iterators_unittest.ccD04-Jul-20256.8 KiB247184

values.ccD04-Jul-202540.1 KiB1,4251,093

values.hD04-Jul-202546.5 KiB1,138526

values_nocompile.ncD04-Jul-20254.7 KiB11689

values_unittest.ccD04-Jul-202568.2 KiB2,3311,858

version.ccD04-Jul-20256 KiB201138

version.hD04-Jul-20252.7 KiB8237

version_unittest.ccD04-Jul-20256.2 KiB244211

vlog.ccD04-Jul-20255.6 KiB185146

vlog.hD04-Jul-20253.3 KiB10040

vlog_unittest.ccD04-Jul-20257.4 KiB189144

write_build_date_header.pyD04-Jul-20251.3 KiB3827

README.md

1# What is this
2Contains a written down set of principles and other information on //base.
3Please add to it!
4
5## About //base:
6
7Chromium is a very mature project. Most things that are generally useful are
8already here and things not here aren't generally useful.
9
10The bar for adding stuff to base is that it must have demonstrated wide
11applicability. Prefer to add things closer to where they're used (i.e. "not
12base"), and pull into base only when needed. In a project our size,
13sometimes even duplication is OK and inevitable.
14
15Adding a new logging macro `DPVELOG_NE` is not more clear than just
16writing the stuff you want to log in a regular logging statement, even
17if it makes your calling code longer. Just add it to your own code.
18
19If the code in question does not need to be used inside base, but will have
20multiple consumers across the codebase, consider placing it in a new directory
21under components/ instead.
22
23base is written for the Chromium project and is not intended to be used
24outside it.  Using base outside of src.git is explicitly not supported,
25and base makes no guarantees about API (or even ABI) stability (like all
26other code in Chromium).  New code that depends on base/ must be in
27src.git. Code that's not in src.git but pulled in through DEPS (for
28example, v8) cannot use base.
29
30## Qualifications for being in //base OWNERS
31  * interest and ability to learn low level/high detail/complex c++ stuff
32  * inclination to always ask why and understand everything (including external
33    interactions like win32) rather than just hoping the author did it right
34  * mentorship/experience
35  * demonstrated good judgement (esp with regards to public APIs) over a length
36    of time
37
38Owners are added when a contributor has shown the above qualifications and
39when they express interest. There isn't an upper bound on the number of OWNERS.
40
41## Design and naming
42  * Be sure to use the base namespace.
43  * STL-like constructs should adhere as closely to STL as possible. Functions
44    and behaviors not present in STL should only be added when they are related
45    to the specific data structure implemented by the container.
46  * For STL-like constructs our policy is that they should use STL-like naming
47    even when it may conflict with the style guide. So functions and class names
48    should be lower case with underscores. Non-STL-like classes and functions
49    should use Google naming.
50
51## Performance testing
52
53Since the primitives provided by //base are used very widely, it is important to
54ensure they scale to the necessary workloads and perform well under all
55supported platforms. The `base_perftests` target is a suite of
56synthetic microbenchmarks that measure performance in various scenarios:
57
58  * BasicPostTaskPerfTest: Exercises MessageLoopTaskRunner's multi-threaded
59    queue in isolation.
60  * ConditionVariablePerfTest: Measures thread switching cost of condition
61    variables.
62  * IntegratedPostTaskPerfTest: Exercises the full MessageLoop/RunLoop
63    machinery.
64  * JSONPerfTest: Tests JSONWriter and JSONReader performance.
65  * MessageLoopPerfTest: Measures the speed of task posting in various
66    configurations.
67  * ObserverListPerfTest: Exercises adding, removing and signalling observers.
68  * PartitionLockPerfTest: Tests the implementation of Lock used in
69    PartitionAlloc
70  * PthreadEventPerfTest: Establishes the baseline thread switching cost using
71    pthreads.
72  * RandUtilPerfTest: Measures the time it takes to generate random numbers.
73  * ScheduleWorkTest: Measures the overhead of MessagePump::ScheduleWork.
74  * SequenceManagerPerfTest: Benchmarks SequenceManager scheduling with various
75    underlying task runners.
76  * TaskObserverPerfTest: Measures the incremental cost of adding task
77    observers.
78  * TaskPerfTest: Checks the cost of posting tasks between threads.
79  * ThreadLocalStoragePerfTest: Exercises different mechanisms for accessing
80    data associated with the current thread (C++ `thread_local`, the
81    implementation in //base, the POSIX/WinAPI directly)
82  * WaitableEvent{Thread,}PerfTest: Measures waitable events in single and
83    multithreaded scenarios.
84
85Regressions in these benchmarks can generally by caused by 1) operating system
86changes, 2) compiler version or flag changes or 3) changes in //base code
87itself.
88