0
Commit Graph

12 Commits

Author SHA1 Message Date
Avi Drissman
4e1b7bc33d Update copyright headers in content/
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: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Lei Zhang
ed9be3a428 Remove many unneeded CONTENT_EXPORT entries.
Many classes within content don't need CONTENT_EXPORT because they are
not in content/public and they are not directly used from tests.

Change-Id: I22696b3840ab7a89371184e866b05d0b4980e7dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3288753
Auto-Submit: Lei Zhang <thestig@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942828}
2021-11-17 22:01:18 +00:00
Peter Boström
1d6a095400 Remove unused "base/macros.h" in content/
Removes `#include "base/macros.h"` from files in content/ that do not
contain `ignore_result(`.

Bug: 1010217
No-Try: true
Change-Id: I887403408704241047e3bd66e953ff7df195368b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274993
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940781}
2021-11-11 16:07:03 +00:00
Lei Zhang
d56afb57d1 Delete unused STL includes from content/ headers.
Headers that do not contain "std::" do not need STL includes.

This CL is mechanically generated as follows:

INCL="algorithm|array|list|map|memory|queue|set|string|utility|vector"
git ls-files content | grep '\.h$' | xargs grep -L std:: | \
    xargs grep -El "#include <($INCL)>$" > to_process.txt

INCL_ESCAPED="$(echo $INCL|sed 's/|/\\|/g')"
cat to_process.txt | xargs sed -i "/^#include <\($INCL_ESCAPED\)>$/d"
cat to_process.txt | xargs sed -i '/^$/N;/^\n$/D'

Bug: 1200833
Change-Id: I3b8c9af66e23b37c3051760a7c5d4e132f9043a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2841623
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875908}
2021-04-23 23:13:46 +00:00
Thiabaud Engelbrecht
c4c423944b [discardable] Fix potential use-after-free in ClientDiscardableSharedMemoryManager.
Use scoped_refptr in ClientDiscardableSharedMemoryManager, to prevent
it from being destroyed before all the memory it allocated is destroyed.

Bug: 1153322
Change-Id: I01675d40bb081480460d5878a18baa58d5fe8507
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563898
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
Cr-Commit-Position: refs/heads/master@{#832428}
2020-12-01 18:24:39 +00:00
Thiabaud Engelbrecht
75bce096f9 [discardable] Add metrics for foreground discardable memory.
Bug: 1109209
Change-Id: Ia3e00e13bb8877f84f9e3193ca286927cda94b2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382676
Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809042}
2020-09-21 20:50:58 +00:00
Gyuyoung Kim
679a2a2d59 Remove unnecessary foo_interface_[ptr|request].h uses
This CL cleans up unnecessary uses of below header files,

  - interface_ptr.h
  - interface_request.h
  - threadsafe_interface_ptr.h
  - associated_interface_ptr.h

Bug: 955171, 1035484
Change-Id: I8a157f618b6bb100f212fe35cf437f3864aa6dda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280870
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#786184}
2020-07-08 06:26:09 +00:00
Hans Wennborg
f30ad80cf2 Remove/replace unnecessary includes of logging.h (content/)
If the file just needs the CHECK/CHECK_OP/NOTREACHED
macros, use the appropriate header for that instead.
Or if logging.h is not needed at all, remove it.

This is both a nice cleanup (logging.h is a big header,
and including it unnecessarily has compile-time costs),
and part of the final step towards making logging.h no
longer include check.h and the others.

Bug: 1031540
Change-Id: I3985bda6743382d5c0a612e43890a35c02182258
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254123
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780586}
2020-06-20 16:50:20 +00:00
Mario Sanchez Prada
85a081bc9b Cleanup usages of old mojo types and remove unused code
In the context of the migration started last year to migrate all the
uses of old mojo types to the new ones, today I've found that there
were a few bits that we could remove and either migrate easily or
outright remove them, now that nearly all the instances of those old
types have been migrated.

Therefore, this CL does a "sweep" and does the following cleanups in
different places, so that we get closer to the point where no old types
are present:

* Migrate uses of old types to the new ones in a couple of places where
  they were not migrated (i.e. MockChromePrompt, TestService).
* Remove unused templated methods from //ipc still using old types.
* Remove unused Interface{Ptr,Request} variants of helper methods
  Connector::BindInterface(), InterfaceProvider::GetInterface() and
  LocalInterfaceProvider::GetInterface().
* Remove unused includes for header files related to old mojo types.
* Delete strong_associated_binding_set.h (not even being compiled).

TBR=blundell@chromium.org,halliwell@chromium.org,achuith@chromium.org,achuith@chromium.org,kinuko@chromium.org

Bug: 955171
Change-Id: Ia4ca6f3f68bc1d6d4fd4016ed16c07ff132ea19f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235699
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#777288}
2020-06-11 08:20:43 +00:00
Gyuyoung Kim
22a22ea32d Remove unused binding.h include in //content
This CL cleans up unnecessary binding.h includes
in //content.

Bug: 955171
Change-Id: I20968eecb210e0f60d0ac0d89db28d6cbbbf92c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1959194
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#723628}
2019-12-11 01:05:51 +00:00
Gordon Guan
f2f7a840f9 discardable-memory: Add discardable memory backing field trial
Add detection code for a field trial comparing different
implementations of discardable memory, targeting a very
specific subset of devices and platforms which possess
required capabilities. Further details in bug if required.

Bug: 1014513
Change-Id: Id81a19b06e0c94fa6090ef1d5f6d2cd7fdd80e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922749
Commit-Queue: Gordon Guan <gordonguan@google.com>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719665}
2019-11-27 18:26:44 +00:00
Gordon Guan
96c21ee851 Integrate DiscardableMemory using MADV_FREE with renderer
Generalize usage of discardable memory in the renderer process to use
higher-level discardable memory primitives (DiscardableMemoryAllocator
and DiscardableMemory).

Implement a factory method to create a discardable memory allocator
implementation in renderer context depending on platform support.

Note that usage of MADV_FREE DiscardableMemory is gated by a feature
flag. Discardable memory should behave exactly as before this
change if the feature flag is not enabled.

Binary-Size: Unused ForTest method not being removed by linker
Bug: 1014513
Change-Id: I94afd2347a6ecbe254cd2d1a3ad667a6624293ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850758
Commit-Queue: Gordon Guan <gordonguan@google.com>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713010}
2019-11-06 15:05:39 +00:00