diff --git a/arm/build/config/compiler/BUILD.gn b/arm/build/config/compiler/BUILD.gn index 6f34184f..59160c2d 100644 --- a/arm/build/config/compiler/BUILD.gn +++ b/arm/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -980,11 +987,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1026,6 +1028,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1617,6 +1631,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1788,9 +1812,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1999,7 +2035,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2856,10 +2892,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/arm/build/config/win/BUILD.gn b/arm/build/config/win/BUILD.gn index 9032e71f..65fcb4e3 100644 --- a/arm/build/config/win/BUILD.gn +++ b/arm/build/config/win/BUILD.gn @@ -118,7 +118,7 @@ config("compiler") { cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } } else if (current_cpu == "arm64") { - cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] + cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } else { assert(false, "unknown current_cpu " + current_cpu) } @@ -435,6 +435,7 @@ config("delayloads") { "/DELAYLOAD:setupapi.dll", "/DELAYLOAD:shell32.dll", "/DELAYLOAD:shlwapi.dll", + "/DELAYLOAD:uiautomationcore.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:user32.dll", "/DELAYLOAD:usp10.dll", diff --git a/arm/raspi/build/config/compiler/BUILD.gn b/arm/raspi/build/config/compiler/BUILD.gn index 93b99086..d3765024 100644 --- a/arm/raspi/build/config/compiler/BUILD.gn +++ b/arm/raspi/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1592,6 +1606,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1763,9 +1787,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1974,7 +2010,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2791,10 +2827,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/infra/thorium_strings.grd b/infra/thorium_strings.grd index a6d8bddc..6db7c161 100644 --- a/infra/thorium_strings.grd +++ b/infra/thorium_strings.grd @@ -277,12 +277,31 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - - Thorium - - - Thorium - + + + + + Google Thorium for Testing + + + Thorium for Testing + + + + + Thorium + + + Thorium + + + @@ -443,7 +462,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> Thorium may not function correctly because it is no longer supported on this Linux distribution - + Thorium @@ -521,7 +540,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -537,7 +556,7 @@ Permissions you've already given to websites and apps may apply to this account. Thorium lets you know if your passwords are ever compromised - + Thorium @@ -748,6 +767,17 @@ Permissions you've already given to websites and apps may apply to this account. + + + This extension contains malware and is unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + + This extension violates the Thorium Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + + This extension was unpublished by its developer, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + Allow extension to show access requests in the Thorium toolbar @@ -789,17 +819,35 @@ Permissions you've already given to websites and apps may apply to this account. - - About &Thorium - + + + + About &Google Thorium for Testing + + + + + About &Thorium + + + Relaunch to Update &Thorium - - About &Thorium - + + + + About &Google Thorium for Testing + + + + + About &Thorium + + + Relaunch to update &Thorium @@ -820,7 +868,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -832,11 +880,11 @@ Permissions you've already given to websites and apps may apply to this account. - Password Manager + P&assword Manager - + Thorium @@ -1072,6 +1120,22 @@ Permissions you've already given to websites and apps may apply to this account. + + + + Click the Thorium menu + + + Click “Password Manager” + + + Use your shortcut to quickly get to the Password Manager. You can move your shortcut to your computer's home screen or app launcher. + + + Add a shortcut to Password Manager + + + This extension has changed what page is shown when you start Thorium. @@ -1405,18 +1469,18 @@ Permissions you've already given to websites and apps may apply to this account. {COUNT, plural, - =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute.} - other {Your administrator automatically closes Thorium when it isn't used for # minutes.}} + =1 {Your organization automatically closes Thorium when it isn't used for 1 minute.} + other {Your organization automatically closes Thorium when it isn't used for # minutes.}} {COUNT, plural, - =1 {Your administrator automatically deletes browsing data when it isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} - other {Your administrator automatically deletes browsing data when it isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} + =1 {Your organization automatically deletes browsing data when Thorium isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} + other {Your organization automatically deletes browsing data when Thorium isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} {COUNT, plural, - =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.} - other {Your administrator automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}} + =1 {Your organization automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.} + other {Your organization automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}} Continue using Thorium @@ -1606,7 +1670,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -1706,6 +1770,9 @@ Permissions you've already given to websites and apps may apply to this account. Memory Saver made Thorium faster + + While this tab was inactive, memory was freed up to keep Thorium fast. You can choose to always exclude this site from being inactive. + @@ -1721,18 +1788,6 @@ Permissions you've already given to websites and apps may apply to this account. - - - - - modify settings for filling payment methods. - - - - - Thorium is trying to modify settings for filling payment methods. - - diff --git a/other/AVX2/build/config/compiler/BUILD.gn b/other/AVX2/build/config/compiler/BUILD.gn index 038b1d82..d320ac99 100644 --- a/other/AVX2/build/config/compiler/BUILD.gn +++ b/other/AVX2/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") { # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. config("compiler_cpu_abi") { - cflags = [ "-O3", ] + cflags = [] ldflags = [] defines = [] @@ -1609,6 +1623,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1780,9 +1804,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1991,7 +2027,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2910,10 +2946,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/other/AVX2/build/config/win/BUILD.gn b/other/AVX2/build/config/win/BUILD.gn index 36f21f97..8829f2f0 100644 --- a/other/AVX2/build/config/win/BUILD.gn +++ b/other/AVX2/build/config/win/BUILD.gn @@ -118,7 +118,7 @@ config("compiler") { cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } } else if (current_cpu == "arm64") { - cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] + cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } else { assert(false, "unknown current_cpu " + current_cpu) } @@ -442,6 +442,7 @@ config("delayloads") { "/DELAYLOAD:setupapi.dll", "/DELAYLOAD:shell32.dll", "/DELAYLOAD:shlwapi.dll", + "/DELAYLOAD:uiautomationcore.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:user32.dll", "/DELAYLOAD:usp10.dll", diff --git a/other/CrOS/build/config/compiler/BUILD.gn b/other/CrOS/build/config/compiler/BUILD.gn index c3feb861..4fb18cc0 100644 --- a/other/CrOS/build/config/compiler/BUILD.gn +++ b/other/CrOS/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1606,6 +1620,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1777,9 +1801,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1988,7 +2024,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2877,10 +2913,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/other/SSE2/build/config/compiler/BUILD.gn b/other/SSE2/build/config/compiler/BUILD.gn index f7aabaad..fee3664b 100644 --- a/other/SSE2/build/config/compiler/BUILD.gn +++ b/other/SSE2/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") { # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. config("compiler_cpu_abi") { - cflags = [ "-O3", ] + cflags = [] ldflags = [] defines = [] @@ -1608,6 +1622,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1779,9 +1803,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1990,7 +2026,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2909,10 +2945,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/other/SSE2/build/config/win/BUILD.gn b/other/SSE2/build/config/win/BUILD.gn index 2b5f9cfe..edd495c6 100644 --- a/other/SSE2/build/config/win/BUILD.gn +++ b/other/SSE2/build/config/win/BUILD.gn @@ -118,7 +118,7 @@ config("compiler") { cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } } else if (current_cpu == "arm64") { - cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] + cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } else { assert(false, "unknown current_cpu " + current_cpu) } @@ -435,6 +435,7 @@ config("delayloads") { "/DELAYLOAD:setupapi.dll", "/DELAYLOAD:shell32.dll", "/DELAYLOAD:shlwapi.dll", + "/DELAYLOAD:uiautomationcore.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:user32.dll", "/DELAYLOAD:usp10.dll", diff --git a/other/SSE3/build/config/compiler/BUILD.gn b/other/SSE3/build/config/compiler/BUILD.gn index 176bcb92..679b09b4 100644 --- a/other/SSE3/build/config/compiler/BUILD.gn +++ b/other/SSE3/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") { # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. config("compiler_cpu_abi") { - cflags = [ "-O3", ] + cflags = [] ldflags = [] defines = [] @@ -1606,6 +1620,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1777,9 +1801,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1988,7 +2024,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2905,10 +2941,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/other/SSE3/build/config/win/BUILD.gn b/other/SSE3/build/config/win/BUILD.gn index ceb46697..0eddf06c 100644 --- a/other/SSE3/build/config/win/BUILD.gn +++ b/other/SSE3/build/config/win/BUILD.gn @@ -118,7 +118,7 @@ config("compiler") { cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } } else if (current_cpu == "arm64") { - cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] + cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } else { assert(false, "unknown current_cpu " + current_cpu) } @@ -431,6 +431,7 @@ config("delayloads") { "/DELAYLOAD:setupapi.dll", "/DELAYLOAD:shell32.dll", "/DELAYLOAD:shlwapi.dll", + "/DELAYLOAD:uiautomationcore.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:user32.dll", "/DELAYLOAD:usp10.dll", diff --git a/src/build/config/compiler/BUILD.gn b/src/build/config/compiler/BUILD.gn index 73b1f209..3c9a057e 100644 --- a/src/build/config/compiler/BUILD.gn +++ b/src/build/config/compiler/BUILD.gn @@ -279,6 +279,7 @@ config("compiler") { ldflags = [] defines = [] configs = [] + rustflags = [] # System-specific flags. If your compiler flags apply to one of the # categories here, add it to the associated file to keep this shared config @@ -457,9 +458,11 @@ config("compiler") { "-fno-unwind-tables", "-fno-asynchronous-unwind-tables", ] + rustflags += [ "-Cforce-unwind-tables=no" ] defines += [ "NO_UNWIND_TABLES" ] } else { cflags += [ "-funwind-tables" ] + rustflags += [ "-Cforce-unwind-tables=yes" ] } } } @@ -781,8 +784,12 @@ config("compiler") { cflags += [ "-fwhole-program-vtables" ] # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match - # behaviour. - rustflags += [ "-Zsplit-lto-unit" ] + # behaviour. Rust needs to know the linker will be doing LTO in this case + # or it rejects the Zsplit-lto-unit flag. + rustflags += [ + "-Zsplit-lto-unit", + "-Clinker-plugin-lto=yes", + ] if (!is_win) { ldflags += [ "-fwhole-program-vtables" ] @@ -971,11 +978,6 @@ config("compiler") { # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", - # Require `unsafe` blocks even in `unsafe` fns. This is intended to become - # an error by default eventually; see - # https://github.com/rust-lang/rust/issues/71668 - "-Dunsafe_op_in_unsafe_fn", - # To make Rust .d files compatible with ninja "-Zdep-info-omit-d-target", @@ -1017,6 +1019,18 @@ config("compiler") { "-Zpanic_abort_tests", ] } + + # Normally, this would be defined in the `runtime_library` config but NaCl + # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there + # isn't really a better config to add this define for the define to + # consistently apply in both Chromium and non-Chromium code *and* non-NaCl + # and NaCl code. + # + # TODO(https://crbug.com/702997): Move this back to the `runtime_library` + # config when NaCl is removed. + if (use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } } # The BUILDCONFIG file sets this config on targets by default, which means when @@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") { # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. config("compiler_cpu_abi") { - cflags = [ "-O3", ] + cflags = [] ldflags = [] defines = [] @@ -1609,6 +1623,16 @@ config("runtime_library") { configs += [ "//build/config/c++:runtime_library" ] } + # Rust and C++ both provide intrinsics for LLVM to call for math operations. We + # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins + # library. The Rust symbols are marked as weak, so that they can be replaced by + # the C++ symbols. This config ensures the C++ symbols exist and are strong in + # order to cause that replacement to occur by explicitly linking in clang's + # compiler-rt library. + if (is_clang && toolchain_has_rust) { + configs += [ "//build/config/clang:compiler_builtins" ] + } + # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia # configuration. if (is_posix || is_fuchsia) { @@ -1780,9 +1804,21 @@ config("default_warnings") { # TODO(crbug.com/1412713) Evaluate and possibly enable. "-Wno-deprecated-this-capture", ] + + if (llvm_force_head_revision) { + # TODO(https://crbug.com/1448905): Evaluate and possibly enable. + cflags += [ "-Wno-builtin-macro-redefined" ] + } } } } + + # Rust warnings + + # Require `unsafe` blocks even in `unsafe` fns. This is intended to become + # an error by default eventually; see + # https://github.com/rust-lang/rust/issues/71668 + rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] } # prevent_unsafe_narrowing ---------------------------------------------------- @@ -1991,7 +2027,7 @@ config("no_chromium_code") { config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) { cflags = [ "-Wshadow" ] } } @@ -2910,10 +2946,22 @@ config("strip_debug") { } if (is_apple) { - # On Mac and iOS, this enables support for ARC (automatic ref-counting). - # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # On macOS and iOS, this enables support for ARC (automatic reference + # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + # + # -fobjc-arc enables ARC overall. + # + # ARC does not add exception handlers to pure Objective-C code, but does add + # them to Objective-C++ code with the rationale that C++ pervasively adds them + # in for exception safety. However, exceptions are banned in Chromium code for + # C++ and exceptions in Objective-C code are intended to be fatal, so + # -fno-objc-arc-exceptions is specified to disable these unwanted exception + # handlers. config("enable_arc") { - common_flags = [ "-fobjc-arc" ] + common_flags = [ + "-fobjc-arc", + "-fno-objc-arc-exceptions", + ] cflags_objc = common_flags cflags_objcc = common_flags } diff --git a/src/build/config/win/BUILD.gn b/src/build/config/win/BUILD.gn index 9032e71f..65fcb4e3 100644 --- a/src/build/config/win/BUILD.gn +++ b/src/build/config/win/BUILD.gn @@ -118,7 +118,7 @@ config("compiler") { cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } } else if (current_cpu == "arm64") { - cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] + cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ] } else { assert(false, "unknown current_cpu " + current_cpu) } @@ -435,6 +435,7 @@ config("delayloads") { "/DELAYLOAD:setupapi.dll", "/DELAYLOAD:shell32.dll", "/DELAYLOAD:shlwapi.dll", + "/DELAYLOAD:uiautomationcore.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:user32.dll", "/DELAYLOAD:usp10.dll", diff --git a/src/chrome/app/chromium_strings.grd b/src/chrome/app/chromium_strings.grd index a6d8bddc..f7c67a1a 100644 --- a/src/chrome/app/chromium_strings.grd +++ b/src/chrome/app/chromium_strings.grd @@ -1,5 +1,4 @@ - @@ -277,12 +276,31 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - - Thorium - - - Thorium - + + + + + Google Thorium for Testing + + + Thorium for Testing + + + + + Thorium + + + Thorium + + + @@ -443,7 +461,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> Thorium may not function correctly because it is no longer supported on this Linux distribution - + Thorium @@ -521,7 +539,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -537,7 +555,7 @@ Permissions you've already given to websites and apps may apply to this account. Thorium lets you know if your passwords are ever compromised - + Thorium @@ -748,6 +766,17 @@ Permissions you've already given to websites and apps may apply to this account. + + + This extension contains malware and is unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + + This extension violates the Thorium Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + + This extension was unpublished by its developer, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info. + + Allow extension to show access requests in the Thorium toolbar @@ -789,17 +818,35 @@ Permissions you've already given to websites and apps may apply to this account. - - About &Thorium - + + + + About &Google Thorium for Testing + + + + + About &Thorium + + + Relaunch to Update &Thorium - - About &Thorium - + + + + About &Google Thorium for Testing + + + + + About &Thorium + + + Relaunch to update &Thorium @@ -820,7 +867,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -832,11 +879,11 @@ Permissions you've already given to websites and apps may apply to this account. - Password Manager + P&assword Manager - + Thorium @@ -1072,6 +1119,22 @@ Permissions you've already given to websites and apps may apply to this account. + + + + Click the Thorium menu + + + Click “Password Manager” + + + Use your shortcut to quickly get to the Password Manager. You can move your shortcut to your computer's home screen or app launcher. + + + Add a shortcut to Password Manager + + + This extension has changed what page is shown when you start Thorium. @@ -1405,18 +1468,18 @@ Permissions you've already given to websites and apps may apply to this account. {COUNT, plural, - =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute.} - other {Your administrator automatically closes Thorium when it isn't used for # minutes.}} + =1 {Your organization automatically closes Thorium when it isn't used for 1 minute.} + other {Your organization automatically closes Thorium when it isn't used for # minutes.}} {COUNT, plural, - =1 {Your administrator automatically deletes browsing data when it isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} - other {Your administrator automatically deletes browsing data when it isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} + =1 {Your organization automatically deletes browsing data when Thorium isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} + other {Your organization automatically deletes browsing data when Thorium isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} {COUNT, plural, - =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.} - other {Your administrator automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}} + =1 {Your organization automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.} + other {Your organization automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}} Continue using Thorium @@ -1606,7 +1669,7 @@ Permissions you've already given to websites and apps may apply to this account. - + Thorium @@ -1706,6 +1769,9 @@ Permissions you've already given to websites and apps may apply to this account. Memory Saver made Thorium faster + + While this tab was inactive, memory was freed up to keep Thorium fast. You can choose to always exclude this site from being inactive. + @@ -1721,18 +1787,6 @@ Permissions you've already given to websites and apps may apply to this account. - - - - - modify settings for filling payment methods. - - - - - Thorium is trying to modify settings for filling payment methods. - - diff --git a/src/chrome/app/generated_resources.grd b/src/chrome/app/generated_resources.grd index d96783b6..7f1a8c86 100644 --- a/src/chrome/app/generated_resources.grd +++ b/src/chrome/app/generated_resources.grd @@ -1,5 +1,5 @@ - + - Create Shortcut... + Create &Shortcut... - Create shortcut... + Create &shortcut... - Install $1Gmail... + &Install $1Gmail... - Install $1Gmail... + &Install $1Gmail... @@ -3530,9 +3652,14 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco This site was blocked from knowing your precise location because you usually don't allow this - - Allow for this site - + + Allow for this site + + + + These sites can use info they’ve saved about you as you browse $1example.com. + + @@ -3871,6 +3998,9 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco Certificate Policies + + Signed Certificate Timestamp List + Certificate Policy Mappings @@ -3991,6 +4121,12 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco Registered OID + + Microsoft Application Policies + + + Microsoft Certificate Template + Microsoft Certificate Template Name @@ -5266,7 +5402,7 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco Not allowed to read & change - Requested to read & change + Requesting to read & change All extensions can read & change $1google.com @@ -5275,10 +5411,10 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco You blocked all extensions from $1google.com - This extension can read & change $1google.com + This extension can read and change $1google.com - Click this extension's icon to read & change $1google.com + Click this extension's icon to read and change $1google.com Pinned by your administrator @@ -5288,6 +5424,9 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco + + Site permissions + Can't read or change site's data @@ -5301,7 +5440,7 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco You previously chose to not allow any extensions on $1google.com - When I click the extension + Ask on every visit Always on $1google.com @@ -5324,6 +5463,12 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco Learn more about site access + + Pin to toolbar + + + Unpin from toolbar + Options @@ -5356,6 +5501,9 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco + + Site Permissions + Can't Read or Change Site's Data @@ -5369,7 +5517,7 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco You Previously Chose To Not Allow Any Extensions On $1google.com - When I Click the Extension + Ask on Every Visit Always on $1google.com @@ -5392,6 +5540,12 @@ You can send it to Google to check if it's unsafe. Scans usually take a few seco Learn More About Site Access + + Pin to Toolbar + + + Unpin from Toolbar + Options @@ -5818,10 +5972,13 @@ Keep your key file in a safe place. You will need it to create new versions of y These extensions don't need to see and change information on this site. - Extensions are allowed on this site + Extensions allowed on this site - Extensions are blocked on this site + Extensions not allowed on this site + + + Allow extensions on this site Select to block all extensions on this site @@ -5835,17 +5992,50 @@ Keep your key file in a safe place. You will need it to create new versions of y Extensions are blocked on this site + + Extensions can request access to this site + + + To apply your updated settings to this site, reload this page + + + Reload + + + Reload page + Requests access Allow + + Allow extension to read and change this site + + + Dismiss + + + Dismiss request + - Allowed to request access + Allowed on this site - Not allowed to request access + Not allowed on this site + + + Allow $1AdBlock on this site + + + More options + + + Select to see more options + + + Extension is pinned. Select to see more options No access needed @@ -5853,6 +6043,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Open webstore + + Change site permissions + + + $1Always on this site. Select to change site permissions + Ask on every visit @@ -5865,6 +6061,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Manage this extension + + Manage extension settings + Allowed to show requests in the toolbar @@ -6189,10 +6388,6 @@ Keep your key file in a safe place. You will need it to create new versions of y Password saved - - - Weak password entered - @@ -6297,6 +6492,21 @@ Keep your key file in a safe place. You will need it to create new versions of y Sign up and sign in faster when your password is automatically saved to $1Google Password Manager for $2user@gmail.com. + + When you use and save this password: + + + It's available on any device + + + It's protected by the best of Google + + + You'll be notified if it's ever at risk + + + It will be saved to $1Google Password Manager for $2user@gmail.com. + Passwords are saved to $1Google Password Manager. @@ -7106,6 +7316,18 @@ Keep your key file in a safe place. You will need it to create new versions of y You won't see this specific message again + + Pick a color scheme mode + + + Light + + + Dark + + + System + @@ -7117,6 +7339,9 @@ Keep your key file in a safe place. You will need it to create new versions of y You won't see $1shopping suggestions on this page again + + You won't see $1this type of card again + Hide $1Office Chairs @@ -7427,6 +7652,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Resume your journey for $1Office Chairs + + Resume browsing for $1Office Chairs + Show all @@ -7439,12 +7667,24 @@ Keep your key file in a safe place. You will need it to create new versions of y <br> You can manage settings from the card menu or see more options in Customize Thorium. + + You’re seeing pages you've visited and suggested searches to help you easily get back to your most recent activity. + <br> + <br> + You can manage settings from the card menu or see more options in Customize Thorium. + Journeys + + this type of card + Journeys card + + this card + Open all in new tab group @@ -7593,6 +7833,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Side Panel Selector + + Open Google Search side panel + + + Close Google Search side panel + Search @@ -7628,6 +7874,9 @@ Keep your key file in a safe place. You will need it to create new versions of y All Bookmarks + + Open Side Panel to see All Bookmarks + Tracked products @@ -7679,6 +7928,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Bookmark things you want to come back to later + + Nothing to show yet + + + Add a bookmark to this folder + Sign in to see your bookmarks @@ -7692,7 +7947,7 @@ Keep your key file in a safe place. You will need it to create new versions of y There are no bookmarks that match your search. - {NUM_BOOKMARKS, plural, =1 {1 bookmark} other {# bookmarks}} + ($11) Edit Bookmark @@ -7763,9 +8018,21 @@ Keep your key file in a safe place. You will need it to create new versions of y Open folder $1All Bookmarks - + Open $1New York Times + + Select folder $1All Bookmarks + + + Select $1New York Times + + + Deselect folder $1All Bookmarks + + + Deselect $1New York Times + Price tracking is enabled. Price is $1400. @@ -7953,6 +8220,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Extensions + + Extensions are blocked on this site + + + Extensions are allowed on this site + Extension permissions @@ -8120,6 +8393,43 @@ Keep your key file in a safe place. You will need it to create new versions of y + + + + + + Your Password Is Saved + + + Use Your Passwords on Your iOS Devices + + + Get Started + + + + + Your password is saved + + + Use your passwords on your iOS devices + + + Get started + + + + You can access it on Google Password Manager. + + + To use your saved passwords on your phone, download Thorium for iOS and sync your account. + + + To use your saved passwords on your phone, follow the QR code, download Thorium for iOS and sync your account. + + + + $1 (Incognito) @@ -8440,7 +8750,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Customize Thorium to give your browser a new look - Click “Customize Thorium” + Click to customize Thorium Click “Change theme” to explore themes inspired by artists, nature and more @@ -8458,6 +8768,20 @@ Keep your key file in a safe place. You will need it to create new versions of y You can now give your browser a new look at any time. + + + Open the menu + + + Click “Settings” + + + Click “Add Shortcut” + + + Click “Install” + + @@ -8639,6 +8963,9 @@ Check your passwords anytime in $1Google To view your password or add a note about it, select manage your passwords in the search and address bar + + Get to your saved passwords quicker + You saved a note for a password on this site. To view it, click the key icon. @@ -8731,6 +9058,9 @@ Check your passwords anytime in $1Google Suggest strong password + + Use a passkey on a different device + Password will be saved in your Google Account, $1user@gmail.com. You won’t have to remember it. @@ -9548,6 +9878,12 @@ Check your passwords anytime in $1Google Open browser window + + Copy &link + + + Create &QR Code + @@ -9556,6 +9892,12 @@ Check your passwords anytime in $1Google Open Browser Window + + Copy &Link + + + Create &QR Code + Update @@ -9731,6 +10073,11 @@ Check your passwords anytime in $1Google Restart + + + Your browser is managed by your parent + + @@ -9931,12 +10278,12 @@ Check your passwords anytime in $1Google - Send to Your Devices + Send to Your &Devices - Send to your devices + Send to your &devices @@ -10015,6 +10362,10 @@ Check your passwords anytime in $1Google desc="Button text for the QR Code generator's download button."> Download + + Copy + Use $1300 characters or fewer @@ -10034,7 +10385,7 @@ Check your passwords anytime in $1Google Screenshot - + Copy link @@ -10176,6 +10527,10 @@ Check your passwords anytime in $1Google desc="Show the clipboard history menu."> Clipboard + + Paste from clipboard + @@ -10856,7 +11211,7 @@ Check your passwords anytime in $1Google - + Share device signals? @@ -10870,8 +11225,11 @@ Check your passwords anytime in $1Google This profile is managed by $1example.com. To continue using this managed profile, your organization requires you to share your device signals. Device signals can include information about your browser, OS, device, installed software, and files. + + + This profile is managed by your organization. To continue using this managed profile, your organization requires you to share your device signals. -If you choose not to share signals, this profile will be closed. +Device signals can include information about your browser, OS, device, installed software, and files. @@ -11211,6 +11569,9 @@ Please help our engineers fix this problem. Tell us what happened right before y No Tabs From Other Devices + + Sign In To See Tabs From Other Devices + @@ -11228,6 +11589,9 @@ Please help our engineers fix this problem. Tell us what happened right before y No tabs from other devices + + Sign in to see tabs from other devices + @@ -12795,40 +13159,40 @@ Please help our engineers fix this problem. Tell us what happened right before y - This tab is using your camera or microphone. + This tab is using your camera or microphone - This tab's content is being shared. + This tab's content is being shared - This tab is playing audio. + This tab is playing audio - This tab's audio is being muted. + This tab's audio is being muted - This tab is connected to a Bluetooth Device. + This tab is connected to a Bluetooth device - This tab is actively scanning for Bluetooth devices. + This tab is actively scanning for Bluetooth devices - This tab is connected to a USB device. + This tab is connected to a USB device - This tab is connected to a HID device. + This tab is connected to a HID device - This tab is connected to a serial port. + This tab is connected to a serial port - This tab is playing a video in picture-in-picture mode. + This tab is playing a video in picture-in-picture mode - This tab is sharing your screen. + This tab is sharing your screen - This tab is presenting VR content to a headset. + This tab is presenting VR content to a headset @@ -12951,6 +13315,18 @@ Please help our engineers fix this problem. Tell us what happened right before y Loading $1Google News + + $1Google Hangouts - Inactive tab + + + $1Google Hangouts - $2175MB freed up + + + $1Google Hangouts - Memory usage - $2175MB + + + $1Google Hangouts - High memory usage - $2175MB + @@ -13780,12 +14156,6 @@ Please help our engineers fix this problem. Tell us what happened right before y To sign into this site with a passkey, you need to turn on Windows Hello in settings. Then return to this site and try again. - - Your identity couldn't be verified - - - This device doesn't support the type of security key requested by this website - No passkeys available @@ -13844,6 +14214,18 @@ Please help our engineers fix this problem. Tell us what happened right before y A notification was sent to $1Ted's Pixel 6 Pro + + Connecting to your device + + + Follow the steps on your device + + + On both devices, check your internet connection and turn on Bluetooth. Then, try again. + + + Close + Didn't get it? @@ -13959,11 +14341,11 @@ Please help our engineers fix this problem. Tell us what happened right before y A record of your visit to this site may be kept on your security key. - - Your security key can't be used with this site + + Your device can't be used with this site - - accounts.google.com$1 may require a newer or different kind of security key + + accounts.google.com$1 may require a newer or different kind of device Your security key does not have enough space for any more accounts. @@ -14399,6 +14781,13 @@ Please help our engineers fix this problem. Tell us what happened right before y Learn more + + + {NUM_SUB_APPS, plural, + =1 {Uninstalling "{APP_NAME}Citrix" will also uninstall this app:} + other {Uninstalling "{APP_NAME}Citrix" will also uninstall these apps:}} + + Speech recognition service @@ -14622,12 +15011,15 @@ Please help our engineers fix this problem. Tell us what happened right before y To continue, $1idp.com will share your name, email address, and profile picture with this site. See this site's $2privacy policy$3 and $4terms of service$5. - + Failed signing in to $1rp.example with $2idp.example - + Continue + + You can use your $1idp.example account on this site. To continue, sign in to $1idp.example. + Sign in to $1rp.example @@ -14842,18 +15234,21 @@ Please help our engineers fix this problem. Tell us what happened right before y Tab active again - $1175MB of memory saved + Memory savings summary, $1175MB freed up - $1300 MB Saved + $1300 MB Freed Up - $1300 MB saved + $1300 MB freed up + + Memory Saver + While this tab was inactive, Memory Saver freed up memory for other tasks. You can change this anytime in $1Settings. @@ -14874,12 +15269,12 @@ Please help our engineers fix this problem. Tell us what happened right before y - Keep Site Active + Exclude Site - Keep site active + Exclude site @@ -14892,17 +15287,45 @@ Please help our engineers fix this problem. Tell us what happened right before y Memory saved + + + Small Savings + + + Medium Savings + + + Large Savings + + + Huge Savings + + + + + Small savings + + + Medium savings + + + Large savings + + + Huge savings + + - This tab is using $1300 MB + Memory usage: $1300 MB High memory usage: $1300 MB - Inactive tab savings: $1300 MB + Inactive tab: $1300 MB freed up Inactive tab @@ -14925,6 +15348,26 @@ Please help our engineers fix this problem. Tell us what happened right before y Email filled. + + + + + Lorem ipsum dolor sit amet + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore. + + + First button + + + Second button + + diff --git a/src/chrome/app/settings_chromium_strings.grdp b/src/chrome/app/settings_chromium_strings.grdp index 854b28d9..c2035577 100644 --- a/src/chrome/app/settings_chromium_strings.grdp +++ b/src/chrome/app/settings_chromium_strings.grdp @@ -1,5 +1,4 @@ - @@ -9,12 +8,24 @@ - - About Thorium - - - Get help with Thorium - + + + + About Thorium for Testing + + + Get help with Thorium for Testing + + + + + About Thorium + + + Get help with Thorium + + + Updating Thorium @@ -89,9 +100,18 @@ Thorium cannot determine or set the default browser - - This is a secondary installation of Thorium, and cannot be made your default browser. - + + + + Google Thorium for Testing cannot be made your default browser. + + + + + This is a secondary installation of Thorium, and cannot be made your default browser. + + + @@ -275,9 +295,6 @@ When on, Thorium frees up memory from inactive tabs. This gives active tabs and other apps more computer resources and keeps Thorium fast. Your inactive tabs automatically become active again when you go back to them. - - Thorium decides when a tab becomes inactive - When on, Thorium conserves battery power by limiting background activity and visual effects, such as smooth scrolling and video frame rates. diff --git a/src/chrome/app/settings_strings.grdp b/src/chrome/app/settings_strings.grdp index 9627eba7..008590f5 100644 --- a/src/chrome/app/settings_strings.grdp +++ b/src/chrome/app/settings_strings.grdp @@ -1,5 +1,4 @@ - @@ -114,10 +113,10 @@ Downloading text recognition files - Convert images to text + Convert PDF images to text - Scan PDF images to convert text for screen reader when necessary + Scan PDF images to convert content to text for the screen reader, when available. Only supported on Thorium browser. Live Caption @@ -126,7 +125,7 @@ Live Translate - Automatically translate captions to a target language. + Automatically translates captions @@ -237,6 +236,9 @@ Show bookmarks bar + + Show images on tab hover preview cards + Side panel @@ -586,6 +588,12 @@ =1 {1 weak password} other {{NUM_WEAK} weak passwords}} + + {NUM_REUSED, plural, + =0 {No reused passwords} + =1 {1 reused password} + other {{NUM_REUSED} reused passwords}} + {COUNT, plural, =0 {No security issues found} @@ -1408,6 +1416,9 @@ Signs you out of most sites. You won't be signed out of your Google Account. + + Signs you out of most sites. You'll stay signed in to your Google Account so your Family Link settings for Thorium apply. + Clears history, including in the search box @@ -1538,12 +1549,21 @@ Memory Saver - - Select when your tabs become inactive + + Free up memory based on usage - + + Recommended + + + Free up memory based on tab inactivity + + Memory saver options + + Choose time range + Add to the "always keep these sites active" list @@ -1556,6 +1576,18 @@ Additional sites + + Add current sites + + + Add sites manually + + + Active site + + + Sites you add will always stay active and memory won't be freed up from them. <a href="$1" target="_blank">Learn more about site exclusion</a> + Power @@ -2012,6 +2044,9 @@ List of topics you blocked that you don't want shared with sites + + Thorium auto-deletes topics that are older than 4 weeks. As you keep browsing, a topic might reappear on the list. Or you can block topics you don’t want Thorium to share with sites. Learn more about <a href="$1" target="_blank">managing your ad privacy in Thorium.</a> + As you browse, whether an ad you see is personalized depends on this setting, <a href="$1" target="_blank">Site-suggested ads</a>, your <a href="$2" target="_blank">cookie settings</a>, and if the site you’re viewing personalizes ads @@ -2084,7 +2119,7 @@ For example, if you visit a site that sells long-distance running shoes, the site might decide that you're interested in running marathons. Later, if you visit a different site, that site can show you an ad for running shoes suggested by the first site. - Thorium auto-deletes sites that are older than 30 days. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you. + Thorium auto-deletes sites that are older than 30 days. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you. Learn more about <a href="$1" target="_blank">managing your ad privacy in Thorium.</a> Learn more about site-suggested ads @@ -3970,6 +4005,24 @@ Cancel + + + + Sites you visit can embed content from other sites, for example images, ads, and text. These other sites can ask for permission to use info they’ve saved about you as you browse the site. + + + Sites can ask to use info they’ve saved about you + + + Sites are blocked from asking you to use info they’ve saved about you + + + Allowed to access info they've about you while embedded in another site + + + Not allowed to access info they've about you while embedded in another site + + No Bluetooth devices found @@ -3997,6 +4050,9 @@ Add a site + + Add sites + Edit site diff --git a/src/chrome/app/shared_settings_strings.grdp b/src/chrome/app/shared_settings_strings.grdp index 0ebb8042..c30dfb0a 100644 --- a/src/chrome/app/shared_settings_strings.grdp +++ b/src/chrome/app/shared_settings_strings.grdp @@ -1,5 +1,4 @@ - @@ -96,11 +95,14 @@ Default - Caption language + Preferred caption language Manage languages + + Add and remove languages to caption + Translate to @@ -421,6 +423,9 @@ Checking for updates + + You reverted to a previous version of ThoriumOS. To get updates, wait until the next version is available. + diff --git a/src/chrome/browser/background/background_mode_manager.cc b/src/chrome/browser/background/background_mode_manager.cc index 1e28879e..d5071555 100644 --- a/src/chrome/browser/background/background_mode_manager.cc +++ b/src/chrome/browser/background/background_mode_manager.cc @@ -20,7 +20,6 @@ #include "base/functional/callback_helpers.h" #include "base/location.h" #include "base/logging.h" -#include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" #include "base/one_shot_event.h" #include "base/strings/utf_string_conversions.h" @@ -298,9 +297,6 @@ BackgroundModeManager::BackgroundModeManager( // outlives the profile storage. profile_storage_->AddObserver(this); - UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.IsBackgroundModePrefEnabled", - IsBackgroundModePrefEnabled()); - // Listen for the background mode preference changing. if (g_browser_process->local_state()) { // Skip for unit tests pref_registrar_.Init(g_browser_process->local_state()); diff --git a/src/chrome/browser/ui/browser_ui_prefs.cc b/src/chrome/browser/ui/browser_ui_prefs.cc index 19834fb1..496f57e0 100644 --- a/src/chrome/browser/ui/browser_ui_prefs.cc +++ b/src/chrome/browser/ui/browser_ui_prefs.cc @@ -56,6 +56,8 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry) { registry->RegisterIntegerPref( prefs::kMacRestoreLocationPermissionsExperimentCount, 0); #endif // BUILDFLAG(IS_MAC) + + registry->RegisterBooleanPref(prefs::kHoverCardImagesEnabled, true); } void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { diff --git a/src/components/url_formatter/url_formatter.cc b/src/components/url_formatter/url_formatter.cc index dae15825..9fbf7852 100644 --- a/src/components/url_formatter/url_formatter.cc +++ b/src/components/url_formatter/url_formatter.cc @@ -460,7 +460,7 @@ ComponentResult IDNToUnicodeOneComponent( // Valid punycode must not end with a dash. static constexpr char16_t kIdnPrefix[] = u"xn--"; if (!base::StartsWith(comp, kIdnPrefix) || comp.back() == '-') { - out->append(comp.data(), comp.size()); + out->append(comp); return result; } @@ -503,7 +503,7 @@ ComponentResult IDNToUnicodeOneComponent( // We get here with no IDN or on error, in which case we just revert to // original string and append the literal input. out->resize(original_length); - out->append(comp.data(), comp.size()); + out->append(comp); return result; }