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: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
The bindings stored on the RenderProcess object are not longer needed
and can safely be removed. Once that is done, the MockRenderProcess
becomes a trivial object providing no extra functionality, so this CL
goes a step further and removes it as well.
Bug: 1069939
Change-Id: I79e047faa0a418b7362a303b5d45210de394b97e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145815
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760537}
With this CL:
//base:
- The maximum number of BEST_EFFORT tasks that can run concurrently
when there are no ScopedBlockingCalls is hard-coded to 2.
- The reclaim time has a default value of 30 seconds in
ThreadPool::InitParams. It should not be overridden outside of tests.
- The WorkerThreadBackwardCompatibility enum is merged with the
WorkerEnvironment enum. This makes sense because choosing a
non-default value in both enums wasn't supported.
- A HAS_NATIVE_THREAD_POOL() macro is added to avoid duplication of the
list of platforms that support native pools.
//content:
- The maximum number of threads in the foreground pool is hard-coded
in //content. It is no longer possible to change it via a field
trial. If we decide to experiment again with this, we should read
field trial values directly from //base instead of using
Content(Browser|Renderer)Client.
Change-Id: I667b5fb946b62756a0d78ca297bcfdc6b3d8fb0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600838
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660360}
Reason: with the advent of other scheduling primitives in //base
(i.e. SequenceManager), TaskScheduler was no longer the only component
responsible for scheduling tasks. We will from now on refer to the
whole of //base/task as the "task scheduling infrastructure".
There are other types named "TaskScheduler" outside of base:: so
s/TaskScheduler/ThreadPool/ across the codebase wasn't possible.
Instead, this CL did:
1) base/task/task_scheduler => base/task/thread_pool
(catches all files with includes)
1.1) Careful manual search to add files without includes
(e.g. missing IWYU, docs, etc.)
2) TaskScheduler => ThreadPool in all files affected by (1)
3) task_scheduler => thread_pool in all files affected by (1)
4) "task scheduler" => "thread pool" in all files affected by (1)
4) Move task_scheduler_util like headers in
//content //components and //ios
Also:
* Renamed UMA metrics from TaskScheduler.* to ThreadPool.*
and dropped "Pool" from worker pool name suffixes.
* Renamed TaskScheduler*Worker thread names to ThreadPool*Worker
* In base/android: NativeTaskScheduler => NativeScheduler as it
was referring to the whole of base/task.
TaskSchedulerTest.java => NativePostTaskTest.java (former DNE)
* Intentionally ignoring IWYU violations in this already too large
CL.
In follow-up:
* Rename other types as well:
SchedulerWorker => WorkerThread
SchedulerWorkerPool* => WorkerThreadGroup*
Bug: 951388
Change-Id: I5bc2688b593c7682ef7e56d6b228539970ba107e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1561552
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650997}
The browser process is the sole responsible for shutting down its
renderer processes. Surprisingly, there was some logic in the renderer
process to request self shutdown.
Previous CL disabled renderer process initiated shutdown. This CL
removes associated logic to increment/decrement the reference counter.
Bug: 873541, 609963, 535246
Change-Id: I06bc6670d84dcad597bf98eea6c3e07242f341b6
Reviewed-on: https://chromium-review.googlesource.com/1177748
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588799}
When this CL is approved I will rebase it on top of tree and mass
migrate all callers in a new patch set (TBR'ed change).
TBR=robliao@chromium.org (for mass migration of existing callers)
Bug: 867421
Change-Id: I41092bbc4824964ee047e0bf53e972c8f6e896a4
Reviewed-on: https://chromium-review.googlesource.com/1161116
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580845}
Core move CL : https://chromium-review.googlesource.com/c/chromium/src/+/1161088
Move strategy :
1) Rebase this CL on ToT and mass migrate all callers of public base/task_scheduler
headers to their matching *_forward.h header.
2) Land core move CL
3) Mass migrate away from *_forward.h headers in
https://chromium-review.googlesource.com/c/chromium/src/+/1161116
This move strategy was chosen to keep as much git history as possible
in (2). See code comments on forward headers for details.
Once this CL and its follow-ups are approved, I will sync it to
top-of-tree, mass migrate all existing users of these headers to
their *_forward.h version in this CL (TBR'ed) and follow-up with
the other two swiftly back-to-back.
TBR=robliao@chromium.org (for mass migration of existing callers)
Bug: 867421
Change-Id: Iea684e022181c0611abe7f92629599afc369822b
Reviewed-on: https://chromium-review.googlesource.com/1161179
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580622}
Initialization with an arbitrary vector of SchedulerWorkerPoolParams
is being deprecated.
BUG=690706
Review-Url: https://codereview.chromium.org/2798623002
Cr-Commit-Position: refs/heads/master@{#461828}
Previously, the constructor of ChildProcess called
ChildProcess::InitializeTaskScheduler() to initialize TaskScheduler.
RenderProcessImpl overrode this method to initialize TaskScheduler
with custom arguments. Unfortunately, the constructor of a base
class cannot call methods from a derived class.
This CL removes the virtual ChildProcess::InitializeTaskScheduler()
method. RnederProcessImpl passes its custom TaskScheduler
initialization arguments to the constructor of ChildProcess.
BUG=664996
Review-Url: https://codereview.chromium.org/2687903003
Cr-Commit-Position: refs/heads/master@{#449785}
base::WorkerPool is used in the GPU process
(x11_hotplug_event_handler.cc:499). To migrate this call site to
TaskScheduler, TaskScheduler must be initialized in the GPU
process.
base::WorkerPool is also used in PPAPI plugin process
(v8_platform.cc:70).
BUG=664996
Review-Url: https://codereview.chromium.org/2627953002
Cr-Commit-Position: refs/heads/master@{#444100}
This step is a giant search and replace for OVERRIDE and FINAL to
replace them with their lowercase versions.
BUG=417463
Review URL: https://codereview.chromium.org/633303002
Cr-Commit-Position: refs/heads/master@{#298655}
These aren't needed now that the legacy 2d path is gone.
BUG=362164
Review URL: https://codereview.chromium.org/247263005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265826 0039d316-1c4b-4281-b951-d872f2087c98
SkCanvas in any way, other than provide a host of constructors (and delayed constructors
in the form of 'initialize' methods).
These late initializers are a problem, as SkCanvas is deprecating its setDevice() call,
moving to model where the backingstore/device for the canvas must be created before the
canvas is created. This is necessary to allow skia to continue to extend SkCanvas for
its backends (e.g. GPU, PDF, Picture, Pipe, etc.).
The practical change in this CL is to make PlatformCanvas just a typedef for SkCanvas,
and change the call-sites that want to call initialize() to instead create the canvas
using one of the provided Factory functions (e.g. CreatePlatformCanvas). The modifier
Platform is maintained, to document that this canvas may be backed by platform-specific
pixels (e.g. allocated by GDI or cairo).
Review URL: https://codereview.chromium.org/11138024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167669 0039d316-1c4b-4281-b951-d872f2087c98
This code allows for platform-specific ways to allocate and free TransportDIBs. This is needed by the BrowserPlugin. Make them public so that they can be accessed by the BrowserPlugin
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10826100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149538 0039d316-1c4b-4281-b951-d872f2087c98
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
Make sure user-declared virtual destructors always have the virtual keyword.
The Clang style-check plugin will check for this soon.
No functionality change: virtual is only added
to destructors that are already implicitly virtual.
Also fix a couple of in-line destructor definitions.
BUG=83408
TEST=none
Review URL: http://codereview.chromium.org/7064033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98