0
Commit Graph

12 Commits

Author SHA1 Message Date
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