0
Commit Graph

1909 Commits

Author SHA1 Message Date
Tomasz Tylenda
15aa98232c Revert "Remove DISALLOW_IMPLICIT_CONSTRUCTORS()"
This reverts commit 5625bdd791.

Reason for revert: breaks compile on https://ci.chromium.org/p/chrome/builders/ci/chromeos-eve-chrome and https://ci.chromium.org/p/chrome/builders/ci/chromeos-kevin-chrome

Original change's description:
> Remove DISALLOW_IMPLICIT_CONSTRUCTORS()
>
> This removes the macro definition and presubmit checks and all existing
> instances are inlined.
>
> IWYU is left as a separate step until all DISALLOW_* macros are removed.
>
> Bug: 1010217
> Change-Id: Ibc4d90d6a1f244a01e65cd3c5a9c50e5419ea5a1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3257088
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Owners-Override: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Peter Boström <pbos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#937250}

Bug: 1010217
Change-Id: I6341be7521fde453b671d6b339eef796a49847ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3256685
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Owners-Override: Henrik Boström <hbos@google.com>
Commit-Queue: Tomasz Tylenda <ttylenda@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937292}
2021-11-02 12:30:23 +00:00
Peter Boström
5625bdd791 Remove DISALLOW_IMPLICIT_CONSTRUCTORS()
This removes the macro definition and presubmit checks and all existing
instances are inlined.

IWYU is left as a separate step until all DISALLOW_* macros are removed.

Bug: 1010217
Change-Id: Ibc4d90d6a1f244a01e65cd3c5a9c50e5419ea5a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3257088
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937250}
2021-11-02 09:17:40 +00:00
Avi Drissman
bb0f59d26e Remove Flash debug URLs
Start with Flash debug URLs, and remove lots of code related to
handling them.

Fixed: 1263693
Change-Id: I17f898db54589ec9ddc6450ee77c7b8f329436f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3245978
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935993}
2021-10-28 18:12:54 +00:00
Austin Sullivan
bf759f27c1 Remove PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE enum option
This enum option allowed Pepper to use the Plugin Private File System.
The PPFS is soon to be removed and this option is unused anyways.

Bug: 1231162
Change-Id: I7db73ddc3ac75e5302613de40463d29223d41638
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3223422
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935218}
2021-10-27 00:11:23 +00:00
Patrick Monette
643cdf6190 Replace base/task/ temporary forward headers with their final locations
Note to QA: This merely changes includes and should not be blamed
for files it touched.

Bug: 1255932
Change-Id: I1ce4e31efd5792ebf2080812e665cae838a54972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226943
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932153}
2021-10-15 19:13:42 +00:00
Frank Tang
9d372e515b Test ICU status correctly by using U_SUCCESS
This correction is needed for ICU70 which lazy build the
internal break iterator instead of during constructor therefore
shift the return of U_USING_DEFAULT_WARNING in status
from usearch_open() to usearch_next(). Instead of explicitly
check different possible status code the DCHECK should just
use ICU macro U_SUCCESS() instead.

This change is needed to land to unblock the landing of ICU70
which have https://github.com/unicode-org/icu/pull/1473
that shift the returning of U_USING_DEFAULT_WARNING in status.

Bug: 1260116
Change-Id: Id78dae09d64d19d0c7840287033da75d93f7845a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3225780
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932111}
2021-10-15 17:58:49 +00:00
Patrick Monette
3d7d70920a Replace task-related headers to their equivalent in base/task/
This CL was generated by using tools/git/move_source_file.py to change
the includes for those files:
base/bind_post_task.h
base/deferred_sequenced_task_runner.h
base/post_task_and_reply_with_result_internal.h
base/sequenced_task_runner.h
base/sequenced_task_runner_helpers.h
base/single_thread_task_runner.h
base/task_runner.h
base/task_runner_util.h
base/updateable_sequenced_task_runner.h

Then formatted using "git cl format". DEPS files were fixed with a
simple search and replace script.

Bug: 1255932
Change-Id: I0d9b5ddd9260fde5e4581e6c6e0080bdb0ed2c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209175
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929867}
2021-10-08 20:27:23 +00:00
Peter Kasting
e5a38eddbd Migrate "base::TimeDelta::FromX" to "base:X".
All changes were done automatically with git grep, sed, xargs, etc.

No-Presubmit: true
No-Try: true
Bug: 1243777
Change-Id: I7cc197e9027f7837cd36afc67a209079f85ec364
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198824
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927512}
2021-10-02 03:06:35 +00:00
Peter Boström
3d5b3cbc71 Replace DISALLOW_COPY_AND_ASSIGN in ppapi/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: Iab44b67c7ca86cf5cfb1f6b27de5c18769d36632
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3177680
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924479}
2021-09-23 21:35:45 +00:00
Peter Kasting
2ae7dcdb7d Fix some instances of -Wshadow.
Bug: 794619
Change-Id: I04381aa8fe38386c48581759b1b8750ad3f5c447
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3095662
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#912811}
2021-08-18 00:04:11 +00:00
Ari Chivukula
1da866bfb5 Enable gn check for //ppapi/proxy:ipc_sources
This change is part of a code health effort to enable gn check for
all directories. https://docs.google.com/document/d/1sGxV0nGGoavOuw6XodYQ9xiN1f8fIhrb32gwADr2cD4/edit

Bug: 1225144
Change-Id: I905ef6e26b1877851c0b47b9c05b6d15483adb60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3089429
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#911028}
2021-08-11 22:39:06 +00:00
Sumaid Syed
89da162498 Fix header guards in ppapi/ [1/2]
Generated mechanically as follows:

git ls-files '*.h' | grep -E '^ppapi/' |\
grep -v third_party | grep -v ppapi/lib/gl |\
grep -v ppapi/generators/ |\
parallel --xargs cpplint.py --filter=-,+build/header_guard -- 2>&1 |\
grep build/header | head -68 |\
tools/apply_cpplint_header_guard.py

Bug: 1200694
Change-Id: I696ec66ca656c70950c6e78f03d8a542dd9734a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3026804
Reviewed-by: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Sumaid <ssyed@igalia.com>
Cr-Commit-Position: refs/heads/master@{#906599}
2021-07-29 06:41:22 +00:00
Sumaid Syed
567304f428 Add missing header guard in native_client_sdk/ and ppapi/
Bug: 1200694
Change-Id: Iaf74bf9c2ae3759630fa45c8c46a751d41a8983f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041485
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Sam Clegg <sbc@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#906129}
2021-07-28 10:33:56 +00:00
Maksim Ivanov
12c2f3c841 Make VarSerializationRules refcounter thread-safe
Switch the ppapi::proxy::VarSerializationRules to use a thread-safe
reference counting. This fixes the DCHECKs being hit when running
some NaCl applications.

The underlying root cause is not fully understood, but it seems related
to message passing, as the DCHECK stack trace (obtained by manually
adding logs) points to the SerializedVarSendInputShmem class and its
instantiation in PPB_Instance_Proxy::PostMessage(); the actual DCHECK
hit is triggered when incrementing the VarSerializationRules's ref
counter.

It seems that the implementation of the whole PPAPI proxy is actually
thread-safe due to the use of a global ppapi::ProxyLock. Therefore the
DCHECK hits might actually be false positives, and switching
VarSerializationRules from RefCounted to RefCountedThreadSafe should
suppress them.

Bug: 756531
Change-Id: I675002e882cf21fdd8bba63ba4f078f71ffe5bfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3051930
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#905984}
2021-07-28 00:53:04 +00:00
cfredric
4757cd9161 Enable gn check of //ppapi/proxy:proxy.
This CL trades the target-level allowlist for "nogncheck" on a few
lines. This allows us to turn on `gn check` for the target, and prevent
backsliding in other files, even while the leaky abstraction continues
to exist.

Bug: 1158995, 1228394
Change-Id: If147d215cdd0157175bbe9e9c9eba61dc7403547
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3018325
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#900650}
2021-07-12 21:23:17 +00:00
cfredric
455bf8429e Remove dependency on testonly target from ppapi/proxy/proxy_channel.
This CL simply changes the type used for `test_sink_`, since there's no
reason ProxyChannel has to be aware it's anything more specific than a
IPC::Sender.

Bug: 1158995
Change-Id: Ibd8c9c203c89e8c59b7fa865c594df740ee65c0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017716
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900143}
2021-07-09 21:02:18 +00:00
Lei Zhang
d4a2f8e1ed Swap base/stl_util.h to base/cxx17_backports.h in many files.
Files that use base::size() and base::data() should use
cxx17_backports.h directly, instead of getting it transitively through
stl_util.h.

Bug: 1210983
Change-Id: Icc5f425c23ef4e69283293e0d0d6d733fe3b4ba1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2974072
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899418}
2021-07-08 03:43:28 +00:00
Lei Zhang
998100f400 Add various missing STL headers.
https://crrev.com/c/2971087 will effectively remove the base/stl_util.h
include from many files. As a result, those that did not include the STL
headers they use will fail to build. As an early preparation for that
CL, add the missing STL headers.

Change-Id: I6500223f22e07cdcdd3cc0d399dbc5228b0c8ecd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2970614
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896119}
2021-06-25 17:58:19 +00:00
Andrew Shulaev
c8f936e7af Fix some 'gn check' errors in ppapi/proxy
Bug: 1158995
Change-Id: I6592dd835e83b37a40827fe5399414931ca7d0c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2983214
Commit-Queue: Andrew Shulaev <ddrone@google.com>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Auto-Submit: Andrew Shulaev <ddrone@google.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Erik Staab <estaab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896070}
2021-06-25 15:48:15 +00:00
Lei Zhang
4ab0f932f4 Remove unneeded base/stl_util.h includes in various dirs.
Repeatedly use grep to find all the files in various dirs that includes
base/stl_util.h but do not use any functions provided by
base/stl_util.h and base/cxx*_backports.h, and then remove the
base/stl_util.h include from them. Files that include base/stl_util.h,
but actually needs base/cxx*_backports.h, will be dealt with separately.

Bug: 1194078
Change-Id: I50796fb91c03eed1b63ce901005818ba2ec3d94c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909802
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#885634}
2021-05-21 20:10:54 +00:00
Lei Zhang
a613b275d8 Delete most remaining unused STL includes.
Headers that do not contain "std::" do not need STL includes.

This CL is first mechanically generated as follows:

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

Remove a bunch of third party files from 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'

Then fix the build in rlz/.

Bug: 1200833
Change-Id: I7c48cdb53ec85412b6331df626f2f5c4c0174faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2896225
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883318}
2021-05-16 06:40:14 +00:00
Olivier Li
769afe96f3 Adapt /ppapi/proxy to move-only thread options.
This change will let base::Thread::Options::delegate be a unique_ptr.
This CL was uploaded by git cl split.

Bug:1208166

R=bbudge@chromium.org

Change-Id: I4ce27e1b0074ea52fcd6f987bab9293db75526f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2889983
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Olivier Li <olivierli@chromium.org>
Auto-Submit: Olivier Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#882387}
2021-05-13 00:27:10 +00:00
Lei Zhang
f038b17368 Do IWYU for ipc/ipc_message_start.h.
Include it directly, rather than getting it indirectly from 3 headers
away.

Change-Id: Ida49822756e43a0206a6d46aa25c8e441a95e641
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2844773
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#878760}
2021-05-04 06:59:22 +00:00
Lei Zhang
de1976728f Swap out base/stl_util.h for base/containers/contains.h.
Files that only use base::Contains() and no other base/stl_util.h helper
can replace base/stl_util.h with base/containers/contains.h.

Use grep to find all the files that include base/stl_util.h. Then filter
out the ones that need base/stl_util.h by running "grep -L base::func"
where "func" is a function that base/stl_util.h provides. For the
remaining files, grep for ones that use base::Contains(), and do search
and replace for stl_util.h. Take the resulting CL and run clang format.

Bug: 970209
Change-Id: I2fb47d7c91d910a2d431ab178b398f9bfa0eb8c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2853072
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#877398}
2021-04-29 08:11:24 +00:00
Lei Zhang
31f8f58b84 Stop synthesizing ctrl + a key events to perform "select all" in PDFs.
In 2018 when https://crrev.com/551652 added support for the select all
command in interactive PDF forms, the only way to make PDFium do that
was by sending it key events. This was less than ideal, and it got worse
after https://crrev.com/718779. Now "select all" triggers a crash on
platforms that use Ozone.

Stop sending key events to the PDF plugin altogether to avoid the crash.
In its place, add a dedicated SelectAll command to the PDF Pepper API.
Plumb it through to the PDF plugin, and have the PDF plugin call
FORM_SelectAllText() in PDFium, which became available in 2020.

Bug: 836074, 1199128
Change-Id: I0f60cad0fc37aea4feddc49ed6d656a86ec8e952
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2830298
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#873412}
2021-04-16 19:11:46 +00:00
Lei Zhang
4fa036211a Delete unnecessary base/callback_forward.h includes from headers.
If a header does not contain "Callback" or "Closure", then it does not
need this include.

Change-Id: I36e65201dacae983a6b5b289319e0a7891cad667
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2816441
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872450}
2021-04-14 15:49:30 +00:00
John Abd-El-Malek
ea7530876b Remove PpapiHostMsg_LogInterfaceUsage and just call UMA in the child process directly.
Bug: 904556
Change-Id: I2f518243bc174cff123a49b5a6391fefb44924fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2809142
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870247}
2021-04-07 22:38:13 +00:00
John Abd-El-Malek
38963ea404 Remove PepperMessageFilter since the remaining IPC can now be handled in child processes.
Certificate parsing now doesn't depend on the OS so can happen in child processes. To avoid introducing a dependency on net/ in NaCl, make this private API not be part of NaCl since it was added for Flash. It looks like this can be removed as a result, but I'll leave this as a separate task in bug 1064652 along other Flash-only APIs.

This allows removal of BrowserMessageFilter for non-renderer child processe, since as implemented now they don't work with ChildProcessHostImpl.

Bug: 904556
Change-Id: Ic4ea8871097eb69108e484ab6f8ec6c868aff38a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2808690
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870202}
2021-04-07 21:11:33 +00:00
Peter Boström
fb60ea0a4d Apply modernize-make-unique to remaining files
This intends to cover directories and individual files where changes
weren't large enough to warrant splitting out to a separate change.

This is a large-scale change: go/chromium-modernize-make-unique

Bug: 1194272
Change-Id: Ia50424ec4b7f998e65dee5071926332ffcce7a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803041
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/master@{#869273}
2021-04-05 21:06:12 +00:00
Fabrice de Gans-Riberi
db6b7d3c6c Remove remaining references to base::Callback in ppapi/proxy
Bug: 1007816
Change-Id: I27646d8540ed501bd4c40878342fc7bc691c69e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2779240
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Auto-Submit: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#865307}
2021-03-22 19:33:55 +00:00
Anand K Mistry
4830078585 Convert remaining uses of Callback -> {Once,Repeating}Callback in ppapi
Bug: 1007816
Change-Id: I5cef141889d0a30a2102df19c8b356f54b67d183
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2770324
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#864450}
2021-03-18 22:54:48 +00:00
Anand K Mistry
1778bf35e9 Use base::RepeatingClosure in ppapi::proxy::UDPSocketFilter
Bug: 1007816

Change-Id: I8fe50479ce165c1df22df215b44fdc2d58024255
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2766424
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863672}
2021-03-17 08:19:32 +00:00
Anand K Mistry
9182c2a7da Update ppapi::proxy::PluginResource to work with OnceCallback
Update users of PluginResource to use base::BindOnce() instead of
base::Bind()

Bug: 1007816

Change-Id: Iecb9a3a2771849bf74b26f61b08bfe176ece5fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2764085
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863634}
2021-03-17 04:40:08 +00:00
Jan Wilken Dörrie
09a4396a44 [LSC] Remove base/strings/string16.h #includes
This change removes #includes of base/strings/string16.h from the
codebase.

Bug: 1184339
Change-Id: I3b29dd94c6955d01029d24f88177b755863c865d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2756167
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862683}
2021-03-14 19:20:08 +00:00
Jan Wilken Dörrie
739ccc2128 [LSC] Replace base::string16 with std::u16string in //[f-z]*
This change replaces base::string16 with std::u16string in //[f-z]*

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

Bug: 1184339
Change-Id: I4e0ff2fd300c9fd9360dbf8f4b44e74f5f511797
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752148
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862044}
2021-03-11 18:13:05 +00:00
Daniel Cheng
40ab34b73c ppapi: Change TrackedCallback completion to base::OnceCallback
The motivation here is to eliminate the anti-pattern of combining
base::BindRepeating() + base::Passed(), as the resulting callback should
typically only be run once.

Bug: 1180750
Change-Id: I340029a8dddfa1c849886d4981b643e3cdc58077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2718631
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857710}
2021-02-25 19:32:56 +00:00
Daniel Cheng
28a5ac480d Use std::move() with base::Passed() for base::BindOnce(), part 1.
std::move() and base::Passed() mean the same thing for base::BindOnce,
so use the standard library idiom instead.

Bug: 1180750
Change-Id: I10737d95c52b69c2bf594058ff46047d16d80858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2711965
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#856429}
2021-02-22 21:03:08 +00:00
Sami Kyostila
0f5c1549eb base/trace_event: Remove spaces from tracing category names
As a part of switching to the Perfetto-based trace macro implementation,
we want to disallow spaces in tracing category names. This patch
replaces spaces with underscores in all current category names.

Bug: 1006541
Cq-Include-Trybots: luci.chromium.try:linux-perfetto-rel
Change-Id: Ia07b1aa54077387611a5f91167a4f2eba2a9da17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2678950
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/master@{#851853}
2021-02-08 20:17:52 +00:00
Ayu Ishii
54b61875a2 CodeHealth: Convert ppapi/proxy/* from base::Bind/base::Callback
This changes convert uses of base::Bind and base::Callback to
Once/Repeating. Refer to (https://crbug.com/714018) for details.

Bug: 1007816
Change-Id: I1398e4fabc3abecc36bd7de385397d46579ec554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2669454
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851774}
2021-02-08 17:54:26 +00:00
danakj
e125e8d666 Report which RunLoop is timing out in a test.
Tests insert a timeout on RunLoop in order to find slow or flaky tests
but the current error message only reports where the timeout is enabled
and not which RunLoop was currently running. Example:

../../content/public/test/browser_test_base.cc:701: Failure
Failed
RunLoop::Run() timed out.
Stack trace:

We will now include the Location where the RunLoop::Run() call happens
in order to report where the test is actually timing out. The new error
looks like:

../../content/test/content_browser_test_test.cc:341: Failure
Failed
RunLoop::Run() timed out. Timeout set at ../../content/public/test/browser_test_base.cc:701.
Stack trace:

Notably the file and line number where the "Failure" is reported
(in the first line) are where the RunLoop is Run().

R=gab@chromium.org

Bug: 1145280
Change-Id: Ia5e39dbbfb47fd4c9f831cb77889061c4cd3060f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518125
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845815}
2021-01-21 22:06:31 +00:00
Jan Wilken Dörrie
d9ef4db129 [base] Prepare for icu UCHAR_TYPE switch
This change prepares the codebase to handle different types for
base::char16 and UChar. This is done by introducing a new
base/i18n/uchar.h header, providing casts between those two character
types and using it where required.

Bug: 911896
Change-Id: I2774dd0642bb94c2e00f07ed4cdc85680b229562
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2599088
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841079}
2021-01-07 16:50:20 +00:00
Daniel Hosseinian
2b747ef5ce Send unknown text render modes to the PDF accessibility tree
When the plugin sends a message to the renderer, bounds checking is
performed on all IPC enum traits. Messages containing bad data are
dropped.

Consequently, text runs containing no text need to have their style
initialized to an unknown mode instead of leaving the field
uninitialized. The uninitialized field was trying to pass garbage values
through IPC, causing the entire message to be dropped.

This issue was discovered after crrev.com/830918 was reverted, because
the change depended on accessibility info to be sent sequentially for
every page. A single dropped message would prevent the accessibility
tree from ever finishing.

Bug: 1150665
Change-Id: I0857b79da817e01a9c570d5a9172086ad9f39d67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567353
Reviewed-by: Ankit Kumar 🌪️ <ankk@microsoft.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833065}
2020-12-03 00:47:09 +00:00
danakj
db9ae7941a Rename includes from bind_helpers.h to callback_helpers.h
R=dcheng@chromium.org
NOPRESUBMIT=true
TBR=
NOTRY=true

Change-Id: I93bc6a9360997fae7adeab8c01f56e08fc025dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523543
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826289}
2020-11-11 16:01:35 +00:00
Dave Tapuska
d9d25c3a1b Remove Power Saving from PPAPI testing API.
This feature is no longer used because it was removed in
crrev.com/a361ec8 part of the flash removal. These testing APIs
can be now removed.

BUG=1143755

Change-Id: I2b4189afb56a8bb16636be198ca258b6d7fc2024
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517379
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824100}
2020-11-04 19:25:57 +00:00
Dominik Röttsches
10bdd19f59 Remove PreCacheFontForFlash
As part of Flash API removal, remove instances of
PreCacheFontForFlash. Generally, cache priming for GDI fonts
on Windows still seems to be needed for printing and PDF processes
but the flash reference can be deleted.

Bug: 1139287
Change-Id: Iebaac7c48b5fddbb81219b0fcc08b091597dee2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2478990
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818851}
2020-10-20 10:48:28 +00:00
Bill Budge
841dc750d6 [Flash] Remove more Flash-related stuff
- Removes some 'pepper_flash_*' files that were removed from the build.
- Removes PPB_Flash_File and PPB_Proxy_Private that are now unused.
- Removes assorted things in content/ and ppapi/ that are no longer
  relevant without Flash.
- Removes PepperPluginInstanceImpl::is_flash_plugin method.

Bug: chromium:1064652
Change-Id: I6905b64de90a58668e007a1282a6b6b248506358
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2481283
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818732}
2020-10-20 00:52:26 +00:00
Bill Budge
1d71c85d74 [Flash] Delete PPB_Broker_Trusted, PPP_Broker APIs
- Removes PPB_Broker_Trusted and PPP_Broker APIs.
- Removes Broker related messages and browser implementation.
- Removes kPpapiBrokerProcess and kPpapiFlashArgs content flags.
- Removes kPpapiBrokerProcess Sandbox flag. No plugin processes
  can generate executable code.
- Removes PluginGlobals::GetCmdLine method.

Bug: chromium:1064652,chromium:1133894,chromium:1133887
Change-Id: I697aeae388f1d14edcb737579830a35fcac390f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473438
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817905}
2020-10-16 14:00:26 +00:00
Bill Budge
a05aa28f51 [Flash] Remove PPB_Flash_Fullscreen API
- Removes the Flash API, but leaves the resource and proxy which is
  used by PPB_Fullscreen.

Bug: chromium:1064652
Change-Id: I6e1e9ce5f30f3f3ee90fb758e8c1b7e4d4158846
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2464208
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816717}
2020-10-13 19:43:22 +00:00
Bill Budge
781e9e3c55 Reland "[Flash] Remove PPP_Flash_BrowserOperations API"
This is a reland of acfed35ea9

Original change's description:
> [Flash] Remove PPP_Flash_BrowserOperations API
>
> This also removes plugin data and settings persistence, which isn't
> needed if the Flash plugin doesn't exist (it used to persist its own
> data on command from the browser.)
>
> Adds a TODO to figure out how we will remove plugin data now that
> Flash is deprecated.
>
> Bug: chromium:1064652,chromium:1135773,chromium:1135779
> Change-Id: I2eb1e30856071190cba29cea98cdd86a37722f95
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450057
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Anthony LaForge <laforge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#816370}

TBR=sky@chromium.org,tsepez@chromium.org,laforge@chromium.org

Bug: chromium:1064652
Bug: chromium:1135773
Bug: chromium:1135779
Change-Id: I3e602eb6915d84becc9e104eb273c924f3cec87f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468179
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816681}
2020-10-13 18:51:14 +00:00
Maggie Cai
c7ddc2963a Revert "[Flash] Remove PPP_Flash_BrowserOperations API"
This reverts commit acfed35ea9.

Reason for revert: This CL is likely breaks the Deterministic Linux build and cause a tree closure (https://ci.chromium.org/p/chromium/builders/ci/Deterministic%20Linux/29271)
It fails compare_build_artifacts and the difference is in:
nacl_test_data/nonsfi/irt_exception_test_pnacl_newlib_x32_nonsfi.nexe
  nacl_test_data/nonsfi/irt_manifest_file_pnacl_newlib_x32_nonsfi.nexe
  ppapi_nacl_tests_pnacl_newlib_x64.nexe
  test_data/ppapi/tests/extensions/packaged_app/nonsfi/ppapi_tests_extensions_packaged_app_pnacl_newlib_x32_nonsfi.nexe

Original change's description:
> [Flash] Remove PPP_Flash_BrowserOperations API
>
> This also removes plugin data and settings persistence, which isn't
> needed if the Flash plugin doesn't exist (it used to persist its own
> data on command from the browser.)
>
> Adds a TODO to figure out how we will remove plugin data now that
> Flash is deprecated.
>
> Bug: chromium:1064652,chromium:1135773,chromium:1135779
> Change-Id: I2eb1e30856071190cba29cea98cdd86a37722f95
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450057
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Anthony LaForge <laforge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#816370}

TBR=sky@chromium.org,bbudge@chromium.org,laforge@chromium.org,tsepez@chromium.org

Change-Id: I494da0a1897c7a75dd3f79d52f210e21a66ed5fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1064652
Bug: chromium:1135773
Bug: chromium:1135779
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2467168
Reviewed-by: Maggie Cai <mxcai@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816449}
2020-10-13 06:05:11 +00:00