0
Commit Graph

22 Commits

Author SHA1 Message Date
Tom Sepez
40add7f408 Suppress next batch of -Wunsafe-buffers-in-libc-calls warnings.
Iterative process to find all such warnings. These include some
android and chromeos specific files, among others.

Bug: 390223051
Change-Id: I903bd03881a681fdb12eaa573ade2771325ca1ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6354823
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Owners-Override: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1434627}
2025-03-18 23:32:02 -07:00
Sorin Jianu
83aa6d0ef4 components: default the user-defined empty ctor and dtor where possible
I need an owner's approval please for changes under:
components/on_load_script_injector

This is a mechanical change. There are a few instances (but not all)
of empty user-defined constructors and destructors which can be
defaulted in the /components code.

This CL was uploaded by git cl split.

R=zijiehe@google.com

Bug: 371316188
Change-Id: I8185dc68b2b292f32837bd06005c907d784bc6cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5917416
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
Auto-Submit: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365952}
2024-10-09 02:42:58 +00:00
Helmut Januschka
99d9b18e04 Convert base::StringPiece to std::string_view in //components 4/5
The changes of this CL are made using the following script.
Script: https://issues.chromium.org/issues/40506050#comment343

Bug: 40506050
Change-Id: I7e47c81eff6608cd82ac94bdc2198b6369addedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5501343
Auto-Submit: Helmut Januschka <helmut@januschka.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1296024}
2024-05-03 12:19:04 +00:00
Jeff Yoon
81e6ce990a [buganizer] Migrate DIR_METADATA components/
Migrate all remaining metadata files for components/
folders.

Verify components with http://b/components/{id} or at
go/chrome-on-buganizer-prod-components.

Bug: chromium:1518875
Change-Id: Ib2f98db0dc16f1df6c501b1d607ec586a05843dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5284041
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259078}
2024-02-12 10:11:11 +00:00
Avi Drissman
12be03159f Update header includes for /base/functional in /components
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I3179c6b5879e1e2d5a5f4990484b9a85f8548809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4152595
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091229}
2023-01-11 09:16:09 +00:00
Ryan Keane
41b13bc604 [Cast Receiver] Move Bindings Management Functionality
This CL moves bindings management functionality from the `//chromecast`
tree to the new `cast_receiver` component, as well as refactoring the
existing `//chromecast/cast_core` code to use the new implementation.

Bug: 1357135, 1359559, 1359578
Change-Id: I0ca5891c098678612d9f7822c7d34d39905d876c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3871419
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Vigen Issahhanjan <vigeni@google.com>
Commit-Queue: Ryan Keane <rwkeane@google.com>
Reviewed-by: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1063412}
2022-10-25 18:31:28 +00:00
Avi Drissman
8ba1bad80d Update copyright headers in components/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: If6a3370b0b2849d889ce797596fe1ccbad2f3fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891619
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046502}
2022-09-13 19:22:36 +00:00
Robert Sesek
dbd520db6e Provide explicit template arguments to blink::AssociatedInterfaceRegistry::AddInterface
In a follow-up CL, automatic type deduction will be prohibited.

Bug: 1278574
AX-Relnotes: n/a
Change-Id: Ie806826b721bcd144ff2fd06fc6c502e88ca5f51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3773459
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1031418}
2022-08-04 09:19:03 +00:00
David Dorwin
b2b9fded39 [fuchsia] Replaced team_email with fuchsia-dev@
This is the newer address for development.

Change-Id: I53de1695676cacf6f42f29b2244f76810b4e6148
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495697
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#976035}
2022-03-01 02:00:26 +00:00
Lukasz Anforowicz
d00c1ed305 Call IsSameOriginWith without calling url::Origin::Create.
Calls to url::Origin::Create are error-prone as described in more
details in the linked bug.  This CL reduces the usage of
url::Origin::Create by:

1) providing and using an overload of url::Origin::IsSameOriginWith that
   takes a GURL as the parameter (rather than requiring the caller to
   convert the argument to url::Origin).  Introducing this overload was
   discussed in
   https://groups.google.com/a/chromium.org/g/navigation-dev/c/anCWy4uJQGU/m/R9IzZ33_BQAJ

2) using the already existing url::IsSameOriginWith free function that
   works with GURL parameters.

Bug: 1270878
Change-Id: Id4e7c27a64a857913aa9862ecd5aba96bb717e16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3309669
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Charles Reis <creis@chromium.org>
Commit-Queue: Charles Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#958439}
2022-01-13 05:25:10 +00:00
Lei Zhang
b2ba72f730 Remove unneeded <string> includes from components/.
This CL is first mechanically generated as follows:

git ls-files components | grep '\.h$' | \
    xargs grep -l '^#include <string>' | \
    xargs grep -L -E 'std::(|w|u16|basic_)string' | \
    xargs grep -L std::char_traits > to_process.txt

cat to_process.txt | xargs sed -i "/^#include <string>$/d"
cat to_process.txt | xargs sed -i '/^$/N;/^\n$/D'

Bug: 1200833
Change-Id: I9e10b2dd04ada72540535649603171245bc8989a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2899212
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#884134}
2021-05-18 20:51:39 +00:00
Lei Zhang
2fdfa8929a Fix header guards in components/.
Mostly generated mechanically as follows:

git ls-files '*.h' | grep '^components/' | \
    xargs parallel cpplint.py --filter=-,+build/header_guard -- 2>&1 | \
    grep build/header_guard | tools/apply_cpplint_header_guard.py

Except for files in components/policy/core/common/management/, which
were sufficiently wrong that they required manual fixing.

Bug: 1200694
Change-Id: I019b0d5cd2dfc9ca54d09b7085824b0ea9a7f579
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2839703
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874980}
2021-04-22 02:15:43 +00:00
Hans Wennborg
7d15b70db2 Remove superfluous includes from render_frame_host.h
This is a large and fairly widely included header. The size of itself
and all the files it includes is 13 MB, it is part of ca 2,000
translation units for the 'chrome' target. Its added size for that
target is ca 5 GB. The compile time of the header alone is ca 4 s.

This change reduces the compile time of the header to ca 1 s,
and saves 8 CPU minutes of build time for the chrome target.

Bug: 242216
Change-Id: Idcaa4f6326545a64324a9d7fa45d6d27b136f622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2794474
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868174}
2021-03-31 17:58:55 +00:00
Jan Wilken Dörrie
fa241bad9f [LSC] Replace base::string16 with std::u16string in //components
This change replaces base::string16 with std::u16string in //components.

Reproduction steps:
$ git grep -lw 'base::string16' components | \
      xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format

Bug: 1184339
Change-Id: Ifd99bc43ca04810a480466369b5cd6680bbe89ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752068
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862035}
2021-03-11 17:57:01 +00:00
Jan Wilken Dörrie
362098d912 [LSC] Replace base::char16 with char16_t in //chrome and //components
Replaces base::char16 with char16_t and removes unused using declaration
in components/password_manager/core/browser/possible_username_data.cc.

See https://crbug.com/1184339.

Change-Id: Ia2f53830b272903129f4ccb4f69fdb82f7e5b506
Bug: 1184339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2740919
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861071}
2021-03-09 08:47:09 +00:00
Norman Rosas
f5ba03c680 Added DIR_METADATA files to a batch of subfolders in //components/o…
also removed duplicated metadata from OWNERS files

Bug: 1113033
Change-Id: I6c2e03dc11f647717a08baf2c4825774c1499eea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2569814
Auto-Submit: Norman Rosas <normando@google.com>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833222}
2020-12-03 09:22:49 +00:00
btolsch
7768ef5af5 [bindings] Use explicit instantiation for OnLoadScriptInjectorHost
This change converts the OnLoadScriptInjectorHost template to use
explicit instantiation for std::string and uint64_t.  This will improve
compile times and also makes the types for ScriptId explicit.  The
change also fixes the public deps of the build target.

Bug: None
Change-Id: I0b52f7486589071150a6f5747daef0a0c6fceaa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468182
Commit-Queue: Brandon Tolsch <btolsch@chromium.org>
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817587}
2020-10-15 18:38:51 +00:00
Kevin Marshall
a1d80aaf7a Reland "[bindings] Define cross-platform NamedMessagePortConnector impl."
This is a reland of 13c126e31c

Addresses the size increase by removing the dep on //ui/base.
All uses of ui::ResourceBundle in CastRunner are replaced with disk
reads.

Original change's description:
> [bindings] Define cross-platform NamedMessagePortConnector impl.
>
> Refactors NamedMessagePortConnector into a platform-agnostic component,
> which can be reused across FIDL, in-process, and testing contexts.
> It uses Blink messages and message ports as a common basis for
> message and port transport.
>
> * Implements some missing portions of the Blink/FIDL MessagePort
>   conversion layer.
> * Adds a Fuchsia implementation of NMPC.
>
> Bug: 1104369
> Change-Id: I01e86c38963bfb114a7466c6f73b143e5302ad1e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293110
> Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#806684}

Bug: 1104369
Change-Id: I77dc7679030e0f0aa61ad4dba2050ce2cb6e22d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417492
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808393}
2020-09-18 17:03:36 +00:00
Sharon Yang
12e346a13d Revert "[bindings] Define cross-platform NamedMessagePortConnector impl."
This reverts commit 13c126e31c.

Reason for revert: This CL pulls in ui/base and increasing the size of CastRunner. The size increase is breaking the Chromium (into Fuchsia) roller.

Original change's description:
> [bindings] Define cross-platform NamedMessagePortConnector impl.
> 
> Refactors NamedMessagePortConnector into a platform-agnostic component,
> which can be reused across FIDL, in-process, and testing contexts.
> It uses Blink messages and message ports as a common basis for
> message and port transport.
> 
> * Implements some missing portions of the Blink/FIDL MessagePort
>   conversion layer.
> * Adds a Fuchsia implementation of NMPC.
> 
> Bug: 1104369
> Change-Id: I01e86c38963bfb114a7466c6f73b143e5302ad1e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293110
> Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#806684}

TBR=ddorwin@chromium.org,kmarshall@chromium.org,jochen@chromium.org,lijiawei@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1104369
Change-Id: Ie5505f33dc2b29ce82fe5d44f8919e985da35102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414651
Reviewed-by: Sharon Yang <yangsharon@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807575}
2020-09-16 18:26:15 +00:00
Kevin Marshall
13c126e31c [bindings] Define cross-platform NamedMessagePortConnector impl.
Refactors NamedMessagePortConnector into a platform-agnostic component,
which can be reused across FIDL, in-process, and testing contexts.
It uses Blink messages and message ports as a common basis for
message and port transport.

* Implements some missing portions of the Blink/FIDL MessagePort
  conversion layer.
* Adds a Fuchsia implementation of NMPC.

Bug: 1104369
Change-Id: I01e86c38963bfb114a7466c6f73b143e5302ad1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293110
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806684}
2020-09-14 17:49:41 +00:00
Kevin Marshall
3f69381d72 [on_load_script_injector] Make ScriptId type into a template parameter.
Promotes ScriptId to a template parameter, so that the script injector
can be used for multiple purposes on a given platform.
Specifically, it will allow the use of uint64 script IDs on
FrameImpl, and base::StringPiece in bindings tests.

Migrate OnLoadScriptInjectorHost implementation from .cc to .h.


Bug: 1104369
Change-Id: Idfacd460d8d12038cfc2c00896e538ee87c55a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341837
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795994}
2020-08-07 17:45:36 +00:00
Kevin Marshall
6f8f04b416 [bindings] Combine OnLoadScriptInjector impls into a shared component.
Consolidates the forked OnLoadScriptInjectors into one single shared
implementation. The shared implementation is a necessary prerequisite
step for developing platform-agnostic bindings browsertests.

* Deletes Fuchsia and Cast specific OnLoadScriptInjectors.
* Moves most browser process logic into a new class
  "OnLoadScriptInjectorHost", to further harmonize the platforms.
* Migrate Mojo interface from ScopedSharedBufferHandle to ReadOnlySharedMemoryRegion.

Merge-With: eureka-internal/432742
Bug: 1113289
Bug: 1060846
Bug: 1103058
Test: cast_shell_browsertests and web_engine_browsertests both pass.
Change-Id: If9fd2c54de08d9bc225771b01cdb32152a95fde8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2286193
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Sharon Yang <yangsharon@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795103}
2020-08-05 18:48:14 +00:00