├── fuchsia ├── __init__.py ├── sdk-bucket.txt ├── linux_internal.sdk.sha1 ├── sdk-hash-files.list ├── cipd │ ├── build_id.template │ ├── DIR_METADATA │ └── README.md ├── test │ ├── .style.yapf │ ├── OWNERS │ ├── .coveragerc │ └── pylintrc ├── DIR_METADATA ├── COMMON_METADATA ├── OWNERS └── SECURITY_OWNERS ├── util ├── lib │ ├── __init__.py │ ├── common │ │ ├── __init__.py │ │ ├── perf_result_data_type.py │ │ └── PRESUBMIT.py │ └── results │ │ ├── __init__.py │ │ └── result_types.py ├── LASTCHANGE.dummy ├── version.gni ├── chromium_git_revision.h.in └── lastchange.gni ├── android ├── gyp │ ├── proto │ │ ├── __init__.py │ │ └── README.md │ ├── OWNERS │ ├── util │ │ └── __init__.py │ ├── aar.pydeps │ ├── zip.pydeps │ ├── aidl.pydeps │ ├── ijar.pydeps │ ├── copy_ex.pydeps │ ├── filter_zip.pydeps │ ├── flatc_java.pydeps │ ├── dexsplitter.pydeps │ ├── dex_jdk_libs.pydeps │ ├── dist_aar.pydeps │ ├── jacoco_instr.pydeps │ ├── gcc_preprocess.pydeps │ ├── bytecode_rewriter.pydeps │ ├── lint.pydeps │ ├── optimize_resources.pydeps │ ├── system_image_apks.pydeps │ ├── java_cpp_enum.pydeps │ ├── merge_manifest.pydeps │ ├── allot_native_libraries.pydeps │ ├── java_cpp_strings.pydeps │ ├── process_native_prebuilt.pydeps │ ├── bytecode_processor.pydeps │ ├── dex.pydeps │ ├── java_cpp_features.pydeps │ ├── create_java_binary_script.pydeps │ ├── assert_static_initializers.pydeps │ ├── create_apk_operations_script.pydeps │ ├── create_bundle_wrapper_script.pydeps │ ├── write_native_libraries_java.pydeps │ ├── apkbuilder.pydeps │ ├── check_flag_expectations.pydeps │ ├── create_size_info_files.pydeps │ ├── trace_event_bytecode_rewriter.pydeps │ ├── create_test_apk_wrapper_script.pydeps │ ├── generate_linker_version_script.pydeps │ ├── java_google_api_keys.pydeps │ ├── test │ │ ├── BUILD.gn │ │ └── java │ │ │ └── org │ │ │ └── chromium │ │ │ └── helloworld │ │ │ ├── HelloWorldPrinter.java │ │ │ └── HelloWorldMain.java │ ├── validate_static_library_dex_references.pydeps │ └── proguard.pydeps ├── pylib │ ├── device │ │ ├── __init__.py │ │ └── commands │ │ │ └── BUILD.gn │ ├── monkey │ │ └── __init__.py │ ├── symbols │ │ ├── __init__.py │ │ └── mock_addr2line │ │ │ └── __init__.py │ ├── utils │ │ ├── __init__.py │ │ └── local_utils.py │ ├── gtest │ │ ├── filter │ │ │ ├── OWNERS │ │ │ ├── breakpad_unittests_disabled │ │ │ ├── base_unittests_emulator_additional_disabled │ │ │ └── base_unittests_disabled │ │ └── __init__.py │ ├── local │ │ ├── emulator │ │ │ ├── OWNERS │ │ │ ├── __init__.py │ │ │ └── proto │ │ │ │ └── __init__.py │ │ ├── __init__.py │ │ ├── device │ │ │ └── __init__.py │ │ └── machine │ │ │ ├── __init__.py │ │ │ └── local_machine_environment.py │ ├── dex │ │ └── __init__.py │ ├── base │ │ ├── __init__.py │ │ ├── test_exception.py │ │ ├── mock_environment.py │ │ ├── mock_test_instance.py │ │ ├── test_server.py │ │ ├── output_manager_test_case.py │ │ └── output_manager_factory.py │ ├── junit │ │ └── __init__.py │ ├── output │ │ ├── __init__.py │ │ └── noop_output_manager_test.py │ ├── results │ │ ├── __init__.py │ │ ├── presentation │ │ │ └── __init__.py │ │ └── flakiness_dashboard │ │ │ └── __init__.py │ ├── android │ │ └── __init__.py │ ├── instrumentation │ │ └── __init__.py │ ├── restart_adbd.sh │ └── pexpect.py ├── COMMON_METADATA ├── DIR_METADATA ├── gradle │ ├── OWNERS │ ├── manifest.jinja │ ├── root.jinja │ ├── AndroidManifest.xml │ └── cmake.jinja ├── chromium-debug.keystore ├── tests │ └── symbolize │ │ ├── liba.so │ │ ├── libb.so │ │ ├── b.cc │ │ ├── a.cc │ │ └── Makefile ├── CheckInstallApk-debug.apk ├── java │ ├── test │ │ ├── missing_symbol │ │ │ ├── c.jar │ │ │ ├── B.java │ │ │ ├── D.template │ │ │ ├── sub │ │ │ │ ├── SubB.java │ │ │ │ └── BInMethodSignature.java │ │ │ ├── ImportsSubB.java │ │ │ └── Importer.template │ │ ├── NoSignatureChangeIncrementalJavacTestHelper2.java │ │ ├── NewApiLintTest.java │ │ ├── DefaultLocaleLintTest.java │ │ └── NoSignatureChangeIncrementalJavacTestHelper.template │ └── src │ │ └── org │ │ └── chromium │ │ └── base │ │ └── annotations │ │ ├── DoNotClassMerge.java │ │ ├── MockedInTests.java │ │ └── DoNotInline.java ├── stacktrace │ ├── java_deobfuscate_java.jar │ ├── BUILD.gn │ └── README.md ├── OWNERS ├── incremental_install │ ├── __init__.py │ ├── write_installer_json.pydeps │ ├── java │ │ └── org │ │ │ └── chromium │ │ │ └── incrementalinstall │ │ │ ├── SecondInstrumentation.java │ │ │ └── BootstrapInstrumentation.java │ └── BUILD.gn ├── native_flags │ ├── empty.cc │ └── argcapture.py ├── junit │ ├── res │ │ └── values │ │ │ └── strings.xml │ └── AndroidManifest_mergetest.xml ├── android_only_jni_exports.lst ├── adb_profile_chrome ├── adb_profile_chrome_startup ├── android_only_explicit_jni_exports.lst ├── screenshot.py ├── video_recorder.py ├── dcheck_is_off.flags ├── AndroidManifest.xml ├── pylintrc ├── adb_chrome_public_command_line ├── test │ └── nocompile_gn │ │ └── nocompile_sources.gni ├── gtest_apk │ └── BUILD.gn ├── adb_system_webview_command_line ├── docs │ └── README.md ├── bytecode │ └── java │ │ └── org │ │ └── chromium │ │ └── bytecode │ │ └── MethodDescription.java ├── test_wrapper │ └── logdog_wrapper.pydeps └── unused_resources │ └── BUILD.gn ├── chromeos ├── OWNERS ├── .style.yapf └── pylintrc ├── config ├── profiling │ ├── OWNERS │ └── profiling.gni ├── coverage │ └── OWNERS ├── ios │ ├── OWNERS │ ├── entitlements.plist │ ├── resources │ │ └── XCTRunnerAddition+Info.plist │ ├── ios_sdk_overrides.gni │ ├── dummy.py │ ├── xctest_shell.mm │ └── write_framework_modulemap.py ├── mac │ ├── OWNERS │ ├── BuildInfo.plist │ └── mac_sdk_overrides.gni ├── android │ ├── OWNERS │ ├── DIR_METADATA │ ├── test │ │ ├── classpath_order │ │ │ └── java │ │ │ │ ├── src │ │ │ │ └── org │ │ │ │ │ └── chromium │ │ │ │ │ └── build │ │ │ │ │ └── classpath_order │ │ │ │ │ └── Dummy.java.jinja2 │ │ │ │ └── res_template │ │ │ │ └── values │ │ │ │ └── values.xml │ │ ├── proto │ │ │ ├── root │ │ │ │ ├── absolute_child.proto │ │ │ │ ├── relative_child.proto │ │ │ │ ├── relative_root.proto │ │ │ │ └── absolute_root.proto │ │ │ ├── absolute_dep │ │ │ │ └── absolute_dep.proto │ │ │ └── relative_dep │ │ │ │ └── relative_dep.proto │ │ └── resource_overlay │ │ │ └── java │ │ │ └── res_template │ │ │ └── values │ │ │ └── values.xml │ ├── sdk.gni │ └── channel.gni ├── apple │ └── OWNERS ├── linux │ ├── OWNERS │ ├── pangocairo │ │ ├── pangocairo.gni │ │ └── BUILD.gn │ ├── gtk │ │ └── gtk.gni │ ├── dbus │ │ └── BUILD.gn │ ├── libva │ │ └── BUILD.gn │ ├── nss │ │ └── BUILD.gn │ ├── libffi │ │ └── BUILD.gn │ └── dri │ │ └── BUILD.gn ├── sanitizers │ └── OWNERS ├── freetype │ ├── OWNERS │ ├── BUILD.gn │ └── freetype.gni ├── fuchsia │ ├── DIR_METADATA │ ├── test │ │ ├── logger.shard.test-cml │ │ ├── read_debug_data.test-cmx │ │ ├── chromium_test_facet.shard.test-cml │ │ ├── jit_capabilities.test-cmx │ │ ├── web_instance_host_capabilities.test-cmx │ │ ├── elf_test_runner.shard.test-cml │ │ ├── elf_test_ambient_exec_runner.shard.test-cml │ │ ├── vulkan_capabilities.test-cmx │ │ ├── audio_output.shard.test-cml │ │ ├── network.shard.test-cml │ │ ├── font_capabilities.test-cmx │ │ ├── OWNERS │ │ ├── audio_capabilities.test-cmx │ │ ├── fonts.shard.test-cml │ │ ├── test_fonts.shard.test-cml │ │ ├── context_provider.shard.test-cml │ │ └── present_view_capabilities.test-cmx │ ├── OWNERS │ ├── rules.gni │ └── config.gni ├── chromecast │ └── OWNERS ├── rts.gni ├── OWNERS ├── chromebox_for_meetings │ ├── buildflags.gni │ └── BUILD.gn ├── get_host_byteorder.py ├── clang │ └── clang.gni ├── compute_inputs_for_analyze.gni ├── pch.gni ├── buildflags_paint_preview.gni ├── win │ └── console_app.gni └── chrome_build.gni ├── ios ├── OWNERS └── extension_bundle_data.gni ├── mac └── OWNERS ├── skia_gold_common ├── OWNERS ├── .style.yapf ├── __init__.py └── README.md ├── ciopfs.sha1 ├── toolchain ├── apple │ ├── OWNERS │ ├── .style.yapf │ ├── get_tool_mtime.py │ └── BUILD.gn ├── ios │ └── OWNERS ├── mac │ └── OWNERS ├── android │ ├── OWNERS │ └── DIR_METADATA ├── fuchsia │ ├── OWNERS │ └── DIR_METADATA ├── win │ └── rc │ │ ├── .gitignore │ │ ├── mac │ │ └── rc.sha1 │ │ ├── linux64 │ │ └── rc.sha1 │ │ └── win │ │ └── rc.exe.sha1 ├── OWNERS ├── kythe.gni ├── get_cpu_count.py ├── aix │ └── BUILD.gn ├── BUILD.gn └── freebsd │ └── BUILD.gn ├── args └── OWNERS ├── linux ├── libncursesw │ ├── OWNERS │ └── DIR_METADATA ├── OWNERS ├── sysroot_scripts │ ├── keyring.gpg │ ├── libxcomposite1-symbols │ └── update-archive-timestamp.sh ├── unbundle │ ├── crc32c.gn │ ├── fontconfig.gn │ ├── libavif.gn │ ├── libxslt.gn │ ├── libXNVCtrl.gn │ ├── libevent.gn │ ├── libjpeg.gn │ ├── absl_random.gn │ ├── woff2.gn │ ├── absl_functional.gn │ ├── absl_time.gn │ ├── absl_memory.gn │ ├── absl_cleanup.gn │ ├── absl_hash.gn │ ├── absl_meta.gn │ ├── snappy.gn │ ├── dav1d.gn │ ├── swiftshader-SPIRV-Headers.gn │ ├── libdrm.gn │ ├── absl_algorithm.gn │ ├── vulkan-SPIRV-Headers.gn │ ├── absl_synchronization.gn │ ├── libpng.gn │ ├── jsoncpp.gn │ ├── harfbuzz-ng.gn │ ├── double-conversion.gn │ ├── absl_numeric.gn │ ├── freetype.gn │ ├── flac.gn │ ├── brotli.gn │ ├── re2.gn │ ├── libwebp.gn │ ├── absl_status.gn │ ├── libvpx.gn │ ├── libaom.gn │ ├── openh264.gn │ └── swiftshader-SPIRV-Tools.gn └── libpci │ └── BUILD.gn ├── lacros ├── OWNERS ├── lacros_resource_sizes.gni ├── lacros_resource_sizes.pydeps └── PRESUBMIT.py ├── DIR_METADATA ├── apple ├── OWNERS └── README.md ├── rust ├── tests │ ├── test_mixed_component │ │ ├── DEPS │ │ ├── demo.cc │ │ ├── BUILD.gn │ │ └── component.cc │ ├── test_simple_rust_exe │ │ ├── main.rs │ │ └── BUILD.gn │ ├── test_rlib_crate │ │ └── crate │ │ │ └── src │ │ │ └── main.rs │ ├── test_rust_multiple_dep_versions_exe │ │ ├── transitive_lib.rs │ │ ├── v1 │ │ │ ├── src │ │ │ │ └── lib.rs │ │ │ └── BUILD.gn │ │ ├── v2 │ │ │ ├── src │ │ │ │ └── lib.rs │ │ │ └── BUILD.gn │ │ └── main.rs │ ├── bindgen_test │ │ ├── main.rs │ │ ├── lib.c │ │ ├── lib2.h │ │ └── src │ │ │ └── lib.rs │ ├── test_rs_bindings_from_cc │ │ ├── self_contained_target_header2.cc │ │ ├── self_contained_target_header1.h │ │ ├── self_contained_target_header2.h │ │ └── target_depending_on_another.h │ ├── test_proc_macro_crate │ │ ├── crate │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── BUILD.gn │ ├── test_rust_static_library_non_standard_arrangement │ │ ├── foo.rs │ │ └── BUILD.gn │ ├── test_serde_json_lenient │ │ ├── unittests.cc │ │ ├── BUILD.gn │ │ └── lib.rs │ ├── test_mixed_executable │ │ ├── BUILD.gn │ │ ├── src │ │ │ └── lib.rs │ │ └── main.cc │ ├── test_rust_unittests │ │ ├── BUILD.gn │ │ └── main.rs │ ├── test_mixed_testonly_executable │ │ ├── src │ │ │ └── lib.rs │ │ ├── BUILD.gn │ │ └── main.cc │ ├── test_rust_static_library │ │ └── BUILD.gn │ ├── test_mixed_shared_library │ │ ├── test_mixed_shared_library.cc │ │ ├── dependency_header.h │ │ ├── test_mixed_shared_library.h │ │ └── src │ │ │ └── lib.rs │ ├── test_mixed_static_library │ │ ├── test_mixed_static_library.cc │ │ ├── dependency_header.h │ │ ├── test_mixed_static_library.h │ │ └── src │ │ │ └── lib.rs │ ├── test_bin_crate │ │ ├── BUILD.gn │ │ └── crate │ │ │ └── src │ │ │ └── main.rs │ ├── test_rust_shared_library │ │ └── BUILD.gn │ ├── test_cpp_including_rust │ │ ├── main.cc │ │ └── BUILD.gn │ ├── test_variable_static_library │ │ ├── test_variable_static_library.h │ │ └── src │ │ │ └── lib.rs │ └── test_rust_exe │ │ └── BUILD.gn ├── OWNERS ├── rust_macro.gni └── mixed_executable.gni ├── metadata.json.in ├── .style.yapf ├── sanitizers └── OWNERS ├── noop.py ├── protoc_java.pydeps ├── sample_arg_file.gn ├── sanitize-mac-build-log.sh ├── sanitize-win-build-log.sh ├── docs └── rust_toolchain.md ├── gn_logs.gni ├── precompile.cc ├── win ├── segment_heap.manifest ├── as_invoker.manifest ├── common_controls.manifest ├── use_ansi_codes.py └── require_administrator.manifest ├── OWNERS.status ├── sanitize-win-build-log.sed ├── check_return_value.py ├── dir_exists.py ├── cp.py ├── .gitignore ├── landmine_utils.py ├── get_symlink_targets.py └── cipd └── clobber_cipd_root.py /fuchsia/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fuchsia/sdk-bucket.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /util/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /util/lib/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /util/lib/results/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/gyp/proto/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/pylib/device/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/pylib/monkey/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/pylib/symbols/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/pylib/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/COMMON_METADATA: -------------------------------------------------------------------------------- 1 | os: ANDROID 2 | -------------------------------------------------------------------------------- /android/pylib/gtest/filter/OWNERS: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /chromeos/OWNERS: -------------------------------------------------------------------------------- 1 | bpastene@chromium.org 2 | -------------------------------------------------------------------------------- /config/profiling/OWNERS: -------------------------------------------------------------------------------- 1 | pasthana@google.com -------------------------------------------------------------------------------- /ios/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /mac/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /android/pylib/symbols/mock_addr2line/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/coverage/OWNERS: -------------------------------------------------------------------------------- 1 | pasthana@google.com 2 | -------------------------------------------------------------------------------- /config/ios/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /config/mac/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /skia_gold_common/OWNERS: -------------------------------------------------------------------------------- 1 | bsheedy@chromium.org 2 | -------------------------------------------------------------------------------- /ciopfs.sha1: -------------------------------------------------------------------------------- 1 | 5454b3c4f1c9992047e7ae9d6d14d5b49b1b12f3 -------------------------------------------------------------------------------- /config/android/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/android/OWNERS 2 | -------------------------------------------------------------------------------- /config/apple/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /config/linux/OWNERS: -------------------------------------------------------------------------------- 1 | thomasanderson@chromium.org 2 | -------------------------------------------------------------------------------- /config/sanitizers/OWNERS: -------------------------------------------------------------------------------- 1 | metzman@chromium.org 2 | -------------------------------------------------------------------------------- /fuchsia/linux_internal.sdk.sha1: -------------------------------------------------------------------------------- 1 | 9.20220803.1.1 2 | -------------------------------------------------------------------------------- /fuchsia/sdk-hash-files.list: -------------------------------------------------------------------------------- 1 | {platform}.sdk.sha1 2 | -------------------------------------------------------------------------------- /toolchain/apple/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /toolchain/ios/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /toolchain/mac/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/apple/OWNERS 2 | -------------------------------------------------------------------------------- /toolchain/android/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/android/OWNERS 2 | -------------------------------------------------------------------------------- /toolchain/fuchsia/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/fuchsia/OWNERS 2 | -------------------------------------------------------------------------------- /args/OWNERS: -------------------------------------------------------------------------------- 1 | per-file headless.gn=file://headless/OWNERS 2 | -------------------------------------------------------------------------------- /chromeos/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = chromium 3 | -------------------------------------------------------------------------------- /fuchsia/cipd/build_id.template: -------------------------------------------------------------------------------- 1 | @MAJOR@.@MINOR@.@BUILD@.@PATCH@ -------------------------------------------------------------------------------- /fuchsia/test/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | -------------------------------------------------------------------------------- /linux/libncursesw/OWNERS: -------------------------------------------------------------------------------- 1 | file://ui/accessibility/OWNERS 2 | -------------------------------------------------------------------------------- /android/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/android/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /fuchsia/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/fuchsia/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /lacros/OWNERS: -------------------------------------------------------------------------------- 1 | svenzheng@chromium.org 2 | erikchen@chromium.org 3 | -------------------------------------------------------------------------------- /toolchain/apple/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | -------------------------------------------------------------------------------- /toolchain/win/rc/.gitignore: -------------------------------------------------------------------------------- 1 | linux64/rc 2 | mac/rc 3 | win/rc.exe 4 | -------------------------------------------------------------------------------- /toolchain/win/rc/mac/rc.sha1: -------------------------------------------------------------------------------- 1 | 95e7af85589f1102667fc07efe488fd426c483e8 -------------------------------------------------------------------------------- /android/gradle/OWNERS: -------------------------------------------------------------------------------- 1 | agrieve@chromium.org 2 | wnwen@chromium.org 3 | -------------------------------------------------------------------------------- /config/android/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/android/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /config/freetype/OWNERS: -------------------------------------------------------------------------------- 1 | bungeman@chromium.org 2 | drott@chromium.org 3 | -------------------------------------------------------------------------------- /config/fuchsia/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/fuchsia/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /fuchsia/cipd/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/fuchsia/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /toolchain/win/rc/linux64/rc.sha1: -------------------------------------------------------------------------------- 1 | 1ca25446f5eed4151dc9b43c2a9182433e8f83c0 -------------------------------------------------------------------------------- /toolchain/win/rc/win/rc.exe.sha1: -------------------------------------------------------------------------------- 1 | 7d3a485bb5bae0cf3c6b8af95d21f36aa7d02832 -------------------------------------------------------------------------------- /toolchain/android/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/android/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /toolchain/fuchsia/DIR_METADATA: -------------------------------------------------------------------------------- 1 | mixins: "//build/fuchsia/COMMON_METADATA" 2 | -------------------------------------------------------------------------------- /fuchsia/test/OWNERS: -------------------------------------------------------------------------------- 1 | chonggu@google.com 2 | grt@chromium.org 3 | kmarshall@chromium.org -------------------------------------------------------------------------------- /toolchain/OWNERS: -------------------------------------------------------------------------------- 1 | # Code Coverage. 2 | per-file *code_coverage*=pasthana@google.com 3 | -------------------------------------------------------------------------------- /linux/OWNERS: -------------------------------------------------------------------------------- 1 | mmoss@chromium.org 2 | thestig@chromium.org 3 | thomasanderson@chromium.org 4 | -------------------------------------------------------------------------------- /DIR_METADATA: -------------------------------------------------------------------------------- 1 | monorail { 2 | component: "Build" 3 | } 4 | 5 | team_email: "build@chromium.org" 6 | -------------------------------------------------------------------------------- /config/chromecast/OWNERS: -------------------------------------------------------------------------------- 1 | mfoltz@chromium.org 2 | rwkeane@google.com 3 | seantopping@chromium.org 4 | -------------------------------------------------------------------------------- /android/chromium-debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/chromium-debug.keystore -------------------------------------------------------------------------------- /android/pylib/local/emulator/OWNERS: -------------------------------------------------------------------------------- 1 | bpastene@chromium.org 2 | hypan@google.com 3 | jbudorick@chromium.org 4 | -------------------------------------------------------------------------------- /android/tests/symbolize/liba.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/tests/symbolize/liba.so -------------------------------------------------------------------------------- /android/tests/symbolize/libb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/tests/symbolize/libb.so -------------------------------------------------------------------------------- /apple/OWNERS: -------------------------------------------------------------------------------- 1 | mark@chromium.org 2 | rohitrao@chromium.org 3 | rsesek@chromium.org 4 | sdefresne@chromium.org 5 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_component/DEPS: -------------------------------------------------------------------------------- 1 | include_rules = [ 2 | "+third_party/rust/cxx/v1/crate/include", 3 | ] 4 | -------------------------------------------------------------------------------- /android/CheckInstallApk-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/CheckInstallApk-debug.apk -------------------------------------------------------------------------------- /config/fuchsia/test/logger.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | use: [ 3 | { protocol: [ "fuchsia.logger.Log" ] }, 4 | ], 5 | } -------------------------------------------------------------------------------- /linux/sysroot_scripts/keyring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/linux/sysroot_scripts/keyring.gpg -------------------------------------------------------------------------------- /util/LASTCHANGE.dummy: -------------------------------------------------------------------------------- 1 | LASTCHANGE=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 2 | -------------------------------------------------------------------------------- /skia_gold_common/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | 4 | column_limit = 80 5 | indent_width = 2 6 | 7 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/java/test/missing_symbol/c.jar -------------------------------------------------------------------------------- /config/fuchsia/test/read_debug_data.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "sandbox": { 3 | "features": [ 4 | "hub" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /fuchsia/COMMON_METADATA: -------------------------------------------------------------------------------- 1 | monorail { 2 | component: "Fuchsia" 3 | } 4 | team_email: "fuchsia-dev@chromium.org" 5 | os: FUCHSIA 6 | -------------------------------------------------------------------------------- /android/stacktrace/java_deobfuscate_java.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frida/v8-build/HEAD/android/stacktrace/java_deobfuscate_java.jar -------------------------------------------------------------------------------- /config/fuchsia/test/chromium_test_facet.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | facets: { 3 | "fuchsia.test": { type: "chromium" }, 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /metadata.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "content": { 3 | "version": "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" 4 | }, 5 | "metadata_version": 1 6 | } 7 | -------------------------------------------------------------------------------- /config/fuchsia/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/fuchsia/OWNERS 2 | 3 | per-file *.cmx=set noparent 4 | per-file *.cmx=file://build/fuchsia/SECURITY_OWNERS 5 | -------------------------------------------------------------------------------- /linux/libncursesw/DIR_METADATA: -------------------------------------------------------------------------------- 1 | monorail { 2 | component: "Internals>Accessibility" 3 | } 4 | 5 | team_email: "chromium-accessibility@chromium.org" 6 | -------------------------------------------------------------------------------- /android/OWNERS: -------------------------------------------------------------------------------- 1 | agrieve@chromium.org 2 | bjoyce@chromium.org 3 | mheikal@chromium.org 4 | pasko@chromium.org 5 | smaier@chromium.org 6 | wnwen@chromium.org 7 | -------------------------------------------------------------------------------- /config/rts.gni: -------------------------------------------------------------------------------- 1 | declare_args() { 2 | # For more info about RTS, please see 3 | # //docs/testing/regression-test-selection.md 4 | use_rts = false 5 | } 6 | -------------------------------------------------------------------------------- /config/fuchsia/test/jit_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "sandbox": { 3 | "features": [ 4 | "deprecated-ambient-replace-as-executable" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /android/gyp/OWNERS: -------------------------------------------------------------------------------- 1 | agrieve@chromium.org 2 | digit@chromium.org 3 | smaier@chromium.org 4 | wnwen@chromium.org 5 | 6 | per-file create_unwind_table*.py=file://base/profiler/OWNERS -------------------------------------------------------------------------------- /.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | 4 | # New directories should use a .style.yapf that does not include the following: 5 | column_limit = 80 6 | indent_width = 2 7 | -------------------------------------------------------------------------------- /sanitizers/OWNERS: -------------------------------------------------------------------------------- 1 | eugenis@chromium.org 2 | glider@chromium.org 3 | metzman@chromium.org 4 | rnk@chromium.org 5 | per-file tsan_suppressions.cc=* 6 | per-file lsan_suppressions.cc=* 7 | -------------------------------------------------------------------------------- /config/fuchsia/test/web_instance_host_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "sandbox": { 3 | "services": [ 4 | "fuchsia.sys.Environment", 5 | "fuchsia.sys.Loader" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /android/pylib/dex/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /skia_gold_common/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/gyp/util/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/base/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/junit/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/local/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/output/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/results/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/incremental_install/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/android/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/gtest/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/local/device/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/local/machine/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /rust/OWNERS: -------------------------------------------------------------------------------- 1 | adetaylor@chromium.org 2 | ajgo@chromium.org 3 | collinbaker@chromium.org 4 | danakj@chromium.org 5 | jclinton@chromium.org 6 | lukasza@chromium.org 7 | rsesek@chromium.org 8 | thakis@chromium.org 9 | -------------------------------------------------------------------------------- /android/pylib/local/emulator/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/instrumentation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/local/emulator/proto/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/results/presentation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /android/pylib/results/flakiness_dashboard/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /config/OWNERS: -------------------------------------------------------------------------------- 1 | per-file ozone.gni=file://ui/ozone/OWNERS 2 | per-file ozone_extra.gni=file://ui/ozone/OWNERS 3 | per-file rust.gni=file://build/rust/OWNERS 4 | per-file chromecast_build.gni=file://build/config/chromecast/OWNERS 5 | -------------------------------------------------------------------------------- /noop.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | """Script that does nothing successfully.""" 5 | -------------------------------------------------------------------------------- /android/gyp/aar.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/aar.pydeps build/android/gyp/aar.py 3 | ../../gn_helpers.py 4 | aar.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/zip.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/zip.pydeps build/android/gyp/zip.py 3 | ../../gn_helpers.py 4 | util/__init__.py 5 | util/build_utils.py 6 | zip.py 7 | -------------------------------------------------------------------------------- /android/gyp/aidl.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/aidl.pydeps build/android/gyp/aidl.py 3 | ../../gn_helpers.py 4 | aidl.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/ijar.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/ijar.pydeps build/android/gyp/ijar.py 3 | ../../gn_helpers.py 4 | ijar.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /fuchsia/test/.coveragerc: -------------------------------------------------------------------------------- 1 | # .coveragerc to control coverage.py 2 | 3 | [report] 4 | # Regexes for lines to exclude from consideration 5 | exclude_lines = 6 | # Don't complain if non-runnable code isn't run: 7 | if __name__ == .__main__.: 8 | 9 | -------------------------------------------------------------------------------- /protoc_java.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build --output build/protoc_java.pydeps build/protoc_java.py 3 | android/gyp/util/__init__.py 4 | android/gyp/util/build_utils.py 5 | gn_helpers.py 6 | protoc_java.py 7 | -------------------------------------------------------------------------------- /sample_arg_file.gn: -------------------------------------------------------------------------------- 1 | # Build arguments go here. Here are some of the most commonly set ones. 2 | # Run `gn args --list` for the full list. 3 | # is_component_build = true 4 | # is_debug = true 5 | # symbol_level = 2 6 | # use_goma = false 7 | -------------------------------------------------------------------------------- /android/native_flags/empty.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file just needs to exist to appease GN. 6 | -------------------------------------------------------------------------------- /config/fuchsia/rules.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/fuchsia/generate_runner_scripts.gni") 6 | -------------------------------------------------------------------------------- /android/gyp/copy_ex.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/copy_ex.pydeps build/android/gyp/copy_ex.py 3 | ../../gn_helpers.py 4 | copy_ex.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /sanitize-mac-build-log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed 6 | -------------------------------------------------------------------------------- /sanitize-win-build-log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed 6 | -------------------------------------------------------------------------------- /rust/tests/test_simple_rust_exe/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | fn main() { 6 | println!("Hello, world!"); 7 | } 8 | -------------------------------------------------------------------------------- /android/gyp/filter_zip.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/filter_zip.pydeps build/android/gyp/filter_zip.py 3 | ../../gn_helpers.py 4 | filter_zip.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/flatc_java.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/flatc_java.pydeps build/android/gyp/flatc_java.py 3 | ../../gn_helpers.py 4 | flatc_java.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /docs/rust_toolchain.md: -------------------------------------------------------------------------------- 1 | # Rust toolchain 2 | 3 | Chrome currently uses an experimental Rust toolchain built by the Android 4 | team, which supports only Linux and Android builds. 5 | 6 | See [this document for information about how to use it](/docs/security/rust-toolchain.md). 7 | -------------------------------------------------------------------------------- /util/version.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # TODO(crbug.com/1347803): Delete this file. 6 | import("//chrome/version.gni") 7 | -------------------------------------------------------------------------------- /android/gyp/dexsplitter.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/dexsplitter.pydeps build/android/gyp/dexsplitter.py 3 | ../../gn_helpers.py 4 | dexsplitter.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /linux/unbundle/crc32c.gn: -------------------------------------------------------------------------------- 1 | import("//build/shim_headers.gni") 2 | 3 | shim_headers("crc32c_shim") { 4 | root_path = "src/include" 5 | headers = [ "crc32c/crc32c.h" ] 6 | } 7 | 8 | source_set("crc32c") { 9 | deps = [ ":crc32c_shim" ] 10 | libs = [ "crc32c" ] 11 | } 12 | -------------------------------------------------------------------------------- /android/gyp/dex_jdk_libs.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/dex_jdk_libs.pydeps build/android/gyp/dex_jdk_libs.py 3 | ../../gn_helpers.py 4 | dex_jdk_libs.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/dist_aar.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/dist_aar.pydeps build/android/gyp/dist_aar.py 3 | ../../gn_helpers.py 4 | dist_aar.py 5 | filter_zip.py 6 | util/__init__.py 7 | util/build_utils.py 8 | -------------------------------------------------------------------------------- /android/gyp/jacoco_instr.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/jacoco_instr.pydeps build/android/gyp/jacoco_instr.py 3 | ../../gn_helpers.py 4 | jacoco_instr.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/gcc_preprocess.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/gcc_preprocess.pydeps build/android/gyp/gcc_preprocess.py 3 | ../../gn_helpers.py 4 | gcc_preprocess.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /rust/tests/test_rlib_crate/crate/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | pub fn main() { 6 | test_rlib_crate::say_hello_from_crate(); 7 | } 8 | -------------------------------------------------------------------------------- /android/gyp/bytecode_rewriter.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/bytecode_rewriter.pydeps build/android/gyp/bytecode_rewriter.py 3 | ../../gn_helpers.py 4 | bytecode_rewriter.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/lint.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/lint.pydeps build/android/gyp/lint.py 3 | ../../gn_helpers.py 4 | lint.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/manifest_utils.py 8 | util/server_utils.py 9 | -------------------------------------------------------------------------------- /android/gyp/optimize_resources.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/optimize_resources.pydeps build/android/gyp/optimize_resources.py 3 | ../../gn_helpers.py 4 | optimize_resources.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/system_image_apks.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/system_image_apks.pydeps build/android/gyp/system_image_apks.py 3 | ../../gn_helpers.py 4 | system_image_apks.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/java_cpp_enum.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/java_cpp_enum.pydeps build/android/gyp/java_cpp_enum.py 3 | ../../gn_helpers.py 4 | java_cpp_enum.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/java_cpp_utils.py 8 | -------------------------------------------------------------------------------- /android/pylib/base/test_exception.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | class TestException(Exception): 7 | """Base class for exceptions thrown by the test runner.""" 8 | -------------------------------------------------------------------------------- /android/gyp/merge_manifest.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/merge_manifest.pydeps build/android/gyp/merge_manifest.py 3 | ../../gn_helpers.py 4 | merge_manifest.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/manifest_utils.py 8 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/B.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test.missing_symbol; 6 | 7 | public class B { 8 | public void foo() {} 9 | } 10 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/D.template: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test.missing_symbol; 6 | 7 | public class D { 8 | public void foo() {} 9 | } 10 | -------------------------------------------------------------------------------- /config/fuchsia/test/elf_test_runner.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | program: { 3 | runner: "elf_test_runner", 4 | }, 5 | capabilities: [ 6 | { protocol: "fuchsia.test.Suite" }, 7 | ], 8 | expose: [ 9 | { 10 | protocol: "fuchsia.test.Suite", 11 | from: "self", 12 | }, 13 | ], 14 | } 15 | -------------------------------------------------------------------------------- /android/gyp/allot_native_libraries.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/allot_native_libraries.pydeps build/android/gyp/allot_native_libraries.py 3 | ../../gn_helpers.py 4 | allot_native_libraries.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/java_cpp_strings.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/java_cpp_strings.pydeps build/android/gyp/java_cpp_strings.py 3 | ../../gn_helpers.py 4 | java_cpp_strings.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/java_cpp_utils.py 8 | -------------------------------------------------------------------------------- /android/gyp/process_native_prebuilt.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/process_native_prebuilt.pydeps build/android/gyp/process_native_prebuilt.py 3 | ../../gn_helpers.py 4 | process_native_prebuilt.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /config/chromebox_for_meetings/buildflags.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # True if compiling for Chromebox for Meeting devices. 7 | is_cfm = false 8 | } 9 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/transitive_lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | pub fn transitively_say_hello() { 6 | test_lib::say_hello_from_v2(); 7 | } 8 | -------------------------------------------------------------------------------- /android/gyp/bytecode_processor.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/bytecode_processor.pydeps build/android/gyp/bytecode_processor.py 3 | ../../gn_helpers.py 4 | bytecode_processor.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/server_utils.py 8 | -------------------------------------------------------------------------------- /android/gyp/dex.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/dex.pydeps build/android/gyp/dex.py 3 | ../../gn_helpers.py 4 | ../../print_python_deps.py 5 | dex.py 6 | util/__init__.py 7 | util/build_utils.py 8 | util/md5_check.py 9 | util/zipalign.py 10 | -------------------------------------------------------------------------------- /android/gyp/java_cpp_features.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/java_cpp_features.pydeps build/android/gyp/java_cpp_features.py 3 | ../../gn_helpers.py 4 | java_cpp_features.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/java_cpp_utils.py 8 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/v1/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | pub fn say_hello_from_v1() { 6 | println!("Hello, world - from lib version 1"); 7 | } 8 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/v2/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | pub fn say_hello_from_v2() { 6 | println!("Hello, world - from lib version 2"); 7 | } 8 | -------------------------------------------------------------------------------- /android/gyp/create_java_binary_script.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/create_java_binary_script.pydeps build/android/gyp/create_java_binary_script.py 3 | ../../gn_helpers.py 4 | create_java_binary_script.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/sub/SubB.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test.missing_symbol.sub; 6 | 7 | public class SubB { 8 | public void foo() {} 9 | } 10 | -------------------------------------------------------------------------------- /android/gyp/assert_static_initializers.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/assert_static_initializers.pydeps build/android/gyp/assert_static_initializers.py 3 | ../../gn_helpers.py 4 | assert_static_initializers.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | fn main() { 6 | test_lib::say_hello_from_v1(); 7 | transitive_v2::transitively_say_hello(); 8 | } 9 | -------------------------------------------------------------------------------- /android/gyp/create_apk_operations_script.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/create_apk_operations_script.pydeps build/android/gyp/create_apk_operations_script.py 3 | ../../gn_helpers.py 4 | create_apk_operations_script.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/create_bundle_wrapper_script.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/create_bundle_wrapper_script.pydeps build/android/gyp/create_bundle_wrapper_script.py 3 | ../../gn_helpers.py 4 | create_bundle_wrapper_script.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/write_native_libraries_java.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/write_native_libraries_java.pydeps build/android/gyp/write_native_libraries_java.py 3 | ../../gn_helpers.py 4 | util/__init__.py 5 | util/build_utils.py 6 | write_native_libraries_java.py 7 | -------------------------------------------------------------------------------- /config/fuchsia/test/elf_test_ambient_exec_runner.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | program: { 3 | runner: "elf_test_ambient_exec_runner", 4 | }, 5 | capabilities: [ 6 | { protocol: "fuchsia.test.Suite" }, 7 | ], 8 | expose: [ 9 | { 10 | protocol: "fuchsia.test.Suite", 11 | from: "self", 12 | }, 13 | ], 14 | } 15 | -------------------------------------------------------------------------------- /android/gyp/apkbuilder.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/apkbuilder.pydeps build/android/gyp/apkbuilder.py 3 | ../../gn_helpers.py 4 | apkbuilder.py 5 | finalize_apk.py 6 | util/__init__.py 7 | util/build_utils.py 8 | util/diff_utils.py 9 | util/zipalign.py 10 | -------------------------------------------------------------------------------- /android/gyp/check_flag_expectations.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/check_flag_expectations.pydeps build/android/gyp/check_flag_expectations.py 3 | ../../gn_helpers.py 4 | check_flag_expectations.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/diff_utils.py 8 | -------------------------------------------------------------------------------- /android/gyp/create_size_info_files.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/create_size_info_files.pydeps build/android/gyp/create_size_info_files.py 3 | ../../gn_helpers.py 4 | create_size_info_files.py 5 | util/__init__.py 6 | util/build_utils.py 7 | util/jar_info_utils.py 8 | -------------------------------------------------------------------------------- /android/gyp/trace_event_bytecode_rewriter.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/trace_event_bytecode_rewriter.pydeps build/android/gyp/trace_event_bytecode_rewriter.py 3 | ../../gn_helpers.py 4 | trace_event_bytecode_rewriter.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/create_test_apk_wrapper_script.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/create_test_apk_wrapper_script.pydeps build/android/gyp/create_test_apk_wrapper_script.py 3 | ../../gn_helpers.py 4 | create_test_apk_wrapper_script.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/gyp/generate_linker_version_script.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/generate_linker_version_script.pydeps build/android/gyp/generate_linker_version_script.py 3 | ../../gn_helpers.py 4 | generate_linker_version_script.py 5 | util/__init__.py 6 | util/build_utils.py 7 | -------------------------------------------------------------------------------- /android/junit/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Hello World 8 | 9 | -------------------------------------------------------------------------------- /android/gyp/java_google_api_keys.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/java_google_api_keys.pydeps build/android/gyp/java_google_api_keys.py 3 | ../../../google_apis/google_api_keys.py 4 | ../../gn_helpers.py 5 | java_google_api_keys.py 6 | util/__init__.py 7 | util/build_utils.py 8 | -------------------------------------------------------------------------------- /android/pylib/gtest/filter/breakpad_unittests_disabled: -------------------------------------------------------------------------------- 1 | FileIDStripTest.StripSelf 2 | # crbug.com/303960 3 | ExceptionHandlerTest.InstructionPointerMemoryNullPointer 4 | # crbug.com/171419 5 | MinidumpWriterTest.MappingInfoContained 6 | # crbug.com/310088 7 | MinidumpWriterTest.MinidumpSizeLimit 8 | # crbug.com/375838 9 | ElfCoreDumpTest.ValidCoreFile 10 | -------------------------------------------------------------------------------- /rust/tests/bindgen_test/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | use bindgen_test_lib::add_two_numbers_in_c; 6 | 7 | fn main() { 8 | println!("{} + {} = {}", 3, 7, add_two_numbers_in_c(3, 7)); 9 | } 10 | -------------------------------------------------------------------------------- /util/chromium_git_revision.h.in: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // chromium_git_revision.h is generated from chromium_git_revision.h.in. Edit 6 | // the source! 7 | 8 | #define CHROMIUM_GIT_REVISION "@@LASTCHANGE@" 9 | -------------------------------------------------------------------------------- /config/android/test/classpath_order/java/src/org/chromium/build/classpath_order/Dummy.java.jinja2: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.build.classpath_order; 6 | 7 | public class {{class_name}} { 8 | } 9 | -------------------------------------------------------------------------------- /config/fuchsia/config.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | assert(is_fuchsia) 6 | 7 | # Compute the path to the arch-specific boot image directory. 8 | boot_image_root = "//third_party/fuchsia-sdk/images/${target_cpu}" 9 | -------------------------------------------------------------------------------- /android/gradle/manifest.jinja: -------------------------------------------------------------------------------- 1 | {# Copyright 2017 The Chromium Authors. All rights reserved. #} 2 | {# Use of this source code is governed by a BSD-style license that can be #} 3 | {# found in the LICENSE file. #} 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /config/get_host_byteorder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright 2017 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | """Get Byteorder of host architecture""" 7 | 8 | from __future__ import print_function 9 | 10 | import sys 11 | 12 | print(sys.byteorder) 13 | -------------------------------------------------------------------------------- /android/android_only_jni_exports.lst: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # Linker script that exports only symbols required for JNI to work. 6 | 7 | { 8 | global: 9 | JNI_OnLoad; 10 | Java_*; 11 | local: 12 | *; 13 | }; 14 | -------------------------------------------------------------------------------- /config/linux/pangocairo/pangocairo.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/chromeos/ui_mode.gni") 6 | import("//build/config/ui.gni") 7 | 8 | declare_args() { 9 | use_pangocairo = is_linux && !is_castos 10 | } 11 | -------------------------------------------------------------------------------- /android/pylib/base/mock_environment.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | from pylib.base import environment 7 | 8 | import mock # pylint: disable=import-error 9 | 10 | 11 | MockEnvironment = mock.MagicMock(environment.Environment) 12 | -------------------------------------------------------------------------------- /android/tests/symbolize/b.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | class B { 6 | public: 7 | B(); 8 | void Baz(float f); 9 | void Qux(double d); 10 | }; 11 | 12 | B::B() {} 13 | void B::Baz(float f) {} 14 | void B::Qux(double d) {} 15 | -------------------------------------------------------------------------------- /android/incremental_install/write_installer_json.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/incremental_install --output build/android/incremental_install/write_installer_json.pydeps build/android/incremental_install/write_installer_json.py 3 | ../../gn_helpers.py 4 | ../gyp/util/__init__.py 5 | ../gyp/util/build_utils.py 6 | write_installer_json.py 7 | -------------------------------------------------------------------------------- /android/tests/symbolize/a.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | class A { 6 | public: 7 | A(); 8 | void Foo(int i); 9 | void Bar(const char* c); 10 | }; 11 | 12 | A::A() {} 13 | void A::Foo(int i) {} 14 | void A::Bar(const char* c) {} 15 | -------------------------------------------------------------------------------- /config/android/test/proto/root/absolute_child.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | message AbsoluteChild {} 11 | -------------------------------------------------------------------------------- /config/android/test/proto/root/relative_child.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | message RelativeChild {} 11 | -------------------------------------------------------------------------------- /gn_logs.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/concurrent_links.gni") 6 | 7 | # Log lines for gn_logs.txt that originate from within //build. 8 | build_gn_logs = [ "#### get_concurrent_links.py ####" ] + concurrent_links_logs 9 | -------------------------------------------------------------------------------- /precompile.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Precompiled header generator for Windows builds. No include is needed 6 | // in this file as the PCH include is forced via the "Forced Include File" 7 | // flag in the projects generated by GYP. 8 | -------------------------------------------------------------------------------- /android/adb_profile_chrome: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2013 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | # 7 | # Start / stop profiling in chrome. 8 | CATAPULT_DIR="$(dirname "$0")"/../../third_party/catapult 9 | exec "${CATAPULT_DIR}"/systrace/bin/adb_profile_chrome "$@" 10 | -------------------------------------------------------------------------------- /android/pylib/base/mock_test_instance.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | from pylib.base import test_instance 7 | 8 | import mock # pylint: disable=import-error 9 | 10 | 11 | MockTestInstance = mock.MagicMock(test_instance.TestInstance) 12 | -------------------------------------------------------------------------------- /config/android/test/proto/absolute_dep/absolute_dep.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | message AbsoluteDep {} 11 | -------------------------------------------------------------------------------- /config/android/test/proto/relative_dep/relative_dep.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | message RelativeDep {} 11 | -------------------------------------------------------------------------------- /rust/tests/bindgen_test/lib.c: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "build/rust/tests/bindgen_test/lib.h" 6 | 7 | #include 8 | 9 | COMPONENT_EXPORT uint32_t add_two_numbers(uint32_t a, uint32_t b) { 10 | return a + b; 11 | } 12 | -------------------------------------------------------------------------------- /rust/tests/test_rs_bindings_from_cc/self_contained_target_header2.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "build/rust/tests/test_rs_bindings_from_cc/self_contained_target_header2.h" 6 | 7 | int AddViaCc(int x, int y) { 8 | return x + y; 9 | } 10 | -------------------------------------------------------------------------------- /linux/unbundle/fontconfig.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | assert(is_linux || is_chromeos) 6 | 7 | config("fontconfig_config") { 8 | libs = [ "fontconfig" ] 9 | } 10 | 11 | group("fontconfig") { 12 | public_configs = [ ":fontconfig_config" ] 13 | } 14 | -------------------------------------------------------------------------------- /rust/tests/test_proc_macro_crate/crate/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | use proc_macro::TokenStream; 6 | 7 | #[proc_macro] 8 | pub fn calculate_using_proc_macro(_item: TokenStream) -> TokenStream { 9 | "(15 + 15)".parse().unwrap() 10 | } 11 | -------------------------------------------------------------------------------- /android/gyp/test/BUILD.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/android/rules.gni") 2 | 3 | java_library("hello_world_java") { 4 | sources = [ "java/org/chromium/helloworld/HelloWorldPrinter.java" ] 5 | } 6 | 7 | java_binary("hello_world") { 8 | deps = [ ":hello_world_java" ] 9 | sources = [ "java/org/chromium/helloworld/HelloWorldMain.java" ] 10 | main_class = "org.chromium.helloworld.HelloWorldMain" 11 | } 12 | -------------------------------------------------------------------------------- /android/java/test/NoSignatureChangeIncrementalJavacTestHelper2.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test; 6 | 7 | public class NoSignatureChangeIncrementalJavacTestHelper2 { 8 | public String bar() { 9 | return "bar"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /win/segment_heap.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SegmentHeap 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /rust/tests/test_rust_static_library_non_standard_arrangement/foo.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | pub extern "C" fn do_subtract(a: u32, b: u32) -> u32 { 6 | a - b 7 | } 8 | 9 | #[test] 10 | fn test_ok() { 11 | assert_eq!(do_subtract(12, 8), 4) 12 | } 13 | -------------------------------------------------------------------------------- /skia_gold_common/README.md: -------------------------------------------------------------------------------- 1 | This directory contains Python code used for interacting with the Skia Gold 2 | image diff service. It is used by multiple test harnesses, e.g. 3 | `//build/android/test_runner.py` and 4 | `//content/test/gpu/run_gpu_integration_test.py`. A place such as 5 | `//testing/` would likely be a better location, but causes issues with 6 | V8 since it imports `//build/` but not all of Chromium src. 7 | -------------------------------------------------------------------------------- /android/adb_profile_chrome_startup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2016 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | # 7 | # Start / stop profiling for chrome startup. 8 | CATAPULT_DIR="$(dirname "$0")"/../../third_party/catapult 9 | exec "${CATAPULT_DIR}"/systrace/bin/adb_profile_chrome_startup "$@" 10 | -------------------------------------------------------------------------------- /linux/unbundle/libavif.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_libavif") { 5 | packages = [ "libavif" ] 6 | } 7 | 8 | shim_headers("avif_shim") { 9 | root_path = "src/include" 10 | headers = [ "avif/avif.h" ] 11 | } 12 | 13 | source_set("libavif") { 14 | deps = [ ":avif_shim" ] 15 | public_configs = [ ":system_libavif" ] 16 | } 17 | -------------------------------------------------------------------------------- /linux/unbundle/libxslt.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | 7 | pkg_config("system_libxslt") { 8 | packages = [ "libxslt" ] 9 | } 10 | 11 | source_set("libxslt") { 12 | public_configs = [ ":system_libxslt" ] 13 | } 14 | -------------------------------------------------------------------------------- /android/android_only_explicit_jni_exports.lst: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # Linker script that exports only JNI_OnLoad. 6 | # Should be used for libraries that do explicit JNI registration. 7 | 8 | { 9 | global: 10 | JNI_OnLoad; 11 | local: 12 | *; 13 | }; 14 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/ImportsSubB.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test.missing_symbol; 6 | 7 | import test.missing_symbol.sub.SubB; 8 | 9 | public class ImportsSubB { 10 | public ImportsSubB() { 11 | new SubB().foo(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/pylib/gtest/filter/base_unittests_emulator_additional_disabled: -------------------------------------------------------------------------------- 1 | # Additional list of suppressions from emulator 2 | # 3 | # Automatically generated by run_tests.py 4 | PathServiceTest.Get 5 | SharedMemoryTest.OpenClose 6 | StringPrintfTest.StringAppendfInt 7 | StringPrintfTest.StringAppendfString 8 | StringPrintfTest.StringPrintfBounds 9 | StringPrintfTest.StringPrintfMisc 10 | VerifyPathControlledByUserTest.Symlinks 11 | -------------------------------------------------------------------------------- /android/screenshot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env vpython3 2 | # Copyright 2015 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | import sys 7 | 8 | import devil_chromium 9 | from devil.android.tools import screenshot 10 | 11 | if __name__ == '__main__': 12 | devil_chromium.Initialize() 13 | sys.exit(screenshot.main()) 14 | -------------------------------------------------------------------------------- /rust/tests/test_serde_json_lenient/unittests.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "build/rust/tests/test_serde_json_lenient/lib.rs.h" 6 | #include "testing/gtest/include/gtest/gtest.h" 7 | 8 | TEST(RustTest, SerdeJsonTest) { 9 | EXPECT_EQ(true, serde_works()); 10 | } 11 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/Importer.template: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package _IMPORTER_PACKAGE; 6 | 7 | import _IMPORTEE_PACKAGE._IMPORTEE_CLASS_NAME; 8 | 9 | public class Importer { 10 | public Importer() { 11 | new _IMPORTEE_CLASS_NAME().foo(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/java/test/missing_symbol/sub/BInMethodSignature.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test.missing_symbol.sub; 6 | 7 | import test.missing_symbol.B; 8 | 9 | public class BInMethodSignature { 10 | public B foo() { 11 | return new B(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /config/android/sdk.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # The default SDK release used by public builds. Value may differ in 6 | # internal builds. 7 | default_android_sdk_release = "t" 8 | 9 | # SDK releases against which public builds are supported. 10 | public_sdk_releases = [ "t" ] 11 | -------------------------------------------------------------------------------- /linux/unbundle/libXNVCtrl.gn: -------------------------------------------------------------------------------- 1 | import("//build/shim_headers.gni") 2 | 3 | shim_headers("libXNVCtrl_shim") { 4 | root_path = "../../../../../third_party/libXNVCtrl" 5 | prefix = "NVCtrl/" 6 | headers = [ 7 | "NVCtrl.h", 8 | "NVCtrlLib.h", 9 | "nv_control.h", 10 | ] 11 | } 12 | 13 | source_set("libXNVCtrl") { 14 | deps = [ ":libXNVCtrl_shim" ] 15 | libs = [ 16 | "XNVCtrl", 17 | "xcb", 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_executable/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/mixed_executable.gni") 6 | 7 | mixed_executable("test_mixed_executable") { 8 | sources = [ "main.cc" ] 9 | rs_sources = [ "src/lib.rs" ] 10 | rs_cxx_bindings = [ "src/lib.rs" ] 11 | } 12 | -------------------------------------------------------------------------------- /android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.helloworld; 6 | 7 | public class HelloWorldPrinter { 8 | public static void print() { 9 | System.out.println("Hello, world!"); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /android/video_recorder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env vpython3 2 | # Copyright 2015 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | import sys 7 | 8 | import devil_chromium 9 | from devil.android.tools import video_recorder 10 | 11 | if __name__ == '__main__': 12 | devil_chromium.Initialize() 13 | sys.exit(video_recorder.main()) 14 | -------------------------------------------------------------------------------- /config/fuchsia/test/vulkan_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "facets": { 3 | "fuchsia.test": { 4 | "system-services": [ 5 | "fuchsia.sysmem.Allocator", 6 | "fuchsia.vulkan.loader.Loader" 7 | ] 8 | } 9 | }, 10 | "sandbox": { 11 | "features": [ 12 | "vulkan" 13 | ], 14 | "services": [ 15 | "fuchsia.sysmem.Allocator", 16 | "fuchsia.vulkan.loader.Loader" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /rust/tests/test_mixed_executable/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #[cxx::bridge] 6 | mod ffi { 7 | extern "Rust" { 8 | fn print_message_from_rust(); 9 | } 10 | } 11 | 12 | fn print_message_from_rust() { 13 | println!("Here is a message from Rust.") 14 | } 15 | -------------------------------------------------------------------------------- /win/as_invoker.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OWNERS.status: -------------------------------------------------------------------------------- 1 | # Use this file to set a global status message that should be shown whenever 2 | # git cl owners proposes to add you as a reviewer. 3 | # 4 | # The status messages should be somewhat stable, so please don't use this for 5 | # short term, or frequently changing updates. 6 | # 7 | # The format of the file is 8 | # 9 | # you@chromium.org: Single line status message. 10 | # 11 | 12 | jochen@chromium.org: EMEA based reviewer. 13 | -------------------------------------------------------------------------------- /config/chromebox_for_meetings/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/buildflag_header.gni") 6 | import("//build/config/chromebox_for_meetings/buildflags.gni") 7 | 8 | buildflag_header("buildflags") { 9 | header = "buildflags.h" 10 | flags = [ "PLATFORM_CFM=$is_cfm" ] 11 | } 12 | -------------------------------------------------------------------------------- /linux/unbundle/libevent.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/shim_headers.gni") 6 | 7 | shim_headers("libevent_shim") { 8 | root_path = "." 9 | headers = [ "event.h" ] 10 | } 11 | 12 | source_set("libevent") { 13 | deps = [ ":libevent_shim" ] 14 | libs = [ "event" ] 15 | } 16 | -------------------------------------------------------------------------------- /rust/tests/test_rust_unittests/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_unit_test.gni") 6 | 7 | rust_unit_test("test_rust_unittests") { 8 | sources = [ "main.rs" ] 9 | crate_root = "main.rs" 10 | deps = [ "//build/rust/tests/test_mixed_static_library" ] 11 | } 12 | -------------------------------------------------------------------------------- /win/common_controls.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /win/use_ansi_codes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | """Prints if the the terminal is likely to understand ANSI codes.""" 6 | 7 | from __future__ import print_function 8 | 9 | import os 10 | 11 | # Add more terminals here as needed. 12 | print('ANSICON' in os.environ) 13 | -------------------------------------------------------------------------------- /config/fuchsia/test/audio_output.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | use: [ 3 | { 4 | protocol: [ 5 | // TODO(crbug.com/1348174): Rather than require the system to provide 6 | // capabilities straight from audio_core, we should run Chromium tests 7 | // against an audio stack with fake device(s). 8 | "fuchsia.media.Audio", 9 | "fuchsia.media.AudioDeviceEnumerator", 10 | ] 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_testonly_executable/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #[cxx::bridge] 6 | mod ffi { 7 | extern "Rust" { 8 | fn print_message_from_rust(); 9 | } 10 | } 11 | 12 | fn print_message_from_rust() { 13 | println!("Here is a message from Rust.") 14 | } 15 | -------------------------------------------------------------------------------- /rust/tests/test_proc_macro_crate/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/cargo_crate.gni") 6 | 7 | cargo_crate("test_proc_macro_crate") { 8 | crate_root = "crate/src/lib.rs" 9 | crate_type = "proc-macro" 10 | sources = [ "crate/src/lib.rs" ] 11 | epoch = "0.2" 12 | } 13 | -------------------------------------------------------------------------------- /toolchain/kythe.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file defines configuration for Kythe, an indexer and cross-referencer 6 | # that powers codesearch. 7 | 8 | declare_args() { 9 | # Enables Kythe annotations necessary to build cross references. 10 | enable_kythe_annotations = false 11 | } 12 | -------------------------------------------------------------------------------- /config/android/test/classpath_order/java/res_template/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 42 9 | 10 | -------------------------------------------------------------------------------- /rust/tests/test_rust_static_library/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_static_library.gni") 6 | 7 | rust_static_library("test_rust_static_library") { 8 | sources = [ "src/lib.rs" ] 9 | cxx_bindings = [ "src/lib.rs" ] 10 | build_native_rust_unit_tests = true 11 | } 12 | -------------------------------------------------------------------------------- /android/dcheck_is_off.flags: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # Contains flags that are applied only when ENABLE_DCHECK=false. 6 | 7 | -checkdiscard @org.chromium.base.annotations.CheckDiscard class ** { 8 | *; 9 | } 10 | -checkdiscard class ** { 11 | @org.chromium.base.annotations.CheckDiscard *; 12 | } 13 | -------------------------------------------------------------------------------- /config/fuchsia/test/network.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | use: [ 3 | { 4 | directory: "root-ssl-certificates", 5 | rights: [ "r*" ], 6 | path: "/config/ssl", 7 | }, 8 | { 9 | protocol: [ 10 | "fuchsia.device.NameProvider", // Required by FDIO. 11 | "fuchsia.net.interfaces.State", 12 | "fuchsia.net.name.Lookup", 13 | "fuchsia.posix.socket.Provider", 14 | ], 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /rust/tests/bindgen_test/lib2.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_BINDGEN_TEST_LIB2_H_ 6 | #define BUILD_RUST_TESTS_BINDGEN_TEST_LIB2_H_ 7 | 8 | // This file does nothing, it just tests the include paths when running bindgen. 9 | 10 | #endif // BUILD_RUST_TESTS_BINDGEN_TEST_LIB2_H_ 11 | -------------------------------------------------------------------------------- /win/require_administrator.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /config/fuchsia/test/font_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "facets": { 3 | "fuchsia.test": { 4 | "injected-services": { 5 | "fuchsia.fonts.Provider": "fuchsia-pkg://fuchsia.com/fonts#meta/fonts.cmx", 6 | "fuchsia.tracing.provider.Registry": "fuchsia-pkg://fuchsia.com/trace_manager#meta/trace_manager.cmx" 7 | } 8 | } 9 | }, 10 | "sandbox": { 11 | "services": [ 12 | "fuchsia.fonts.Provider" 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /fuchsia/test/pylintrc: -------------------------------------------------------------------------------- 1 | [MESSAGES CONTROL] 2 | 3 | # Disable the message, report, category or checker with the given id(s). 4 | disable=fixme, 5 | 6 | # fixme 7 | # This complains about TODOs, which are perfectly valid to have. 8 | 9 | # Suppression for invalid-name error for PRESUBMIT.py file. 10 | good-names=f,PRESUBMIT 11 | 12 | [REPORTS] 13 | 14 | reports=no 15 | 16 | [DESIGN] 17 | 18 | # Maximum number of arguments for function / method 19 | max-args=6 20 | -------------------------------------------------------------------------------- /android/gradle/root.jinja: -------------------------------------------------------------------------------- 1 | {# Copyright 2016 The Chromium Authors. All rights reserved. #} 2 | {# Use of this source code is governed by a BSD-style license that can be #} 3 | {# found in the LICENSE file. #} 4 | // Generated by //build/android/generate_gradle.py 5 | 6 | buildscript { 7 | repositories { 8 | google() 9 | mavenCentral() 10 | } 11 | dependencies { 12 | classpath "com.android.tools.build:gradle:7.2.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /android/gyp/validate_static_library_dex_references.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/validate_static_library_dex_references.pydeps build/android/gyp/validate_static_library_dex_references.py 3 | ../../gn_helpers.py 4 | ../pylib/__init__.py 5 | ../pylib/dex/__init__.py 6 | ../pylib/dex/dex_parser.py 7 | util/__init__.py 8 | util/build_utils.py 9 | validate_static_library_dex_references.py 10 | -------------------------------------------------------------------------------- /android/tests/symbolize/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2013 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | TOOLCHAIN=../../../../third_party/android_ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- 6 | CXX=$(TOOLCHAIN)g++ 7 | 8 | lib%.so: %.cc 9 | $(CXX) -nostdlib -g -fPIC -shared $< -o $@ 10 | 11 | all: liba.so libb.so 12 | -------------------------------------------------------------------------------- /config/android/test/resource_overlay/java/res_template/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | {{resource_value}} 10 | -------------------------------------------------------------------------------- /config/fuchsia/test/OWNERS: -------------------------------------------------------------------------------- 1 | file://build/fuchsia/OWNERS 2 | 3 | per-file *.test-cmx=set noparent 4 | per-file *.test-cmx=ddorwin@chromium.org 5 | per-file *.test-cmx=wez@chromium.org 6 | per-file *.test-cml=set noparent 7 | per-file *.test-cml=ddorwin@chromium.org 8 | per-file *.test-cml=wez@chromium.org 9 | # Please prefer the above when possible. 10 | per-file *.test-cmx=file://build/fuchsia/SECURITY_OWNERS 11 | per-file *.test-cml=file://build/fuchsia/SECURITY_OWNERS 12 | -------------------------------------------------------------------------------- /linux/unbundle/libjpeg.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Uses system libjpeg. If true, overrides use_libjpeg_turbo. 7 | use_system_libjpeg = true 8 | 9 | # Uses libjpeg_turbo as the jpeg implementation. Has no effect if 10 | # use_system_libjpeg is set. 11 | use_libjpeg_turbo = true 12 | } 13 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_shared_library/test_mixed_shared_library.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "test_mixed_shared_library.h" 6 | #include 7 | 8 | #include "build/rust/tests/test_mixed_shared_library/src/lib.rs.h" 9 | 10 | uint32_t cpp_addition(uint32_t a, uint32_t b) { 11 | return a + b; 12 | } 13 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_static_library/test_mixed_static_library.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "test_mixed_static_library.h" 6 | #include 7 | 8 | #include "build/rust/tests/test_mixed_static_library/src/lib.rs.h" 9 | 10 | uint32_t cpp_addition(uint32_t a, uint32_t b) { 11 | return a + b; 12 | } 13 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_testonly_executable/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/mixed_executable.gni") 6 | 7 | mixed_executable("test_mixed_testonly_executable") { 8 | sources = [ "main.cc" ] 9 | rs_sources = [ "src/lib.rs" ] 10 | rs_cxx_bindings = [ "src/lib.rs" ] 11 | testonly = true 12 | } 13 | -------------------------------------------------------------------------------- /config/ios/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | application-identifier 6 | $(AppIdentifierPrefix)$(CFBundleIdentifier) 7 | keychain-access-groups 8 | 9 | $(AppIdentifierPrefix)$(CFBundleIdentifier) 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /linux/unbundle/absl_random.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_random_random") { 5 | packages = [ "absl_random_random" ] 6 | } 7 | 8 | shim_headers("random_shim") { 9 | root_path = "." 10 | prefix = "absl/random/" 11 | headers = [ "random.h" ] 12 | } 13 | 14 | source_set("random") { 15 | deps = [ ":random_shim" ] 16 | public_configs = [ ":system_absl_random_random" ] 17 | } 18 | -------------------------------------------------------------------------------- /android/native_flags/argcapture.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright 2021 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | """Writes arguments to a file.""" 6 | 7 | import sys 8 | 9 | 10 | def main(): 11 | with open(sys.argv[1], 'w') as f: 12 | f.write('\n'.join(sys.argv[2:])) 13 | f.write('\n') 14 | 15 | 16 | if __name__ == '__main__': 17 | main() 18 | -------------------------------------------------------------------------------- /android/gyp/proguard.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/gyp --output build/android/gyp/proguard.pydeps build/android/gyp/proguard.py 3 | ../../gn_helpers.py 4 | ../../print_python_deps.py 5 | ../pylib/__init__.py 6 | ../pylib/dex/__init__.py 7 | ../pylib/dex/dex_parser.py 8 | dex.py 9 | dex_jdk_libs.py 10 | proguard.py 11 | util/__init__.py 12 | util/build_utils.py 13 | util/diff_utils.py 14 | util/md5_check.py 15 | util/zipalign.py 16 | -------------------------------------------------------------------------------- /config/ios/resources/XCTRunnerAddition+Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | ${BUNDLE_IDENTIFIER} 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | 12 | 13 | -------------------------------------------------------------------------------- /fuchsia/cipd/README.md: -------------------------------------------------------------------------------- 1 | # CIPD recipes 2 | 3 | The `//build/fuchsia/cipd` target generates a number of YAML files that are used to 4 | produce archives that are uploaded to CIPD. The generated YAML files are stored 5 | in the output directory under the path `gen/build/fuchsia/cipd/`. 6 | 7 | ## Example usage 8 | 9 | The most recent package can be discovered by searching for the "canary" ref: 10 | 11 | `$ cipd describe chromium/fuchsia/$PACKAGE_NAME-$TARGET_ARCH -version canary` 12 | -------------------------------------------------------------------------------- /linux/unbundle/woff2.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_woff2") { 5 | packages = [ "libwoff2dec" ] 6 | } 7 | 8 | shim_headers("woff2_shim") { 9 | root_path = "include" 10 | headers = [ 11 | "woff2/decode.h", 12 | "woff2/encode.h", 13 | "woff2/output.h", 14 | ] 15 | } 16 | 17 | source_set("woff2_dec") { 18 | deps = [ ":woff2_shim" ] 19 | public_configs = [ ":system_woff2" ] 20 | } 21 | -------------------------------------------------------------------------------- /rust/tests/test_bin_crate/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/cargo_crate.gni") 6 | 7 | cargo_crate("test_bin_crate") { 8 | crate_type = "bin" 9 | crate_root = "crate/src/main.rs" 10 | sources = [ "crate/src/main.rs" ] 11 | build_sources = [ "crate/build.rs" ] 12 | build_root = "crate/build.rs" 13 | } 14 | -------------------------------------------------------------------------------- /config/linux/gtk/gtk.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/ui.gni") 6 | 7 | declare_args() { 8 | # Whether or not we should use libgtk. 9 | use_gtk = is_linux && !is_castos 10 | 11 | # The (major) version of GTK to build against. A different version may be 12 | # loaded at runtime. 13 | gtk_version = 3 14 | } 15 | -------------------------------------------------------------------------------- /linux/unbundle/absl_functional.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_bind_front") { 5 | packages = [ "absl_bind_front" ] 6 | } 7 | 8 | shim_headers("bind_front_shim") { 9 | root_path = "." 10 | prefix = "absl/functional/" 11 | headers = [ "bind_front.h" ] 12 | } 13 | 14 | source_set("bind_front") { 15 | deps = [ ":bind_front_shim" ] 16 | public_configs = [ ":system_absl_bind_front" ] 17 | } 18 | -------------------------------------------------------------------------------- /rust/tests/test_rust_shared_library/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_shared_library.gni") 6 | 7 | if (rustc_can_link) { 8 | rust_shared_library("test_rust_shared_library") { 9 | sources = [ "src/lib.rs" ] 10 | cxx_bindings = [ "src/lib.rs" ] 11 | build_native_rust_unit_tests = true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /linux/unbundle/absl_time.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_time") { 5 | packages = [ "absl_time" ] 6 | } 7 | 8 | shim_headers("time_shim") { 9 | root_path = "." 10 | prefix = "absl/time/" 11 | headers = [ 12 | "civil_time.h", 13 | "clock.h", 14 | "time.h", 15 | ] 16 | } 17 | 18 | source_set("time") { 19 | deps = [ ":time_shim" ] 20 | public_configs = [ ":system_absl_time" ] 21 | } 22 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_component/demo.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #include "component.h" 7 | 8 | int main(int argc, const char* argv[]) { 9 | // This doesn't really test anything except that everything links 10 | // OK. 11 | std::cout << "1 + 1 = " << bilingual_math(1, 1) << std::endl; 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /linux/unbundle/absl_memory.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_memory") { 5 | packages = [ "absl_memory" ] 6 | } 7 | 8 | shim_headers("memory_shim") { 9 | root_path = "." 10 | prefix = "absl/memory/" 11 | headers = [ "memory.h" ] 12 | } 13 | 14 | source_set("memory") { 15 | deps = [ ":memory_shim" ] 16 | public_configs = [ ":system_absl_memory" ] 17 | } 18 | 19 | source_set("memory_test") { 20 | } 21 | -------------------------------------------------------------------------------- /rust/tests/test_cpp_including_rust/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "build/rust/tests/test_mixed_static_library/test_mixed_static_library.h" 6 | #include "build/rust/tests/test_rust_static_library/src/lib.rs.h" 7 | 8 | int main(int argc, char* argv[]) { 9 | say_hello(); 10 | add_two_ints_via_rust_then_cpp(3, 4); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /linux/unbundle/absl_cleanup.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_cleanup") { 5 | packages = [ "absl_cleanup" ] 6 | } 7 | 8 | shim_headers("cleanup_shim") { 9 | root_path = "." 10 | prefix = "absl/cleanup/" 11 | headers = [ "cleanup.h" ] 12 | } 13 | 14 | source_set("cleanup") { 15 | deps = [ ":cleanup_shim" ] 16 | public_configs = [ ":system_absl_cleanup" ] 17 | } 18 | 19 | source_set("cleanup_test") { 20 | } 21 | -------------------------------------------------------------------------------- /config/freetype/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/features.gni") 6 | import("//build/config/freetype/freetype.gni") 7 | 8 | group("freetype") { 9 | if (use_system_freetype) { 10 | public_configs = [ "//build/linux:freetype_from_pkgconfig" ] 11 | } else { 12 | public_deps = [ "//third_party:freetype_harfbuzz" ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /rust/tests/test_simple_rust_exe/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This should be the simplest possible exe with no dependencies, 6 | # to make it easy to investigate build problems. 7 | # For this reason it uses 'executable' directly rather than 8 | # //build/rust/rust_executable.gni. 9 | executable("test_simple_rust_exe") { 10 | crate_root = "main.rs" 11 | } 12 | -------------------------------------------------------------------------------- /android/incremental_install/java/org/chromium/incrementalinstall/SecondInstrumentation.java: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.incrementalinstall; 6 | 7 | import android.app.Instrumentation; 8 | 9 | /** 10 | * Exists to support an app having multiple instrumentations. 11 | */ 12 | public final class SecondInstrumentation extends Instrumentation {} 13 | -------------------------------------------------------------------------------- /linux/unbundle/absl_hash.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_hash") { 5 | packages = [ "absl_hash" ] 6 | } 7 | 8 | shim_headers("hash_shim") { 9 | root_path = "." 10 | prefix = "absl/hash/" 11 | headers = [ "hash.h" ] 12 | } 13 | 14 | source_set("hash") { 15 | deps = [ ":hash_shim" ] 16 | public_configs = [ ":system_absl_hash" ] 17 | } 18 | 19 | source_set("hash_test") { 20 | } 21 | source_set("low_level_hash_test") { 22 | } 23 | -------------------------------------------------------------------------------- /rust/tests/test_bin_crate/crate/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | fn main() { 6 | println!("Hello, world!"); 7 | #[cfg(is_new_rustc)] 8 | println!("Is new rustc!"); 9 | #[cfg(is_old_rustc)] 10 | println!("Is old rustc!"); 11 | #[cfg(is_android)] 12 | println!("Is android!"); 13 | #[cfg(is_mac)] 14 | println!("Is darwin!"); 15 | } 16 | -------------------------------------------------------------------------------- /android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.helloworld; 6 | 7 | public class HelloWorldMain { 8 | public static void main(String[] args) { 9 | if (args.length > 0) { 10 | System.exit(Integer.parseInt(args[0])); 11 | } 12 | HelloWorldPrinter.print(); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /linux/unbundle/absl_meta.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_type_traits") { 5 | packages = [ "absl_type_traits" ] 6 | } 7 | 8 | shim_headers("type_traits_shim") { 9 | root_path = "." 10 | prefix = "absl/meta/" 11 | headers = [ "type_traits.h" ] 12 | } 13 | 14 | source_set("type_traits") { 15 | deps = [ ":type_traits_shim" ] 16 | public_configs = [ ":system_absl_type_traits" ] 17 | } 18 | 19 | source_set("type_traits_test") { 20 | } 21 | -------------------------------------------------------------------------------- /util/lastchange.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file is used to inject fixed dummy commit for commit independent 6 | # reproducible binaries. 7 | 8 | declare_args() { 9 | use_dummy_lastchange = false 10 | } 11 | 12 | if (use_dummy_lastchange) { 13 | lastchange_file = "//build/util/LASTCHANGE.dummy" 14 | } else { 15 | lastchange_file = "//build/util/LASTCHANGE" 16 | } 17 | -------------------------------------------------------------------------------- /android/junit/AndroidManifest_mergetest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/pylintrc: -------------------------------------------------------------------------------- 1 | [FORMAT] 2 | 3 | max-line-length=80 4 | 5 | [MESSAGES CONTROL] 6 | 7 | disable=abstract-class-not-used,bad-continuation,bad-indentation,duplicate-code,fixme,invalid-name,locally-disabled,locally-enabled,missing-docstring,star-args,too-few-public-methods,too-many-arguments,too-many-branches,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-public-methods,too-many-statements,wrong-import-position 8 | 9 | [REPORTS] 10 | 11 | reports=no 12 | 13 | [VARIABLES] 14 | 15 | dummy-variables-rgx=^_.*$|dummy 16 | -------------------------------------------------------------------------------- /chromeos/pylintrc: -------------------------------------------------------------------------------- 1 | [FORMAT] 2 | 3 | max-line-length=80 4 | 5 | [MESSAGES CONTROL] 6 | 7 | disable=abstract-class-not-used,bad-continuation,bad-indentation,duplicate-code,fixme,invalid-name,locally-disabled,locally-enabled,missing-docstring,star-args,too-few-public-methods,too-many-arguments,too-many-branches,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-public-methods,too-many-statements,wrong-import-position 8 | 9 | [REPORTS] 10 | 11 | reports=no 12 | 13 | [VARIABLES] 14 | 15 | dummy-variables-rgx=^_.*$|dummy 16 | -------------------------------------------------------------------------------- /config/linux/dbus/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/features.gni") 6 | import("//build/config/linux/pkg_config.gni") 7 | 8 | assert(use_dbus) 9 | 10 | # Note: if your target also depends on //dbus, you don't need to add this 11 | # config (it will get added automatically if you depend on //dbus). 12 | pkg_config("dbus") { 13 | packages = [ "dbus-1" ] 14 | } 15 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_shared_library/dependency_header.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_DEPENDENCY_HEADER_H_ 6 | #define BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_DEPENDENCY_HEADER_H_ 7 | 8 | #include 9 | 10 | typedef uint32_t CustomIntType; 11 | 12 | #endif // BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_DEPENDENCY_HEADER_H_ 13 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_static_library/dependency_header.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_DEPENDENCY_HEADER_H_ 6 | #define BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_DEPENDENCY_HEADER_H_ 7 | 8 | #include 9 | 10 | typedef uint32_t CustomIntType; 11 | 12 | #endif // BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_DEPENDENCY_HEADER_H_ 13 | -------------------------------------------------------------------------------- /linux/unbundle/snappy.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/shim_headers.gni") 6 | 7 | shim_headers("snappy_shim") { 8 | root_path = "src" 9 | headers = [ 10 | "snappy-c.h", 11 | "snappy-sinksource.h", 12 | "snappy-stubs-public.h", 13 | "snappy.h", 14 | ] 15 | } 16 | 17 | source_set("snappy") { 18 | deps = [ ":snappy_shim" ] 19 | libs = [ "snappy" ] 20 | } 21 | -------------------------------------------------------------------------------- /android/gradle/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /apple/README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | `//build/apple` contains: 4 | * GN templates and configurations shared by Apple platforms 5 | * Python build scripts shared by Apple platforms 6 | 7 | This directory should only contain templates, configurations and scripts 8 | that are used exclusively on Apple platforms (currently iOS and macOS). 9 | They must also be independent of the specific platform. 10 | 11 | If a template, configuration or script is limited to only iOS or macOS, 12 | then they should instead be located in `//build/ios` or `//build/mac`. 13 | -------------------------------------------------------------------------------- /config/profiling/profiling.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/compiler/pgo/pgo.gni") 6 | import("//build/config/coverage/coverage.gni") 7 | 8 | declare_args() { 9 | use_clang_profiling = 10 | is_a_target_toolchain && (use_clang_coverage || chrome_pgo_phase == 1) 11 | } 12 | 13 | assert(!use_clang_profiling || is_clang, 14 | "Clang Source-based profiling requires clang.") 15 | -------------------------------------------------------------------------------- /config/clang/clang.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/toolchain.gni") 6 | 7 | default_clang_base_path = "//third_party/llvm-build/Release+Asserts" 8 | 9 | declare_args() { 10 | # Indicates if the build should use the Chrome-specific plugins for enforcing 11 | # coding guidelines, etc. 12 | clang_use_chrome_plugins = false 13 | 14 | clang_base_path = default_clang_base_path 15 | } 16 | -------------------------------------------------------------------------------- /linux/unbundle/dav1d.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_dav1d") { 5 | packages = [ "dav1d" ] 6 | } 7 | 8 | shim_headers("dav1d_shim") { 9 | root_path = "libdav1d/include" 10 | headers = [ 11 | "dav1d/common.h", 12 | "dav1d/data.h", 13 | "dav1d/dav1d.h", 14 | "dav1d/headers.h", 15 | "dav1d/picture.h", 16 | "dav1d/version.h", 17 | ] 18 | } 19 | 20 | source_set("dav1d") { 21 | deps = [ ":dav1d_shim" ] 22 | public_configs = [ ":system_dav1d" ] 23 | } 24 | -------------------------------------------------------------------------------- /linux/unbundle/swiftshader-SPIRV-Headers.gn: -------------------------------------------------------------------------------- 1 | import("//build/shim_headers.gni") 2 | 3 | shim_headers("SPIRV-Headers_shim") { 4 | root_path = "../../../../third_party/SPIRV-Headers/include" 5 | headers = [ 6 | "spirv/unified1/GLSL.std.450.h", 7 | "spirv/unified1/NonSemanticClspvReflection.h", 8 | "spirv/unified1/NonSemanticDebugPrintf.h", 9 | "spirv/unified1/OpenCL.std.h", 10 | "spirv/unified1/spirv.h", 11 | "spirv/unified1/spirv.hpp", 12 | ] 13 | } 14 | 15 | source_set("spv_headers") { 16 | deps = [ ":SPIRV-Headers_shim" ] 17 | } 18 | -------------------------------------------------------------------------------- /android/pylib/base/test_server.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | class TestServer: 7 | """Base class for any server that needs to be set up for the tests.""" 8 | 9 | def __init__(self, *args, **kwargs): 10 | pass 11 | 12 | def SetUp(self): 13 | raise NotImplementedError 14 | 15 | def Reset(self): 16 | raise NotImplementedError 17 | 18 | def TearDown(self): 19 | raise NotImplementedError 20 | -------------------------------------------------------------------------------- /config/mac/BuildInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DTCompiler 6 | ${GCC_VERSION} 7 | DTSDKBuild 8 | ${MAC_SDK_BUILD} 9 | DTSDKName 10 | ${MAC_SDK_NAME} 11 | DTXcode 12 | ${XCODE_VERSION} 13 | DTXcodeBuild 14 | ${XCODE_BUILD} 15 | 16 | 17 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_executable/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | #if defined(RUST_ENABLED) 8 | #include "build/rust/tests/test_mixed_executable/src/lib.rs.h" 9 | #endif 10 | 11 | int main(int argc, const char* argv[]) { 12 | #if defined(RUST_ENABLED) 13 | print_message_from_rust(); 14 | #else 15 | std::cout << "Here is a message from C++.\n"; 16 | #endif 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /android/java/test/NewApiLintTest.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test; 6 | 7 | import android.app.Application; 8 | 9 | /** 10 | * Class which fails 'NewAPI' lint check. 11 | */ 12 | public class NewApiTest extends Application { 13 | public String testTriggerNewApiCheck() { 14 | // This was added in API level 30. 15 | return getApplicationContext().getAttributionTag(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/pylib/base/output_manager_test_case.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | import os.path 7 | import unittest 8 | 9 | 10 | class OutputManagerTestCase(unittest.TestCase): 11 | 12 | def assertUsableTempFile(self, archived_tempfile): 13 | self.assertTrue(bool(archived_tempfile.name)) 14 | self.assertTrue(os.path.exists(archived_tempfile.name)) 15 | self.assertTrue(os.path.isfile(archived_tempfile.name)) 16 | -------------------------------------------------------------------------------- /android/pylib/local/machine/local_machine_environment.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | from pylib.base import environment 6 | 7 | 8 | class LocalMachineEnvironment(environment.Environment): 9 | 10 | def __init__(self, _args, output_manager, _error_func): 11 | super().__init__(output_manager) 12 | 13 | #override 14 | def SetUp(self): 15 | pass 16 | 17 | #override 18 | def TearDown(self): 19 | pass 20 | -------------------------------------------------------------------------------- /sanitize-win-build-log.sed: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # Use this sed script to reduce a Windows build log into something 6 | # machine-parsable. 7 | 8 | # Drop uninformative lines. 9 | /The operation completed successfully\./d 10 | 11 | # Drop parallelization indicators on lines. 12 | s/^[0-9]+>// 13 | 14 | # Shorten bindings generation lines 15 | s/^.*"python".*idl_compiler\.py".*("[^"]+\.idl").*$/ idl_compiler \1/ 16 | -------------------------------------------------------------------------------- /check_return_value.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright 2014 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | """This program wraps an arbitrary command and prints "1" if the command ran 7 | successfully.""" 8 | 9 | from __future__ import print_function 10 | 11 | import os 12 | import subprocess 13 | import sys 14 | 15 | devnull = open(os.devnull, 'wb') 16 | if not subprocess.call(sys.argv[1:], stdout=devnull, stderr=devnull): 17 | print(1) 18 | else: 19 | print(0) 20 | -------------------------------------------------------------------------------- /linux/unbundle/libdrm.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("system_libdrm") { 9 | packages = [ "libdrm" ] 10 | } 11 | 12 | shim_headers("libdrm_shim") { 13 | root_path = "src/include" 14 | headers = [ "drm.h" ] 15 | } 16 | 17 | source_set("libdrm") { 18 | deps = [ ":libdrm_shim" ] 19 | public_configs = [ ":system_libdrm" ] 20 | } 21 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_testonly_executable/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | #if defined(RUST_ENABLED) 8 | #include "build/rust/tests/test_mixed_testonly_executable/src/lib.rs.h" 9 | #endif 10 | 11 | int main(int argc, const char* argv[]) { 12 | #if defined(RUST_ENABLED) 13 | print_message_from_rust(); 14 | #else 15 | std::cout << "Here is a message from C++.\n"; 16 | #endif 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /rust/tests/test_rs_bindings_from_cc/self_contained_target_header1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER1_H_ 6 | #define BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER1_H_ 7 | 8 | inline int MultiplyViaCc(int x, int y) { 9 | return x * y; 10 | } 11 | 12 | #endif // BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER1_H_ 13 | -------------------------------------------------------------------------------- /android/pylib/restart_adbd.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | # Copyright 2014 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | # Android shell script to restart adbd on the device. This has to be run 8 | # atomically as a shell script because stopping adbd prevents further commands 9 | # from running (even if called in the same adb shell). 10 | 11 | trap '' HUP 12 | trap '' TERM 13 | trap '' PIPE 14 | 15 | function restart() { 16 | stop adbd 17 | start adbd 18 | } 19 | 20 | restart & 21 | -------------------------------------------------------------------------------- /config/fuchsia/test/audio_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "facets": { 3 | "fuchsia.test": { 4 | "injected-services": { 5 | "fuchsia.mediacodec.CodecFactory": "fuchsia-pkg://fuchsia.com/codec_factory#meta/codec_factory.cmx" 6 | }, 7 | "system-services": [ 8 | "fuchsia.media.Audio", 9 | "fuchsia.media.AudioDeviceEnumerator" 10 | ] 11 | } 12 | }, 13 | "sandbox": { 14 | "services": [ 15 | "fuchsia.media.Audio", 16 | "fuchsia.media.AudioDeviceEnumerator", 17 | "fuchsia.mediacodec.CodecFactory" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /linux/unbundle/absl_algorithm.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_algorithm_container") { 5 | packages = [ "absl_algorithm_container" ] 6 | } 7 | 8 | shim_headers("container_shim") { 9 | root_path = "." 10 | prefix = "absl/algorithm/" 11 | headers = [ "container.h" ] 12 | } 13 | 14 | source_set("container") { 15 | deps = [ ":container_shim" ] 16 | public_configs = [ ":system_absl_algorithm_container" ] 17 | } 18 | 19 | source_set("algorithm_test") { 20 | } 21 | source_set("container_test") { 22 | } 23 | -------------------------------------------------------------------------------- /rust/tests/test_rust_unittests/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #![feature(test)] 6 | extern crate test; 7 | 8 | use test::Bencher; 9 | use test_mixed_static_library::add_two_ints_using_cpp; 10 | 11 | #[test] 12 | fn test_call_into_mixed_static_library() { 13 | assert_eq!(add_two_ints_using_cpp(5, 7), 12) 14 | } 15 | 16 | #[allow(soft_unstable)] 17 | #[bench] 18 | fn test_benchmark(b: &mut Bencher) { 19 | b.iter(|| 2 + 2); 20 | } 21 | -------------------------------------------------------------------------------- /toolchain/get_cpu_count.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This script shows cpu count to specify capacity of action pool. 6 | 7 | from __future__ import print_function 8 | 9 | import multiprocessing 10 | import sys 11 | 12 | def main(): 13 | try: 14 | cpu_count = multiprocessing.cpu_count() 15 | except: 16 | cpu_count = 1 17 | 18 | print(cpu_count) 19 | return 0 20 | 21 | 22 | if __name__ == '__main__': 23 | sys.exit(main()) 24 | -------------------------------------------------------------------------------- /linux/unbundle/vulkan-SPIRV-Headers.gn: -------------------------------------------------------------------------------- 1 | # This shim can only be used if you build Chromium without DAWN 2 | 3 | import("//build/shim_headers.gni") 4 | 5 | shim_headers("vulkan-SPIRV-Headers_shim") { 6 | root_path = "include" 7 | headers = [ 8 | "spirv/unified1/GLSL.std.450.h", 9 | "spirv/unified1/NonSemanticClspvReflection.h", 10 | "spirv/unified1/NonSemanticDebugPrintf.h", 11 | "spirv/unified1/OpenCL.std.h", 12 | "spirv/unified1/spirv.h", 13 | "spirv/unified1/spirv.hpp", 14 | ] 15 | } 16 | 17 | source_set("spv_headers") { 18 | deps = [ ":vulkan-SPIRV-Headers_shim" ] 19 | } 20 | -------------------------------------------------------------------------------- /rust/tests/test_rs_bindings_from_cc/self_contained_target_header2.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER2_H_ 6 | #define BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER2_H_ 7 | 8 | int AddViaCc(int x, int y); 9 | 10 | struct CcPodStruct { 11 | int value; 12 | }; 13 | 14 | #endif // BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_SELF_CONTAINED_TARGET_HEADER2_H_ 15 | -------------------------------------------------------------------------------- /toolchain/aix/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/gcc_toolchain.gni") 6 | 7 | gcc_toolchain("ppc64") { 8 | cc = "gcc" 9 | cxx = "g++" 10 | 11 | readelf = "readelf" 12 | nm = "nm" 13 | ar = "ar" 14 | ld = cxx 15 | 16 | toolchain_args = { 17 | current_cpu = "ppc64" 18 | current_os = "aix" 19 | 20 | # reclient does not support gcc. 21 | use_remoteexec = false 22 | is_clang = false 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /linux/unbundle/absl_synchronization.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_synchronization") { 5 | packages = [ "absl_synchronization" ] 6 | } 7 | 8 | shim_headers("synchronization_shim") { 9 | root_path = "." 10 | prefix = "absl/synchronization/" 11 | headers = [ 12 | "barrier.h", 13 | "blocking_counter.h", 14 | "mutex.h", 15 | "notification.h", 16 | ] 17 | } 18 | 19 | source_set("synchronization") { 20 | deps = [ ":synchronization_shim" ] 21 | public_configs = [ ":system_absl_synchronization" ] 22 | } 23 | -------------------------------------------------------------------------------- /linux/unbundle/libpng.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("libpng_config") { 9 | packages = [ "libpng" ] 10 | } 11 | 12 | shim_headers("libpng_shim") { 13 | root_path = "." 14 | headers = [ 15 | "png.h", 16 | "pngconf.h", 17 | ] 18 | } 19 | 20 | source_set("libpng") { 21 | deps = [ ":libpng_shim" ] 22 | public_configs = [ ":libpng_config" ] 23 | } 24 | -------------------------------------------------------------------------------- /config/compute_inputs_for_analyze.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Enable this flag when running "gn analyze". 7 | # 8 | # This causes some gn actions to compute inputs immediately (via exec_script) 9 | # where they would normally compute them only when executed (and write them to 10 | # a depfile). 11 | # 12 | # This flag will slow down GN, but is required for analyze to work properly. 13 | compute_inputs_for_analyze = false 14 | } 15 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/v1/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_static_library.gni") 6 | 7 | rust_static_library("test_lib") { 8 | epoch = "1" 9 | sources = [ "src/lib.rs" ] 10 | 11 | # TODO(crbug.com/1304751): This should be true to test that we avoid collision 12 | # between v1 and v2 unit tests. The output binary should be versioned or 13 | # renamed somehow. 14 | build_native_rust_unit_tests = false 15 | } 16 | -------------------------------------------------------------------------------- /rust/tests/test_rust_multiple_dep_versions_exe/v2/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_static_library.gni") 6 | 7 | rust_static_library("test_lib") { 8 | epoch = "2" 9 | sources = [ "src/lib.rs" ] 10 | 11 | # TODO(crbug.com/1304751): This should be true to test that we avoid collision 12 | # between v1 and v2 unit tests. The output binary should be versioned or 13 | # renamed somehow. 14 | build_native_rust_unit_tests = false 15 | } 16 | -------------------------------------------------------------------------------- /config/linux/libva/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | 7 | assert(is_linux || is_chromeos, "This file should only be referenced on Linux") 8 | 9 | pkg_config("libva") { 10 | packages = [ "libva" ] 11 | 12 | # Do not use exec_script to check the version here. It is done with a 13 | # static_assert instead. 14 | 15 | # vaapi decoders use dlopen pre-sandbox anyway to improve startup times. 16 | ignore_libs = true 17 | } 18 | -------------------------------------------------------------------------------- /config/linux/nss/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | 7 | if (is_linux || is_chromeos) { 8 | # This is a dependency on NSS with no libssl3. On Linux and Chrome OS, we use 9 | # NSS for platform certificate integration. We use our own TLS library, so 10 | # exclude the one from NSS. 11 | pkg_config("nss") { 12 | packages = [ "nss" ] 13 | extra_args = [ 14 | "-v", 15 | "-lssl3", 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /config/mac/mac_sdk_overrides.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file contains arguments that subprojects may choose to override. It 6 | # asserts that those overrides are used, to prevent unused args warnings. 7 | 8 | _sdk_min_from_env = getenv("FORCE_MAC_SDK_MIN") 9 | declare_args() { 10 | # Minimum supported version of the Mac SDK. 11 | if (_sdk_min_from_env == "") { 12 | mac_sdk_min = "10.15" 13 | } else { 14 | mac_sdk_min = _sdk_min_from_env 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/java/test/DefaultLocaleLintTest.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test; 6 | 7 | import android.app.Application; 8 | 9 | /** 10 | * Class which fails 'DefaultLocale' lint check. 11 | */ 12 | public class LintTest extends Application { 13 | public String testTriggerDefaultLocaleCheck(int any) { 14 | // String format with an integer requires a Locale since it may be formatted differently. 15 | return String.format("Test %d", any); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/java/test/NoSignatureChangeIncrementalJavacTestHelper.template: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package test; 6 | 7 | public class NoSignatureChangeIncrementalJavacTestHelper { 8 | private NoSignatureChangeIncrementalJavacTestHelper2 mHelper2 = 9 | new NoSignatureChangeIncrementalJavacTestHelper2(); 10 | 11 | public String foo() { 12 | return "{{foo_return_value}}"; 13 | } 14 | 15 | public String bar() { 16 | return mHelper2.bar(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /rust/tests/test_variable_static_library/test_variable_static_library.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_VARIABLE_STATIC_LIBRARY_TEST_VARIABLE_STATIC_LIBRARY_H_ 6 | #define BUILD_RUST_TESTS_TEST_VARIABLE_STATIC_LIBRARY_TEST_VARIABLE_STATIC_LIBRARY_H_ 7 | 8 | #include 9 | 10 | void do_something_in_sandbox_or_memory_safe_language(const std::string& input); 11 | 12 | #endif // BUILD_RUST_TESTS_TEST_VARIABLE_STATIC_LIBRARY_TEST_VARIABLE_STATIC_LIBRARY_H_ 13 | -------------------------------------------------------------------------------- /config/android/channel.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # The channel to build on Android: stable, beta, dev, canary, work, or 7 | # default. "default" should be used on non-official builds. 8 | android_channel = "default" 9 | } 10 | 11 | assert(android_channel == "default" || android_channel == "canary" || 12 | android_channel == "dev" || android_channel == "beta" || 13 | android_channel == "stable", 14 | "Invalid channel: " + android_channel) 15 | -------------------------------------------------------------------------------- /rust/tests/test_rust_static_library_non_standard_arrangement/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_static_library.gni") 6 | 7 | rust_static_library("test_rust_static_library_non_standard_arrangement") { 8 | sources = [ "foo.rs" ] 9 | crate_root = "foo.rs" 10 | unit_test_target = "foo_tests" 11 | 12 | # TODO(danakj): We should write a gtest binary instead of using native rust 13 | # tests outside of a cargo_crate(). 14 | build_native_rust_unit_tests = true 15 | } 16 | -------------------------------------------------------------------------------- /config/fuchsia/test/fonts.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | children: [ 3 | { 4 | name: "isolated_font_provider", 5 | url: "fuchsia-pkg://fuchsia.com/fonts#meta/fonts.cm", 6 | }, 7 | ], 8 | offer: [ 9 | { 10 | directory: "config-data", 11 | subdir: "fonts", 12 | from: "parent", 13 | to: "#isolated_font_provider", 14 | }, 15 | { 16 | protocol: "fuchsia.logger.LogSink", 17 | from: "parent", 18 | to: "#isolated_font_provider", 19 | }, 20 | ], 21 | use: [ 22 | { 23 | protocol: "fuchsia.fonts.Provider", 24 | from: "#isolated_font_provider", 25 | }, 26 | ], 27 | } 28 | -------------------------------------------------------------------------------- /config/pch.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/goma.gni") 6 | import("//build/toolchain/rbe.gni") 7 | 8 | declare_args() { 9 | # Precompiled header file support is by default available, 10 | # but for distributed build system uses (like goma or rbe) or when 11 | # doing official builds. 12 | # On Linux it slows down the build, so don't enable it by default. 13 | enable_precompiled_headers = 14 | !is_official_build && !(use_goma || use_remoteexec) && !is_linux 15 | } 16 | -------------------------------------------------------------------------------- /android/adb_chrome_public_command_line: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2015 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | # If no flags are given, prints the current Chrome flags. 8 | # 9 | # Otherwise, the given flags are used to REPLACE (not modify) the Chrome 10 | # flags. For example: 11 | # adb_chrome_public_command_line --enable-webgl 12 | # 13 | # To remove all Chrome flags, pass an empty string for the flags: 14 | # adb_chrome_public_command_line "" 15 | 16 | exec $(dirname $0)/adb_command_line.py --name chrome-command-line "$@" 17 | -------------------------------------------------------------------------------- /config/linux/pangocairo/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pangocairo/pangocairo.gni") 6 | import("//build/config/linux/pkg_config.gni") 7 | 8 | if (use_pangocairo) { 9 | pkg_config("pangocairo") { 10 | packages = [ "pangocairo" ] 11 | 12 | # We don't want pkgconfig for pangocairo to explicitly request FreeType to get 13 | # linked, because we control which FreeType to link to. 14 | extra_args = [ 15 | "-v", 16 | "freetype", 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /config/fuchsia/test/test_fonts.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | children: [ 3 | { 4 | name: "test_fonts", 5 | url: "fuchsia-pkg://fuchsia.com/fonts#meta/fonts.cm", 6 | }, 7 | ], 8 | offer: [ 9 | { 10 | protocol: "fuchsia.logger.LogSink", 11 | from: "parent", 12 | to: "#test_fonts", 13 | }, 14 | { 15 | directory: "pkg", 16 | subdir: "test_fonts", 17 | from: "framework", 18 | to: "#test_fonts", 19 | as: "config-data", 20 | rights: [ "r*" ], 21 | } 22 | ], 23 | use: [ 24 | { 25 | protocol: "fuchsia.fonts.Provider", 26 | from: "#test_fonts", 27 | }, 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /linux/libpci/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//tools/generate_library_loader/generate_library_loader.gni") 6 | 7 | # This generates a target named "libpci". 8 | generate_library_loader("libpci") { 9 | name = "LibPciLoader" 10 | output_h = "libpci.h" 11 | output_cc = "libpci_loader.cc" 12 | header = "" 13 | 14 | functions = [ 15 | "pci_alloc", 16 | "pci_init", 17 | "pci_cleanup", 18 | "pci_scan_bus", 19 | "pci_fill_info", 20 | "pci_lookup_name", 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /android/test/nocompile_gn/nocompile_sources.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | default_locale_lint_test_nocompile_sources = 6 | [ "../../java/test/DefaultLocaleLintTest.java" ] 7 | 8 | new_api_lint_test_nocompile_sources = [ "../../java/test/NewApiLintTest.java" ] 9 | 10 | import_child_missing_symbol_test_nocompile_sources = 11 | [ "../../java/test/missing_symbol/ImportsSubB.java" ] 12 | 13 | import_turbine_missing_symbol_test_nocompile_sources = 14 | [ "../../java/test/missing_symbol/sub/BInMethodSignature.java" ] 15 | -------------------------------------------------------------------------------- /config/linux/libffi/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | 7 | if (default_toolchain == "//build/toolchain/cros:target") { 8 | pkg_config("libffi") { 9 | packages = [ "libffi" ] 10 | } 11 | } else { 12 | # On Linux, statically link libffi. This is necessary to prevent a situation 13 | # where the runtime version of libffi is different from the build-time version 14 | # from the sysroot. 15 | config("libffi") { 16 | libs = [ ":libffi_pic.a" ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dir_exists.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | """Writes True if the argument is a directory.""" 6 | 7 | import os.path 8 | import sys 9 | 10 | def main(): 11 | sys.stdout.write(_is_dir(sys.argv[1])) 12 | return 0 13 | 14 | def _is_dir(dir_name): 15 | return str(os.path.isdir(dir_name)) 16 | 17 | def DoMain(args): 18 | """Hook to be called from gyp without starting a separate python 19 | interpreter.""" 20 | return _is_dir(args[0]) 21 | 22 | if __name__ == '__main__': 23 | sys.exit(main()) 24 | -------------------------------------------------------------------------------- /android/gtest_apk/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/android/rules.gni") 6 | 7 | android_library("native_test_instrumentation_test_runner_java") { 8 | testonly = true 9 | sources = [ 10 | "java/src/org/chromium/build/gtest_apk/NativeTestInstrumentationTestRunner.java", 11 | "java/src/org/chromium/build/gtest_apk/NativeTestIntent.java", 12 | "java/src/org/chromium/build/gtest_apk/TestStatusIntent.java", 13 | "java/src/org/chromium/build/gtest_apk/TestStatusReceiver.java", 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /config/android/test/proto/root/relative_root.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | import "relative_child.proto"; 11 | import "build/config/android/test/proto/absolute_dep/absolute_dep.proto"; 12 | import "relative_dep.proto"; 13 | 14 | message RelativeRoot { 15 | optional RelativeChild relative_child = 1; 16 | optional AbsoluteDep absolute_dep = 2; 17 | optional RelativeDep relative_dep = 3; 18 | } 19 | -------------------------------------------------------------------------------- /config/ios/ios_sdk_overrides.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file contains arguments that subprojects may choose to override. It 6 | # asserts that those overrides are used, to prevent unused args warnings. 7 | 8 | declare_args() { 9 | # Version of iOS that we're targeting. 10 | ios_deployment_target = "14.0" 11 | } 12 | 13 | # Always assert that ios_deployment_target is used on non-iOS platforms to 14 | # prevent unused args warnings. 15 | if (!is_ios) { 16 | assert(ios_deployment_target == "14.0" || true) 17 | } 18 | -------------------------------------------------------------------------------- /android/adb_system_webview_command_line: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2013 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | # If no flags are given, prints the current content shell flags. 8 | # 9 | # Otherwise, the given flags are used to REPLACE (not modify) the content shell 10 | # flags. For example: 11 | # adb_system_webview_command_line --enable-webgl 12 | # 13 | # To remove all content shell flags, pass an empty string for the flags: 14 | # adb_system_webview_command_line "" 15 | 16 | exec $(dirname $0)/adb_command_line.py --name webview-command-line "$@" 17 | -------------------------------------------------------------------------------- /android/pylib/device/commands/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/android/rules.gni") 6 | 7 | group("commands") { 8 | data_deps = [ ":chromium_commands_java" ] 9 | } 10 | 11 | android_library("unzip_java") { 12 | jacoco_never_instrument = true 13 | sources = [ "java/src/org/chromium/android/commands/unzip/Unzip.java" ] 14 | } 15 | 16 | dist_dex("chromium_commands_java") { 17 | deps = [ ":unzip_java" ] 18 | output = "$root_build_dir/lib.java/chromium_commands.dex.jar" 19 | data = [ output ] 20 | } 21 | -------------------------------------------------------------------------------- /linux/unbundle/jsoncpp.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("jsoncpp_config") { 5 | packages = [ "jsoncpp" ] 6 | } 7 | 8 | shim_headers("jsoncpp_shim") { 9 | root_path = "source/include" 10 | headers = [ 11 | "json/allocator.h", 12 | "json/assertions.h", 13 | "json/config.h", 14 | "json/forwards.h", 15 | "json/json.h", 16 | "json/json_features.h", 17 | "json/reader.h", 18 | "json/value.h", 19 | "json/version.h", 20 | "json/writer.h", 21 | ] 22 | } 23 | 24 | source_set("jsoncpp") { 25 | deps = [ ":jsoncpp_shim" ] 26 | public_configs = [ ":jsoncpp_config" ] 27 | } 28 | -------------------------------------------------------------------------------- /cp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | """Copy a file. 7 | 8 | This module works much like the cp posix command - it takes 2 arguments: 9 | (src, dst) and copies the file with path |src| to |dst|. 10 | """ 11 | 12 | import os 13 | import shutil 14 | import sys 15 | 16 | 17 | def Main(src, dst): 18 | # Use copy instead of copyfile to ensure the executable bit is copied. 19 | return shutil.copy(src, os.path.normpath(dst)) 20 | 21 | 22 | if __name__ == '__main__': 23 | sys.exit(Main(sys.argv[1], sys.argv[2])) 24 | -------------------------------------------------------------------------------- /util/lib/common/perf_result_data_type.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | DEFAULT = 'default' 6 | UNIMPORTANT = 'unimportant' 7 | HISTOGRAM = 'histogram' 8 | UNIMPORTANT_HISTOGRAM = 'unimportant-histogram' 9 | INFORMATIONAL = 'informational' 10 | 11 | ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM, 12 | INFORMATIONAL] 13 | 14 | 15 | def IsValidType(datatype): 16 | return datatype in ALL_TYPES 17 | 18 | 19 | def IsHistogram(datatype): 20 | return (datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM) 21 | -------------------------------------------------------------------------------- /config/ios/dummy.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | """Empty script that does nothing and return success error code. 6 | 7 | This script is used by some gn targets that pretend creating some output 8 | but instead depend on another target creating the output indirectly (in 9 | general this output is a directory that is used as input by a bundle_data 10 | target). 11 | 12 | It ignores all parameters and terminate with a success error code. It 13 | does the same thing as the unix command "true", but gn can only invoke 14 | python scripts. 15 | """ 16 | -------------------------------------------------------------------------------- /rust/tests/bindgen_test/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | mod c_ffi { 6 | #![allow(dead_code)] 7 | #![allow(non_camel_case_types)] 8 | #![allow(non_upper_case_globals)] 9 | include!(env!("BINDGEN_RS_FILE")); 10 | } 11 | 12 | pub fn add_two_numbers_in_c(a: u32, b: u32) -> u32 { 13 | unsafe { c_ffi::add_two_numbers(a, b) } 14 | } 15 | 16 | #[cfg(test)] 17 | mod tests { 18 | use super::*; 19 | 20 | #[test] 21 | fn test_add_two_numbers() { 22 | assert_eq!(add_two_numbers_in_c(5, 10), 15); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This file is needed for projects that has this directory as a separate Git 2 | # mirror in DEPS. Without it, a lot is wiped and re-downloaded for each sync. 3 | *.pyc 4 | ciopfs 5 | /android/bin 6 | /android/binary_size/apks/**/*.apk 7 | /args/chromeos/*.gni 8 | /args/chromeos/rewrapper* 9 | /config/gclient_args.gni 10 | /cros_cache/ 11 | /Debug 12 | /Debug_x64 13 | /fuchsia/internal/ 14 | /goma 15 | /gomacc.lock 16 | /ipch/ 17 | /lacros/prebuilt_ash_chrome/ 18 | /Release 19 | /Release_x64 20 | /win_toolchain.json 21 | /util/LASTCHANGE* 22 | /util/support 23 | /x64/ 24 | /linux/debian_*-sysroot/ 25 | /linux/ubuntu_*-sysroot/ 26 | /ios_files 27 | /mac_files 28 | 29 | !/util/LASTCHANGE.dummy 30 | -------------------------------------------------------------------------------- /rust/tests/test_rs_bindings_from_cc/target_depending_on_another.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_TARGET_DEPENDING_ON_ANOTHER_H_ 6 | #define BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_TARGET_DEPENDING_ON_ANOTHER_H_ 7 | 8 | #include "build/rust/tests/test_rs_bindings_from_cc/self_contained_target_header2.h" 9 | 10 | inline CcPodStruct CreateCcPodStructFromValue(int x) { 11 | return CcPodStruct{.value = x}; 12 | } 13 | 14 | #endif // BUILD_RUST_TESTS_TEST_RS_BINDINGS_FROM_CC_TARGET_DEPENDING_ON_ANOTHER_H_ 15 | -------------------------------------------------------------------------------- /android/pylib/base/output_manager_factory.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | from pylib import constants 7 | from pylib.output import local_output_manager 8 | from pylib.output import remote_output_manager 9 | from pylib.utils import local_utils 10 | 11 | 12 | def CreateOutputManager(args): 13 | if args.local_output or not local_utils.IsOnSwarming(): 14 | return local_output_manager.LocalOutputManager( 15 | output_dir=constants.GetOutDirectory()) 16 | return remote_output_manager.RemoteOutputManager( 17 | bucket=args.gs_results_bucket) 18 | -------------------------------------------------------------------------------- /util/lib/results/result_types.py: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | """Module containing base test results classes.""" 5 | 6 | # The test passed. 7 | PASS = 'SUCCESS' 8 | 9 | # The test was intentionally skipped. 10 | SKIP = 'SKIPPED' 11 | 12 | # The test failed. 13 | FAIL = 'FAILURE' 14 | 15 | # The test caused the containing process to crash. 16 | CRASH = 'CRASH' 17 | 18 | # The test timed out. 19 | TIMEOUT = 'TIMEOUT' 20 | 21 | # The test ran, but we couldn't determine what happened. 22 | UNKNOWN = 'UNKNOWN' 23 | 24 | # The test did not run. 25 | NOTRUN = 'NOTRUN' 26 | -------------------------------------------------------------------------------- /config/android/test/proto/root/absolute_root.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | syntax = "proto2"; 6 | 7 | package build.config.android.test; 8 | option java_package = "build.config.android.test"; 9 | 10 | import "build/config/android/test/proto/root/absolute_child.proto"; 11 | import "build/config/android/test/proto/absolute_dep/absolute_dep.proto"; 12 | import "relative_dep.proto"; 13 | 14 | message AbsoluteRoot { 15 | optional AbsoluteChild absolute_child = 1; 16 | optional AbsoluteDep absolute_dep = 2; 17 | optional RelativeDep relative_dep = 3; 18 | } 19 | -------------------------------------------------------------------------------- /linux/unbundle/harfbuzz-ng.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Blink uses a cutting-edge version of Harfbuzz (version listed in 7 | # third_party/harfbuzz-ng/README.chromium); most Linux distros do not contain 8 | # a new enough version of the code to work correctly. However, ChromeOS 9 | # chroots (i.e. real ChromeOS builds for devices) do contain a new enough 10 | # version of the library, and so this variable exists so that ChromeOS can 11 | # build against the system lib and keep binary sizes smaller. 12 | use_system_harfbuzz = true 13 | } 14 | -------------------------------------------------------------------------------- /rust/tests/test_rust_exe/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_executable.gni") 6 | 7 | rust_executable("test_rust_exe") { 8 | crate_root = "main.rs" 9 | sources = [ "main.rs" ] 10 | deps = [ 11 | "//build/rust/tests/test_mixed_static_library", 12 | "//build/rust/tests/test_proc_macro_crate", 13 | "//build/rust/tests/test_rlib_crate:target1", 14 | "//build/rust/tests/test_rust_static_library", 15 | "//build/rust/tests/test_rust_static_library_non_standard_arrangement", 16 | ] 17 | build_native_rust_unit_tests = true 18 | } 19 | -------------------------------------------------------------------------------- /linux/sysroot_scripts/libxcomposite1-symbols: -------------------------------------------------------------------------------- 1 | libXcomposite.so.1 libxcomposite1 #MINVER# 2 | XCompositeCreateRegionFromBorderClip@Base 1:0.4.4-1 3 | XCompositeExtensionInfo@Base 1:0.4.4-1 4 | XCompositeExtensionName@Base 1:0.4.4-1 5 | XCompositeFindDisplay@Base 1:0.4.4-1 6 | XCompositeGetOverlayWindow@Base 1:0.4.4-1 7 | XCompositeNameWindowPixmap@Base 1:0.4.4-1 8 | XCompositeQueryExtension@Base 1:0.4.4-1 9 | XCompositeQueryVersion@Base 1:0.4.4-1 10 | XCompositeRedirectSubwindows@Base 1:0.4.4-1 11 | XCompositeRedirectWindow@Base 1:0.4.4-1 12 | XCompositeReleaseOverlayWindow@Base 1:0.4.4-1 13 | XCompositeUnredirectSubwindows@Base 1:0.4.4-1 14 | XCompositeUnredirectWindow@Base 1:0.4.4-1 15 | XCompositeVersion@Base 1:0.4.4-1 16 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_shared_library/test_mixed_shared_library.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_TEST_MIXED_SHARED_LIBRARY_H_ 6 | #define BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_TEST_MIXED_SHARED_LIBRARY_H_ 7 | 8 | #include 9 | #include "build/rust/tests/test_mixed_shared_library/dependency_header.h" 10 | #include "build/rust/tests/test_mixed_shared_library/src/lib.rs.h" 11 | 12 | CustomIntType cpp_addition(uint32_t a, uint32_t b); 13 | 14 | #endif // BUILD_RUST_TESTS_TEST_MIXED_SHARED_LIBRARY_TEST_MIXED_SHARED_LIBRARY_H_ 15 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_static_library/test_mixed_static_library.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_TEST_MIXED_STATIC_LIBRARY_H_ 6 | #define BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_TEST_MIXED_STATIC_LIBRARY_H_ 7 | 8 | #include 9 | #include "build/rust/tests/test_mixed_static_library/dependency_header.h" 10 | #include "build/rust/tests/test_mixed_static_library/src/lib.rs.h" 11 | 12 | CustomIntType cpp_addition(uint32_t a, uint32_t b); 13 | 14 | #endif // BUILD_RUST_TESTS_TEST_MIXED_STATIC_LIBRARY_TEST_MIXED_STATIC_LIBRARY_H_ 15 | -------------------------------------------------------------------------------- /util/lib/common/PRESUBMIT.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | USE_PYTHON3 = True 7 | 8 | 9 | def _RunTests(input_api, output_api): 10 | return (input_api.canned_checks.RunUnitTestsInDirectory( 11 | input_api, 12 | output_api, 13 | '.', 14 | files_to_check=[r'.+_test.py$'], 15 | run_on_python2=False, 16 | skip_shebang_check=True)) 17 | 18 | 19 | def CheckChangeOnUpload(input_api, output_api): 20 | return _RunTests(input_api, output_api) 21 | 22 | 23 | def CheckChangeOnCommit(input_api, output_api): 24 | return _RunTests(input_api, output_api) 25 | -------------------------------------------------------------------------------- /android/gyp/proto/README.md: -------------------------------------------------------------------------------- 1 | # Protos 2 | These protos are generated from Resources.proto and Configuration.proto from the 3 | Android repo. They are found in the frameworks/base/tools/aapt2/ directory. To 4 | regenerate these if there are changes, run this command from the root of an 5 | Android checkout: 6 | 7 | protoc --python_out=some_dir frameworks/base/tools/aapt2/Resources.proto \ 8 | frameworks/base/tools/aapt2/Configuration.proto 9 | 10 | Then copy the resulting \*pb2.py files from some_dir here. To make sure 11 | Resources_pb2.py is able to import Configuration_pb2.py, replace the 12 | "from frameworks.base.tools.aapt2" portion of the import statement with 13 | "from ." so it will instead be imported from the current directory. 14 | -------------------------------------------------------------------------------- /android/gradle/cmake.jinja: -------------------------------------------------------------------------------- 1 | {# Copyright 2018 The Chromium Authors. All rights reserved. #} 2 | {# Use of this source code is governed by a BSD-style license that can be #} 3 | {# found in the LICENSE file. #} 4 | # Generated by //build/android/generate_gradle.py 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | project(chrome C CXX) 9 | 10 | {% if native.includes is defined %} 11 | include_directories( 12 | {% for path in native.includes %} 13 | {{ path }} 14 | {% endfor %} 15 | ) 16 | {% endif %} 17 | 18 | # Android studio will index faster when adding all sources into one library. 19 | {% if native.sources is defined %} 20 | add_library("chromium" 21 | {% for path in native.sources %} 22 | {{ path }} 23 | {% endfor %} 24 | ) 25 | {% endif %} 26 | -------------------------------------------------------------------------------- /toolchain/apple/get_tool_mtime.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | from __future__ import print_function 6 | 7 | import os 8 | import sys 9 | 10 | # Usage: python get_tool_mtime.py path/to/file1.py path/to/file2.py 11 | # 12 | # Prints a GN scope with the variable name being the basename sans-extension 13 | # and the value being the file modification time. A variable is emitted for 14 | # each file argument on the command line. 15 | 16 | if __name__ == '__main__': 17 | for f in sys.argv[1:]: 18 | variable = os.path.splitext(os.path.basename(f))[0] 19 | print('%s = %d' % (variable, os.path.getmtime(f))) 20 | -------------------------------------------------------------------------------- /android/docs/README.md: -------------------------------------------------------------------------------- 1 | # Android Build Docs 2 | 3 | * [//docs/android_build_instructions.md](/docs/android_build_instructions.md) 4 | * [//docs/android_dynamic_feature_modules.md](/docs/android_dynamic_feature_modules.md) 5 | * [build_config.md](build_config.md) 6 | * [coverage.md](coverage.md) 7 | * [java_toolchain.md](java_toolchain.md) 8 | * [java_optimization.md](java_optimization.md) 9 | * [lint.md](lint.md) 10 | * [life_of_a_resource.md](life_of_a_resource.md) 11 | * [../incremental_install/README.md](../incremental_install/README.md) 12 | * [//docs/ui/android/bytecode_rewriting.md](/docs/ui/android/bytecode_rewriting.md) 13 | * [go/doubledown](https://goto.google.com/doubledown) (Googlers only) 14 | 15 | See also: 16 | * [//build/README.md](../../README.md) 17 | -------------------------------------------------------------------------------- /linux/unbundle/double-conversion.gn: -------------------------------------------------------------------------------- 1 | import("//build/shim_headers.gni") 2 | 3 | shim_headers("double_conversion_shim") { 4 | root_path = "." 5 | headers = [ 6 | "double-conversion/bignum.h", 7 | "double-conversion/cached-powers.h", 8 | "double-conversion/diy-fp.h", 9 | "double-conversion/double-conversion.h", 10 | "double-conversion/double-to-string.h", 11 | "double-conversion/fast-dtoa.h", 12 | "double-conversion/fixed-dtoa.h", 13 | "double-conversion/ieee.h", 14 | "double-conversion/string-to-double.h", 15 | "double-conversion/strtod.h", 16 | "double-conversion/utils.h", 17 | ] 18 | } 19 | 20 | source_set("double_conversion") { 21 | deps = [ ":double_conversion_shim" ] 22 | libs = [ "double-conversion" ] 23 | } 24 | -------------------------------------------------------------------------------- /config/linux/dri/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | 7 | assert(is_linux, "This file should only be referenced on Linux") 8 | 9 | pkg_config("dri") { 10 | packages = [ "dri" ] 11 | dri_driver_dir = exec_script(pkg_config_script, 12 | common_pkg_config_args + pkg_config_args + [ 13 | "--dridriverdir", 14 | "dri", 15 | ], 16 | "string") 17 | defines = [ "DRI_DRIVER_DIR=\"$dri_driver_dir\"" ] 18 | } 19 | -------------------------------------------------------------------------------- /config/buildflags_paint_preview.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/chromecast_build.gni") 6 | import("//build/config/features.gni") 7 | 8 | declare_args() { 9 | # Enable basic paint preview support. Does not work on iOS. Should 10 | # not be included with Chromecast hardware devices. 11 | # Used by //components/paint_preview and //third_party/harfbuzz-ng. 12 | # TODO(crbug.com/webrtc/11223) Move back this file in 13 | # //components/paint_preview/ once WebRTC doesn't roll harfbuzz-ng anymore, 14 | # for consistency sake. 15 | enable_paint_preview = !is_castos && !is_cast_android && !is_ios 16 | } 17 | -------------------------------------------------------------------------------- /linux/unbundle/absl_numeric.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_bits") { 5 | packages = [ "absl_bits" ] 6 | } 7 | 8 | pkg_config("system_absl_int128") { 9 | packages = [ "absl_int128" ] 10 | } 11 | 12 | shim_headers("bits_shim") { 13 | root_path = "." 14 | prefix = "absl/numeric/" 15 | headers = [ "bits.h" ] 16 | } 17 | 18 | source_set("bits") { 19 | deps = [ ":bits_shim" ] 20 | public_configs = [ ":system_absl_bits" ] 21 | } 22 | 23 | shim_headers("int128_shim") { 24 | root_path = "." 25 | prefix = "absl/numeric/" 26 | headers = [ "int128.h" ] 27 | } 28 | 29 | source_set("int128") { 30 | deps = [ ":int128_shim" ] 31 | public_configs = [ ":system_absl_int128" ] 32 | } 33 | -------------------------------------------------------------------------------- /config/win/console_app.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/sanitizers/sanitizers.gni") 6 | 7 | declare_args() { 8 | # If true, builds as a console app (rather than a windowed app), which allows 9 | # logging to be printed to the user. This will cause a terminal window to pop 10 | # up when the executable is not run from the command line, so should only be 11 | # used for development. Only has an effect on Windows builds. 12 | win_console_app = false 13 | } 14 | 15 | if (is_win && is_asan) { 16 | # AddressSanitizer build should be a console app since it writes to stderr. 17 | win_console_app = true 18 | } 19 | -------------------------------------------------------------------------------- /linux/unbundle/freetype.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Blink needs a recent and properly build-configured FreeType version to 7 | # support OpenType variations, color emoji and avoid security bugs. By default 8 | # we ship and link such a version as part of Chrome. For distributions that 9 | # prefer to keep linking to the version the system, FreeType must be newer 10 | # than version 2.7.1 and have color bitmap support compiled in. WARNING: 11 | # System FreeType configurations other than as described WILL INTRODUCE TEXT 12 | # RENDERING AND SECURITY REGRESSIONS. 13 | use_system_freetype = true 14 | } 15 | -------------------------------------------------------------------------------- /toolchain/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/concurrent_links.gni") 6 | import("//build/toolchain/goma.gni") 7 | import("//build/toolchain/rbe.gni") 8 | 9 | declare_args() { 10 | # Pool for non goma tasks. 11 | action_pool_depth = -1 12 | } 13 | 14 | if (current_toolchain == default_toolchain) { 15 | if (action_pool_depth == -1 || (use_goma || use_remoteexec)) { 16 | action_pool_depth = exec_script("get_cpu_count.py", [], "value") 17 | } 18 | 19 | pool("link_pool") { 20 | depth = concurrent_links 21 | } 22 | 23 | pool("action_pool") { 24 | depth = action_pool_depth 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /android/pylib/utils/local_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | """Utilities for determining if a test is being run locally or not.""" 5 | 6 | import os 7 | 8 | 9 | def IsOnSwarming(): 10 | """Determines whether we are on swarming or not. 11 | 12 | Returns: 13 | True if the test is being run on swarming, otherwise False. 14 | """ 15 | # Look for the presence of the SWARMING_SERVER environment variable as a 16 | # heuristic to determine whether we're running on a workstation or a bot. 17 | # This should always be set on swarming, but would be strange to be set on 18 | # a workstation. 19 | return 'SWARMING_SERVER' in os.environ 20 | -------------------------------------------------------------------------------- /config/freetype/freetype.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Blink needs a recent and properly build-configured FreeType version to 7 | # support OpenType variations, color emoji and avoid security bugs. By default 8 | # we ship and link such a version as part of Chrome. For distributions that 9 | # prefer to keep linking to the version the system, FreeType must be newer 10 | # than version 2.7.1 and have color bitmap support compiled in. WARNING: 11 | # System FreeType configurations other than as described WILL INTRODUCE TEXT 12 | # RENDERING AND SECURITY REGRESSIONS. 13 | use_system_freetype = false 14 | } 15 | -------------------------------------------------------------------------------- /rust/rust_macro.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/rust.gni") 6 | import("//build/rust/rust_target.gni") 7 | 8 | # Template for generating a Rust proc-macro library. Such targets produce a 9 | # dynamic library that is loaded during compilation and used to generate Rust 10 | # code for compilation. 11 | template("rust_macro") { 12 | rust_target(target_name) { 13 | forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY) 14 | forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) 15 | 16 | # Has rust_target generate a rust_proc_macro GN output. 17 | target_type = "rust_proc_macro" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /toolchain/apple/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/concurrent_links.gni") 6 | 7 | declare_args() { 8 | # Reduce the number of tasks using the copy_bundle_data and compile_xcassets 9 | # tools as they can cause lots of I/O contention when invoking ninja with a 10 | # large number of parallel jobs (e.g. when using distributed build like goma). 11 | bundle_pool_depth = -1 12 | } 13 | 14 | if (current_toolchain == default_toolchain) { 15 | pool("bundle_pool") { 16 | if (bundle_pool_depth == -1) { 17 | depth = concurrent_links 18 | } else { 19 | depth = bundle_pool_depth 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /android/pylib/pexpect.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | from __future__ import absolute_import 5 | 6 | import os 7 | import sys 8 | 9 | _CHROME_SRC = os.path.join( 10 | os.path.abspath(os.path.dirname(__file__)), '..', '..', '..') 11 | 12 | _PEXPECT_PATH = os.path.join(_CHROME_SRC, 'third_party', 'pexpect') 13 | if _PEXPECT_PATH not in sys.path: 14 | sys.path.append(_PEXPECT_PATH) 15 | 16 | # pexpect is not available on all platforms. We allow this file to be imported 17 | # on platforms without pexpect and only fail when pexpect is actually used. 18 | try: 19 | from pexpect import * # pylint: disable=W0401,W0614 20 | except ImportError: 21 | pass 22 | -------------------------------------------------------------------------------- /android/bytecode/java/org/chromium/bytecode/MethodDescription.java: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.bytecode; 6 | 7 | class MethodDescription { 8 | public final String methodName; 9 | public final String description; 10 | public final int access; 11 | public Boolean shouldCreateOverride; 12 | 13 | public MethodDescription(String methodName, String description, int access) { 14 | this.methodName = methodName; 15 | this.description = description; 16 | this.access = access; 17 | // A null value means we haven't checked the method. 18 | this.shouldCreateOverride = null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /linux/unbundle/flac.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("system_flac") { 9 | packages = [ "flac" ] 10 | } 11 | 12 | shim_headers("flac_shim") { 13 | root_path = "include" 14 | headers = [ 15 | "FLAC/all.h", 16 | "FLAC/assert.h", 17 | "FLAC/callback.h", 18 | "FLAC/export.h", 19 | "FLAC/format.h", 20 | "FLAC/metadata.h", 21 | "FLAC/ordinals.h", 22 | "FLAC/stream_decoder.h", 23 | "FLAC/stream_encoder.h", 24 | ] 25 | } 26 | 27 | source_set("flac") { 28 | deps = [ ":flac_shim" ] 29 | public_configs = [ ":system_flac" ] 30 | } 31 | -------------------------------------------------------------------------------- /landmine_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | import sys 7 | 8 | 9 | def IsWindows(): 10 | return sys.platform in ['win32', 'cygwin'] 11 | 12 | 13 | def IsLinux(): 14 | return sys.platform.startswith(('linux', 'freebsd', 'netbsd', 'openbsd')) 15 | 16 | 17 | def IsMac(): 18 | return sys.platform == 'darwin' 19 | 20 | 21 | def host_os(): 22 | """ 23 | Returns a string representing the host_os of the current system. 24 | Possible values: 'win', 'mac', 'linux', 'unknown'. 25 | """ 26 | if IsWindows(): 27 | return 'win' 28 | elif IsLinux(): 29 | return 'linux' 30 | elif IsMac(): 31 | return 'mac' 32 | else: 33 | return 'unknown' 34 | -------------------------------------------------------------------------------- /android/java/src/org/chromium/base/annotations/DoNotClassMerge.java: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.base.annotations; 6 | 7 | import java.lang.annotation.ElementType; 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | import java.lang.annotation.Target; 11 | 12 | /** 13 | * The annotated class should never be horizontally or vertically merged. 14 | * 15 | * The annotated classes are guaranteed not to be horizontally or vertically 16 | * merged by Proguard. Other optimizations may still apply. 17 | */ 18 | @Target({ElementType.TYPE}) 19 | @Retention(RetentionPolicy.CLASS) 20 | public @interface DoNotClassMerge {} 21 | -------------------------------------------------------------------------------- /android/pylib/gtest/filter/base_unittests_disabled: -------------------------------------------------------------------------------- 1 | # List of suppressions 2 | 3 | # Android will not support StackTrace. 4 | StackTrace.* 5 | # 6 | # Sometimes this is automatically generated by run_tests.py 7 | VerifyPathControlledByUserTest.Symlinks 8 | 9 | # http://crbug.com/138845 10 | MessagePumpLibeventTest.TestWatchingFromBadThread 11 | 12 | StringPrintfTest.StringPrintfMisc 13 | StringPrintfTest.StringAppendfString 14 | StringPrintfTest.StringAppendfInt 15 | StringPrintfTest.StringPrintfBounds 16 | # TODO(jrg): Fails on bots. Works locally. Figure out why. 2/6/12 17 | FieldTrialTest.* 18 | # Flaky? 19 | ScopedJavaRefTest.RefCounts 20 | FileTest.MemoryCorruption 21 | MessagePumpLibeventTest.QuitOutsideOfRun 22 | ScopedFD.ScopedFDCrashesOnCloseFailure 23 | 24 | # http://crbug.com/245043 25 | StackContainer.BufferAlignment 26 | -------------------------------------------------------------------------------- /config/ios/xctest_shell.mm: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | 8 | // For Chrome on iOS we want to run EarlGrey tests (that are XCTests) for all 9 | // our build configurations (Debug, Release, ...). In addition, the symbols 10 | // visibility is configured to private by default. To simplify testing with 11 | // those constraints, our tests are compiled in the TEST_HOST target instead 12 | // of the .xctest bundle that all link against this single test (just there to 13 | // ensure that the bundle is not empty). 14 | 15 | @interface XCTestShellEmptyClass : NSObject 16 | @end 17 | 18 | @implementation XCTestShellEmptyClass 19 | @end 20 | -------------------------------------------------------------------------------- /rust/mixed_executable.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/rust.gni") 6 | import("//build/rust/mixed_target.gni") 7 | 8 | # Defines an executable containing both Rust and C++ code. 9 | # See mixed_target.gni for documentation. 10 | 11 | template("mixed_executable") { 12 | mixed_target(target_name) { 13 | target_type = "executable" 14 | forward_variables_from(invoker, 15 | "*", 16 | TESTONLY_AND_VISIBILITY + [ "rs_visibility" ]) 17 | forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) 18 | } 19 | } 20 | 21 | set_defaults("mixed_executable") { 22 | configs = default_executable_configs 23 | } 24 | -------------------------------------------------------------------------------- /linux/unbundle/brotli.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_brotli_dec") { 5 | packages = [ "libbrotlidec" ] 6 | } 7 | 8 | pkg_config("system_brotli_enc") { 9 | packages = [ "libbrotlienc" ] 10 | } 11 | 12 | shim_headers("brotli_shim") { 13 | root_path = "include" 14 | headers = [ 15 | "brotli/decode.h", 16 | "brotli/encode.h", 17 | "brotli/port.h", 18 | "brotli/types.h", 19 | ] 20 | } 21 | 22 | source_set("dec") { 23 | deps = [ ":brotli_shim" ] 24 | public_configs = [ ":system_brotli_dec" ] 25 | } 26 | 27 | source_set("enc") { 28 | deps = [ ":brotli_shim" ] 29 | public_configs = [ ":system_brotli_enc" ] 30 | } 31 | 32 | copy("brotli") { 33 | sources = [ "/usr/bin/brotli" ] 34 | outputs = [ "$root_out_dir/brotli" ] 35 | } 36 | -------------------------------------------------------------------------------- /fuchsia/OWNERS: -------------------------------------------------------------------------------- 1 | # When picking a reviewer for Fuchsia-related OWNERShip, please start by looking 2 | # at git history to find the most relevant owner. The team would appreciate it 3 | # if you would also add chromium-fuchsia-reviews@google.com so that a shadowed 4 | # reviewer is added automatically. Thank you. 5 | 6 | ddorwin@chromium.org 7 | fdegans@chromium.org 8 | grt@chromium.org 9 | kmarshall@chromium.org 10 | sergeyu@chromium.org 11 | wez@chromium.org 12 | 13 | per-file linux.sdk.sha1=chromium-autoroll@skia-public.iam.gserviceaccount.com 14 | per-file mac.sdk.sha1=chromium-autoroll@skia-public.iam.gserviceaccount.com 15 | per-file linux_internal.sdk.sha1=chromium-internal-autoroll@skia-corp.google.com.iam.gserviceaccount.com 16 | 17 | per-file SECURITY_OWNERS=set noparent 18 | per-file SECURITY_OWNERS=file://build/fuchsia/SECURITY_OWNERS 19 | -------------------------------------------------------------------------------- /fuchsia/SECURITY_OWNERS: -------------------------------------------------------------------------------- 1 | # Changes to integration with the Fuchsia platform, or peer components, require 2 | # security review to avoid introducing sandbox escapes. These include: 3 | # - Critical platform integrations (e.g. shared memory, process launching). 4 | # - Changes to Chromium-defined Fuchsia IPC (aka FIDL) protocols. 5 | # - Addition of new FIDL services to child process sandboxes. 6 | # - Addition of new FIDL clients and implementations. 7 | # 8 | # Security team: If you are uncomfortable reviewing a particular bit of code 9 | # yourself, don't hesitate to seek help from another security team member! 10 | # Nobody knows everything, and the only way to learn is from experience. 11 | 12 | # Please keep reviewers ordered alphabetically by LDAP. 13 | ajgo@chromium.org 14 | rsesek@chromium.org 15 | tsepez@chromium.org 16 | wez@chromium.org 17 | -------------------------------------------------------------------------------- /linux/unbundle/re2.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/c++/c++.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | assert(!use_custom_libcxx, 9 | "Usage of the system libre2.so is not supported with " + 10 | "use_custom_libcxx=true because the library's interface relies on " + 11 | "libstdc++'s std::string and std::vector.") 12 | 13 | shim_headers("re2_shim") { 14 | root_path = "src" 15 | headers = [ 16 | "re2/filtered_re2.h", 17 | "re2/re2.h", 18 | "re2/set.h", 19 | "re2/stringpiece.h", 20 | "re2/variadic_function.h", 21 | ] 22 | } 23 | 24 | source_set("re2") { 25 | deps = [ ":re2_shim" ] 26 | libs = [ "re2" ] 27 | } 28 | -------------------------------------------------------------------------------- /get_symlink_targets.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2019 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | """Prints the target paths of the given symlinks. 6 | 7 | Prints out each target in the order that the links were passed in. 8 | """ 9 | 10 | import os 11 | import sys 12 | 13 | 14 | def main(): 15 | for link_name in sys.argv[1:]: 16 | if not os.path.islink(link_name): 17 | sys.stderr.write("%s is not a link" % link_name) 18 | return 1 19 | target = os.readlink(link_name) 20 | if not os.path.isabs(target): 21 | target = os.path.join(os.path.dirname(link_name), target) 22 | print(os.path.realpath(target)) 23 | return 0 24 | 25 | 26 | if __name__ == '__main__': 27 | sys.exit(main()) 28 | -------------------------------------------------------------------------------- /lacros/lacros_resource_sizes.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/util/generate_wrapper.gni") 6 | 7 | # Generates a script in the bin directory that runs 8 | # //build/lacros/lacros_resource_sizes.py for the provided configuration. 9 | template("lacros_resource_sizes_test") { 10 | generate_wrapper(target_name) { 11 | forward_variables_from(invoker, [ "data_deps" ]) 12 | executable = "//build/lacros/lacros_resource_sizes.py" 13 | wrapper_script = "$root_out_dir/bin/run_${target_name}" 14 | 15 | deps = [ "//build/lacros:lacros_resource_sizes_py" ] 16 | executable_args = [ 17 | "--chromium-output-directory", 18 | "@WrappedPath(.)", 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lacros/lacros_resource_sizes.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/lacros --output build/lacros/lacros_resource_sizes.pydeps build/lacros/lacros_resource_sizes.py 3 | ../../third_party/catapult/third_party/vinn/vinn/__init__.py 4 | ../../third_party/catapult/third_party/vinn/vinn/_vinn.py 5 | ../../third_party/catapult/tracing/tracing/__init__.py 6 | ../../third_party/catapult/tracing/tracing/value/__init__.py 7 | ../../third_party/catapult/tracing/tracing/value/convert_chart_json.py 8 | ../../third_party/catapult/tracing/tracing_project.py 9 | ../util/lib/__init__.py 10 | ../util/lib/common/perf_result_data_type.py 11 | ../util/lib/common/perf_tests_results_helper.py 12 | ../util/lib/results/__init__.py 13 | ../util/lib/results/result_sink.py 14 | ../util/lib/results/result_types.py 15 | lacros_resource_sizes.py 16 | -------------------------------------------------------------------------------- /rust/tests/test_variable_static_library/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #[cxx::bridge] 6 | mod ffi { 7 | struct FooBars { 8 | foos: usize, 9 | bars: usize, 10 | } 11 | extern "Rust" { 12 | fn do_something_in_memory_safe_language(input: &CxxString) -> FooBars; 13 | } 14 | } 15 | 16 | pub fn do_something_in_memory_safe_language(input: &cxx::CxxString) -> ffi::FooBars { 17 | println!( 18 | "Memory safe language enabled: doing this operation without spinning up an extra process." 19 | ); 20 | let s = input.to_string_lossy(); // discards any non-UTF8 21 | ffi::FooBars { foos: s.matches("foo").count(), bars: s.matches("bar").count() } 22 | } 23 | -------------------------------------------------------------------------------- /android/java/src/org/chromium/base/annotations/MockedInTests.java: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.base.annotations; 6 | 7 | import java.lang.annotation.ElementType; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * See b/147584922. Proguard and Mockito don't play nicely together, and proguard rules make it 12 | * impossible to keep the base class/interface for a mocked class without providing additional 13 | * explicit information, like this annotation. This annotation should only need to be used on a 14 | * class/interface that is extended/implemented by another class/interface that is then mocked. 15 | */ 16 | @Target(ElementType.TYPE) 17 | public @interface MockedInTests {} 18 | -------------------------------------------------------------------------------- /android/test_wrapper/logdog_wrapper.pydeps: -------------------------------------------------------------------------------- 1 | # Generated by running: 2 | # build/print_python_deps.py --root build/android/test_wrapper --output build/android/test_wrapper/logdog_wrapper.pydeps build/android/test_wrapper/logdog_wrapper.py 3 | ../../../third_party/catapult/common/py_utils/py_utils/__init__.py 4 | ../../../third_party/catapult/common/py_utils/py_utils/tempfile_ext.py 5 | ../../../third_party/catapult/devil/devil/__init__.py 6 | ../../../third_party/catapult/devil/devil/base_error.py 7 | ../../../third_party/catapult/devil/devil/utils/__init__.py 8 | ../../../third_party/catapult/devil/devil/utils/reraiser_thread.py 9 | ../../../third_party/catapult/devil/devil/utils/signal_handler.py 10 | ../../../third_party/catapult/devil/devil/utils/timeout_retry.py 11 | ../../../third_party/catapult/devil/devil/utils/watchdog_timer.py 12 | logdog_wrapper.py 13 | -------------------------------------------------------------------------------- /cipd/clobber_cipd_root.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2018 The Chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """Clobbers a CIPD root.""" 8 | 9 | import argparse 10 | import os 11 | import shutil 12 | import sys 13 | 14 | 15 | def main(): 16 | parser = argparse.ArgumentParser( 17 | description='Clobbers the CIPD root in the given directory.') 18 | 19 | parser.add_argument( 20 | '--root', 21 | required=True, 22 | help='Root directory for dependency.') 23 | args = parser.parse_args() 24 | 25 | cipd_root_dir = os.path.join(args.root, '.cipd') 26 | if os.path.exists(cipd_root_dir): 27 | shutil.rmtree(cipd_root_dir) 28 | 29 | return 0 30 | 31 | 32 | if __name__ == '__main__': 33 | sys.exit(main()) 34 | -------------------------------------------------------------------------------- /linux/sysroot_scripts/update-archive-timestamp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2018 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | # This script updates sysroot-creator-*.sh with the timestamp of the latest 7 | # snapshot from snapshot.debian.org. 8 | 9 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 10 | ARCHIVE_URL="http://snapshot.debian.org/archive/debian" 11 | 12 | # Use 9999-01-01 as the date so that we get a redirect to the page with the 13 | # latest timestamp. 14 | TIMESTAMP=$(curl -s "${ARCHIVE_URL}/99990101T000000Z/pool/" | \ 15 | sed -n "s|.*${ARCHIVE_URL}/\([[:digit:]TZ]\+\)/pool/.*|\1|p" | head -n 1) 16 | 17 | sed -i "s/ARCHIVE_TIMESTAMP=.*$/ARCHIVE_TIMESTAMP=${TIMESTAMP}/" \ 18 | "${SCRIPT_DIR}"/sysroot-creator-*.sh 19 | -------------------------------------------------------------------------------- /android/java/src/org/chromium/base/annotations/DoNotInline.java: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.base.annotations; 6 | 7 | import java.lang.annotation.ElementType; 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | import java.lang.annotation.Target; 11 | 12 | /** 13 | * The annotated method or class should never be inlined. 14 | * 15 | * The annotated method (or methods on the annotated class) are guaranteed not to be inlined by 16 | * Proguard. Other optimizations may still apply. 17 | */ 18 | @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) 19 | @Retention(RetentionPolicy.CLASS) 20 | public @interface DoNotInline {} 21 | -------------------------------------------------------------------------------- /config/ios/write_framework_modulemap.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import os 6 | import sys 7 | 8 | MODULE_MAP_TEMPLATE = '''\ 9 | framework module %(framework_name)s { 10 | umbrella header "%(framework_name)s.h" 11 | 12 | export * 13 | module * { export * } 14 | } 15 | ''' 16 | 17 | 18 | def Main(framework_name, modules_dir): 19 | # Find the name of the binary based on the part before the ".framework". 20 | if not os.path.isdir(modules_dir): 21 | os.makedirs(modules_dir) 22 | 23 | with open(os.path.join(modules_dir, 'module.modulemap'), 'w') as module_file: 24 | module_file.write(MODULE_MAP_TEMPLATE % {'framework_name': framework_name}) 25 | 26 | 27 | if __name__ == '__main__': 28 | Main(*sys.argv[1:]) 29 | -------------------------------------------------------------------------------- /linux/unbundle/libwebp.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("system_libwebp") { 9 | packages = [ 10 | "libwebp", 11 | "libwebpdemux", 12 | "libwebpmux", 13 | ] 14 | } 15 | 16 | shim_headers("libwebp_shim") { 17 | root_path = "src/src" 18 | headers = [ 19 | "webp/decode.h", 20 | "webp/demux.h", 21 | "webp/encode.h", 22 | "webp/mux.h", 23 | "webp/mux_types.h", 24 | "webp/types.h", 25 | ] 26 | } 27 | 28 | source_set("libwebp_webp") { 29 | deps = [ ":libwebp_shim" ] 30 | public_configs = [ ":system_libwebp" ] 31 | } 32 | 33 | group("libwebp") { 34 | deps = [ ":libwebp_webp" ] 35 | } 36 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_component/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/mixed_component.gni") 6 | 7 | mixed_component("test_mixed_component") { 8 | sources = [ 9 | "component.cc", 10 | "component.h", 11 | ] 12 | defines = [ "COMPONENT_IMPLEMENTATION" ] 13 | rs_sources = [ "component.rs" ] 14 | rs_crate_root = "component.rs" 15 | rs_cxx_bindings = [ "component.rs" ] 16 | 17 | # TODO(danakj): We should write a gtest binary instead of using native rust 18 | # tests. Then remove this flag from mixed_target.gni. 19 | rs_build_native_rust_unit_tests = true 20 | } 21 | 22 | executable("test_mixed_component_demo") { 23 | deps = [ ":test_mixed_component" ] 24 | sources = [ "demo.cc" ] 25 | } 26 | -------------------------------------------------------------------------------- /android/stacktrace/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/android/rules.gni") 6 | 7 | java_library("java_deobfuscate_java") { 8 | sources = [ "java/org/chromium/build/FlushingReTrace.java" ] 9 | 10 | # Avoid using java_prebuilt() to ensure all uses go through the checked-in 11 | # wrapper script. 12 | input_jars_paths = [ "//third_party/r8/lib/r8.jar" ] 13 | } 14 | 15 | # Use the checked-in copy of the wrapper script & .jar rather than the built 16 | # one to simplify usage of the tool. 17 | group("java_deobfuscate") { 18 | data = [ 19 | "java_deobfuscate.py", 20 | "java_deobfuscate_java.jar", 21 | "//third_party/r8/lib/r8.jar", 22 | ] 23 | deps = [ "//third_party/jdk:java_data" ] 24 | } 25 | -------------------------------------------------------------------------------- /config/fuchsia/test/context_provider.shard.test-cml: -------------------------------------------------------------------------------- 1 | { 2 | children: [ 3 | { 4 | name: "context_provider", 5 | url: "fuchsia-pkg://fuchsia.com/web_engine#meta/context_provider.cm", 6 | }, 7 | ], 8 | use: [ 9 | { 10 | protocol: [ 11 | "fuchsia.web.ContextProvider", 12 | ], 13 | from: "#context_provider", 14 | dependency: "weak", 15 | }, 16 | ], 17 | offer: [ 18 | { 19 | protocol: [ 20 | "fuchsia.feedback.ComponentDataRegister", 21 | "fuchsia.feedback.CrashReportingProductRegister", 22 | "fuchsia.sys.Environment", 23 | "fuchsia.sys.Loader", 24 | ], 25 | from: "parent", 26 | to: "#context_provider", 27 | }, 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /android/incremental_install/java/org/chromium/incrementalinstall/BootstrapInstrumentation.java: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package org.chromium.incrementalinstall; 6 | 7 | import android.app.Instrumentation; 8 | import android.os.Bundle; 9 | 10 | /** 11 | * Notifies BootstrapApplication of the call to Instrumentation.onCreate(). 12 | */ 13 | public final class BootstrapInstrumentation extends Instrumentation { 14 | private final BootstrapApplication mApp; 15 | 16 | BootstrapInstrumentation(BootstrapApplication app) { 17 | mApp = app; 18 | } 19 | 20 | @Override 21 | public void onCreate(Bundle arguments) { 22 | super.onCreate(arguments); 23 | mApp.onInstrumentationCreate(arguments); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /config/chrome_build.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | declare_args() { 6 | # Select the desired branding flavor. False means normal Chromium branding, 7 | # true means official Google Chrome branding (requires extra Google-internal 8 | # resources). 9 | is_chrome_branded = false 10 | } 11 | 12 | declare_args() { 13 | # Refers to the subdirectory for branding in various places including 14 | # chrome/app/theme. 15 | if (is_chrome_branded) { 16 | branding_path_component = "google_chrome" 17 | } else { 18 | branding_path_component = "chromium" 19 | } 20 | } 21 | 22 | declare_args() { 23 | # The path to the BRANDING file in chrome/app/theme. 24 | branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING" 25 | } 26 | -------------------------------------------------------------------------------- /rust/tests/test_cpp_including_rust/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//base/allocator/allocator.gni") 6 | import("//testing/test.gni") 7 | 8 | executable("test_cpp_including_rust") { 9 | sources = [ "main.cc" ] 10 | deps = [ 11 | "//build/rust/tests/test_mixed_static_library", 12 | "//build/rust/tests/test_rust_static_library", 13 | ] 14 | } 15 | 16 | test("test_cpp_including_rust_unittests") { 17 | sources = [ "unittests.cc" ] 18 | deps = [ 19 | "//base", 20 | "//base/allocator:buildflags", 21 | "//base/test:run_all_unittests", 22 | "//build/rust/tests/test_mixed_static_library", 23 | "//build/rust/tests/test_rust_static_library", 24 | "//testing/gmock", 25 | "//testing/gtest", 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /linux/unbundle/absl_status.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_absl_status") { 5 | packages = [ "absl_status" ] 6 | } 7 | 8 | pkg_config("system_absl_statusor") { 9 | packages = [ "absl_statusor" ] 10 | } 11 | 12 | shim_headers("status_shim") { 13 | root_path = "." 14 | prefix = "absl/status/" 15 | headers = [ 16 | "status.h", 17 | "status_payload_printer.h", 18 | ] 19 | } 20 | 21 | source_set("status") { 22 | deps = [ ":status_shim" ] 23 | public_configs = [ ":system_absl_status" ] 24 | } 25 | 26 | shim_headers("statusor_shim") { 27 | root_path = "." 28 | prefix = "absl/status/" 29 | headers = [ "statusor.h" ] 30 | } 31 | 32 | source_set("statusor") { 33 | deps = [ ":statusor_shim" ] 34 | public_configs = [ ":system_absl_statusor" ] 35 | } 36 | 37 | source_set("statusor_test") { 38 | } 39 | -------------------------------------------------------------------------------- /linux/unbundle/libvpx.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("system_libvpx") { 9 | packages = [ "vpx" ] 10 | } 11 | 12 | shim_headers("libvpx_shim") { 13 | root_path = "source/libvpx" 14 | headers = [ 15 | "vpx/vp8.h", 16 | "vpx/vp8cx.h", 17 | "vpx/vp8dx.h", 18 | "vpx/vpx_codec.h", 19 | "vpx/vpx_codec_impl_bottom.h", 20 | "vpx/vpx_codec_impl_top.h", 21 | "vpx/vpx_decoder.h", 22 | "vpx/vpx_encoder.h", 23 | "vpx/vpx_frame_buffer.h", 24 | "vpx/vpx_image.h", 25 | "vpx/vpx_integer.h", 26 | ] 27 | } 28 | 29 | source_set("libvpx") { 30 | deps = [ ":libvpx_shim" ] 31 | public_configs = [ ":system_libvpx" ] 32 | } 33 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_shared_library/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #[cxx::bridge] 6 | mod ffi { 7 | unsafe extern "C++" { 8 | include!("build/rust/tests/test_mixed_shared_library/test_mixed_shared_library.h"); 9 | fn cpp_addition(a: u32, b: u32) -> u32; 10 | } 11 | 12 | extern "Rust" { 13 | fn add_two_ints_via_rust_then_cpp(a: u32, b: u32) -> u32; 14 | } 15 | } 16 | 17 | pub fn add_two_ints_via_rust_then_cpp(a: u32, b: u32) -> u32 { 18 | add_two_ints_using_cpp(a, b) 19 | } 20 | 21 | pub fn add_two_ints_using_cpp(a: u32, b: u32) -> u32 { 22 | ffi::cpp_addition(a, b) 23 | } 24 | 25 | #[test] 26 | fn test_callback_to_cpp() { 27 | assert_eq!(add_two_ints_via_rust_then_cpp(4u32, 4u32), 8u32); 28 | } 29 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_static_library/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #[cxx::bridge] 6 | mod ffi { 7 | unsafe extern "C++" { 8 | include!("build/rust/tests/test_mixed_static_library/test_mixed_static_library.h"); 9 | fn cpp_addition(a: u32, b: u32) -> u32; 10 | } 11 | 12 | extern "Rust" { 13 | fn add_two_ints_via_rust_then_cpp(a: u32, b: u32) -> u32; 14 | } 15 | } 16 | 17 | pub fn add_two_ints_via_rust_then_cpp(a: u32, b: u32) -> u32 { 18 | add_two_ints_using_cpp(a, b) 19 | } 20 | 21 | pub fn add_two_ints_using_cpp(a: u32, b: u32) -> u32 { 22 | ffi::cpp_addition(a, b) 23 | } 24 | 25 | #[test] 26 | fn test_callback_to_cpp() { 27 | assert_eq!(add_two_ints_via_rust_then_cpp(4u32, 4u32), 8u32); 28 | } 29 | -------------------------------------------------------------------------------- /rust/tests/test_serde_json_lenient/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/rust/rust_static_library.gni") 6 | import("//testing/test.gni") 7 | 8 | rust_static_library("test_serde_json_lenient_rs") { 9 | crate_root = "lib.rs" 10 | sources = [ "lib.rs" ] 11 | cxx_bindings = [ "lib.rs" ] 12 | deps = [ "//third_party/rust/serde_json_lenient/v0_1:lib" ] 13 | } 14 | 15 | # TODO(https://crbug.com/1278030) - convert to a pure- 16 | # Rust unit test when that's supported on all platforms. 17 | test("test_serde_json_lenient") { 18 | sources = [ "unittests.cc" ] 19 | deps = [ 20 | ":test_serde_json_lenient_rs", 21 | "//base", 22 | "//base/test:run_all_unittests", 23 | "//testing/gmock", 24 | "//testing/gtest", 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /android/stacktrace/README.md: -------------------------------------------------------------------------------- 1 | # java_deobfuscate.py 2 | 3 | A wrapper around ProGuard's ReTrace tool, which: 4 | 5 | 1) Updates the regular expression used to identify stack lines, and 6 | 2) Streams its output. 7 | 8 | The second point here is what allows you to run: 9 | 10 | adb logcat | build/android/stacktrace/java_deobfuscate.py out/Default/apks/ChromePublic.apk.mapping 11 | 12 | And have it actually show output without logcat terminating. 13 | 14 | 15 | ## Update Instructions: 16 | 17 | ninja -C out/Release java_deobfuscate_java 18 | cp out/Release/lib.java/build/android/stacktrace/java_deobfuscate_java.jar build/android/stacktrace 19 | 20 | # stackwalker.py 21 | 22 | Extracts Breakpad microdumps from a log file and uses `stackwalker` to symbolize 23 | them. 24 | 25 | 26 | # crashpad_stackwalker.py 27 | 28 | Fetches Crashpad dumps from a given device, walks and symbolizes the stacks. 29 | -------------------------------------------------------------------------------- /linux/unbundle/libaom.gn: -------------------------------------------------------------------------------- 1 | import("//build/buildflag_header.gni") 2 | import("//build/config/linux/pkg_config.gni") 3 | import("//build/shim_headers.gni") 4 | import("//third_party/libaom/options.gni") 5 | 6 | buildflag_header("libaom_buildflags") { 7 | header = "libaom_buildflags.h" 8 | flags = [ "ENABLE_LIBAOM=$enable_libaom" ] 9 | } 10 | 11 | pkg_config("system_aom") { 12 | packages = [ "aom" ] 13 | } 14 | 15 | shim_headers("aom_shim") { 16 | root_path = "source/libaom" 17 | headers = [ 18 | "aom/aom.h", 19 | "aom/aom_codec.h", 20 | "aom/aom_decoder.h", 21 | "aom/aom_encoder.h", 22 | "aom/aom_external_partition.h", 23 | "aom/aom_frame_buffer.h", 24 | "aom/aom_image.h", 25 | "aom/aom_integer.h", 26 | "aom/aomcx.h", 27 | "aom/aomdx.h", 28 | ] 29 | } 30 | 31 | source_set("libaom") { 32 | deps = [ ":aom_shim" ] 33 | public_configs = [ ":system_aom" ] 34 | } 35 | -------------------------------------------------------------------------------- /rust/tests/test_serde_json_lenient/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Demo library to ensure that serde_json_lenient is working independently of 6 | // its integration with Chromium. 7 | 8 | use serde_json_lenient::{Result, Value}; 9 | 10 | #[cxx::bridge] 11 | mod ffi { 12 | extern "Rust" { 13 | fn serde_works() -> bool; 14 | } 15 | } 16 | 17 | fn serde_works() -> bool { 18 | parses_ok().unwrap_or_default() 19 | } 20 | 21 | fn parses_ok() -> Result { 22 | let data = r#" 23 | { 24 | "name": "Slartibartfast", 25 | "planets": [ "Magrathea" ] 26 | }"#; 27 | let v: Value = serde_json_lenient::from_str(data)?; 28 | Ok(v["name"] == "Slartibartfast" && v["planets"][0] == "Magrathea") 29 | } 30 | -------------------------------------------------------------------------------- /android/pylib/output/noop_output_manager_test.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env vpython3 2 | # Copyright 2017 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | # pylint: disable=protected-access 7 | 8 | import unittest 9 | 10 | from pylib.base import output_manager 11 | from pylib.base import output_manager_test_case 12 | from pylib.output import noop_output_manager 13 | 14 | 15 | class NoopOutputManagerTest(output_manager_test_case.OutputManagerTestCase): 16 | 17 | def setUp(self): 18 | self._output_manager = noop_output_manager.NoopOutputManager() 19 | 20 | def testUsableTempFile(self): 21 | self.assertUsableTempFile( 22 | self._output_manager._CreateArchivedFile( 23 | 'test_file', 'test_subdir', output_manager.Datatype.TEXT)) 24 | 25 | 26 | if __name__ == '__main__': 27 | unittest.main() 28 | -------------------------------------------------------------------------------- /android/unused_resources/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/android/rules.gni") 6 | 7 | java_binary("unused_resources") { 8 | sources = [ "//build/android/unused_resources/UnusedResources.java" ] 9 | main_class = "build.android.unused_resources.UnusedResources" 10 | deps = [ 11 | "//third_party/android_deps:com_android_tools_common_java", 12 | "//third_party/android_deps:com_android_tools_layoutlib_layoutlib_api_java", 13 | "//third_party/android_deps:com_android_tools_sdk_common_java", 14 | "//third_party/android_deps:com_google_guava_guava_java", 15 | "//third_party/android_deps:org_jetbrains_kotlin_kotlin_stdlib_java", 16 | "//third_party/r8:r8_java", 17 | ] 18 | wrapper_script_name = "helper/unused_resources" 19 | } 20 | -------------------------------------------------------------------------------- /android/incremental_install/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/android/rules.gni") 6 | 7 | android_library("bootstrap_java") { 8 | sources = [ 9 | "java/org/chromium/incrementalinstall/BootstrapApplication.java", 10 | "java/org/chromium/incrementalinstall/BootstrapInstrumentation.java", 11 | "java/org/chromium/incrementalinstall/ClassLoaderPatcher.java", 12 | "java/org/chromium/incrementalinstall/LockFile.java", 13 | "java/org/chromium/incrementalinstall/Reflect.java", 14 | "java/org/chromium/incrementalinstall/SecondInstrumentation.java", 15 | ] 16 | jacoco_never_instrument = true 17 | no_build_hooks = true 18 | } 19 | 20 | dist_dex("apk_dex") { 21 | output = "$target_out_dir/apk.dex" 22 | deps = [ ":bootstrap_java" ] 23 | } 24 | -------------------------------------------------------------------------------- /linux/unbundle/openh264.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/config/linux/pkg_config.gni") 6 | import("//build/shim_headers.gni") 7 | 8 | pkg_config("config") { 9 | packages = [ "openh264" ] 10 | } 11 | 12 | shim_headers("openh264_shim") { 13 | prefix = "wels/" 14 | root_path = "src/codec/api/svc" 15 | headers = [ 16 | "codec_api.h", 17 | "codec_app_def.h", 18 | "codec_def.h", 19 | "codec_ver.h", 20 | ] 21 | } 22 | 23 | source_set("common") { 24 | deps = [ ":openh264_shim" ] 25 | public_configs = [ ":config" ] 26 | } 27 | 28 | source_set("processing") { 29 | deps = [ ":openh264_shim" ] 30 | public_configs = [ ":config" ] 31 | } 32 | 33 | source_set("encoder") { 34 | deps = [ ":openh264_shim" ] 35 | public_configs = [ ":config" ] 36 | } 37 | -------------------------------------------------------------------------------- /linux/unbundle/swiftshader-SPIRV-Tools.gn: -------------------------------------------------------------------------------- 1 | import("//build/config/linux/pkg_config.gni") 2 | import("//build/shim_headers.gni") 3 | 4 | pkg_config("system_SPIRV-Tools") { 5 | packages = [ "SPIRV-Tools" ] 6 | } 7 | 8 | shim_headers("SPIRV-Tools_shim") { 9 | root_path = "../../../../third_party/SPIRV-Tools/include" 10 | headers = [ 11 | "spirv-tools/instrument.hpp", 12 | "spirv-tools/libspirv.h", 13 | "spirv-tools/libspirv.hpp", 14 | "spirv-tools/linker.hpp", 15 | "spirv-tools/optimizer.hpp", 16 | ] 17 | } 18 | 19 | source_set("spvtools_headers") { 20 | deps = [ ":SPIRV-Tools_shim" ] 21 | public_configs = [ ":system_SPIRV-Tools" ] 22 | } 23 | 24 | source_set("spvtools_opt") { 25 | deps = [ ":SPIRV-Tools_shim" ] 26 | public_configs = [ ":system_SPIRV-Tools" ] 27 | } 28 | 29 | source_set("spvtools_val") { 30 | deps = [ ":SPIRV-Tools_shim" ] 31 | public_configs = [ ":system_SPIRV-Tools" ] 32 | } 33 | -------------------------------------------------------------------------------- /config/fuchsia/test/present_view_capabilities.test-cmx: -------------------------------------------------------------------------------- 1 | { 2 | "facets": { 3 | "fuchsia.test": { 4 | "injected-services": { 5 | "fuchsia.accessibility.semantics.SemanticsManager": "fuchsia-pkg://fuchsia.com/a11y-manager#meta/a11y-manager.cmx", 6 | "fuchsia.ui.input3.Keyboard": "fuchsia-pkg://fuchsia.com/ime_service#meta/ime_service.cmx", 7 | }, 8 | "system-services": [ 9 | "fuchsia.sysmem.Allocator", 10 | "fuchsia.ui.policy.Presenter", 11 | "fuchsia.ui.scenic.Scenic" 12 | ] 13 | } 14 | }, 15 | "sandbox": { 16 | "services": [ 17 | "fuchsia.accessibility.semantics.SemanticsManager", 18 | "fuchsia.sysmem.Allocator", 19 | "fuchsia.ui.composition.Allocator", 20 | "fuchsia.ui.composition.Flatland", 21 | "fuchsia.ui.input3.Keyboard", 22 | "fuchsia.ui.policy.Presenter", 23 | "fuchsia.ui.scenic.Scenic" 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lacros/PRESUBMIT.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | """Presubmit script for changes affecting //build/lacros""" 5 | 6 | USE_PYTHON3 = True 7 | 8 | 9 | def _CommonChecks(input_api, output_api): 10 | # Don't run lacros tests on Windows. 11 | if input_api.is_windows: 12 | return [] 13 | tests = input_api.canned_checks.GetUnitTestsInDirectory( 14 | input_api, 15 | output_api, 16 | '.', [r'^.+_test\.py$'], 17 | run_on_python2=False, 18 | run_on_python3=True, 19 | skip_shebang_check=True) 20 | return input_api.RunTests(tests) 21 | 22 | 23 | def CheckChangeOnUpload(input_api, output_api): 24 | return _CommonChecks(input_api, output_api) 25 | 26 | 27 | def CheckChangeOnCommit(input_api, output_api): 28 | return _CommonChecks(input_api, output_api) 29 | -------------------------------------------------------------------------------- /rust/tests/test_mixed_component/component.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "build/rust/tests/test_mixed_component/component.h" 6 | #if defined(RUST_ENABLED) 7 | #include "build/rust/tests/test_mixed_component/component.rs.h" 8 | #endif 9 | 10 | COMPONENT_EXPORT uint32_t bilingual_math(uint32_t a, uint32_t b) { 11 | #if defined(RUST_ENABLED) 12 | return rust_math(a, b); 13 | #else 14 | return a + b; 15 | #endif 16 | } 17 | 18 | COMPONENT_EXPORT std::string bilingual_string() { 19 | #if defined(RUST_ENABLED) 20 | return std::string(rust_get_an_uppercase_string()); 21 | #else 22 | return "sad panda, no Rust"; 23 | #endif 24 | } 25 | 26 | #if defined(RUST_ENABLED) 27 | rust::String get_a_string_from_cpp() { 28 | return rust::String("Mixed Case String"); 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /toolchain/freebsd/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/toolchain/gcc_toolchain.gni") 6 | 7 | template("freebsd_toolchain") { 8 | gcc_toolchain(target_name) { 9 | cc = "clang" 10 | cxx = "clang++" 11 | 12 | readelf = "readelf" 13 | nm = "nm" 14 | ar = "llvm-ar" 15 | ld = cxx 16 | 17 | toolchain_args = { 18 | current_os = "freebsd" 19 | 20 | is_clang = true 21 | 22 | if (defined(invoker.toolchain_args)) { 23 | forward_variables_from(invoker.toolchain_args, "*") 24 | } 25 | } 26 | } 27 | } 28 | 29 | freebsd_toolchain("x64") { 30 | toolchain_args = { 31 | current_cpu = "x64" 32 | } 33 | } 34 | 35 | freebsd_toolchain("arm64") { 36 | toolchain_args = { 37 | current_cpu = "arm64" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ios/extension_bundle_data.gni: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # Template to package an app extension into an app. 6 | # 7 | # Parameters 8 | # 9 | # extension_target: 10 | # name of the extension target to package; the extension 11 | # bundle name must be derived from the target name 12 | # 13 | template("extension_bundle_data") { 14 | assert(defined(invoker.extension_target), 15 | "extension_target must be defined for $target_name") 16 | 17 | bundle_data(target_name) { 18 | public_deps = [ invoker.extension_target ] 19 | outputs = [ "{{bundle_contents_dir}}/PlugIns/{{source_file_part}}" ] 20 | sources = [ get_label_info(invoker.extension_target, "root_out_dir") + "/" + 21 | get_label_info(invoker.extension_target, "name") + ".appex" ] 22 | } 23 | } 24 | --------------------------------------------------------------------------------