0
Commit Graph

25 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
Joe Mason
94bebf1504 Always create ThreadPool before calling PostEarlyInitialization
This patch creates ThreadPool earlier, so that it's guaranteed to exist
before creating field trials. Now both field trials and the ThreadPool
always exist in PostFieldTrialInitialization.

A followup patch will use this entry point to start the heap profiler
in child processes.

Bug: 1327069
Change-Id: I2258fb77f06557460e342144e1c76de13985a4c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3654912
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1010574}
2022-06-03 15:03:53 +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
Peter Boström
828b902994 Replace DISALLOW_COPY_AND_ASSIGN in content/
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}
2021-09-21 02:28:43 +00:00
Nasko Oskov
d0dfddf697 Remove AddBindings/GetEnabledBindings from RenderProcess.
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}
2020-04-20 16:53:02 +00:00
Gabriel Charette
eadf58863b [ThreadPool] Move thread_pool.h to thread_pool_instance.h
The only class defined in this header is ThreadPoolInstance and this
is thus more correct.

TBR=fdoray@chromium.org

Change-Id: I023626583f2ed976e6d277b379def168e3ce87b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773663
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691491}
2019-08-29 05:20:27 +00:00
Gabriel Charette
43fd37033b [ThreadPool] Rename base::ThreadPool to base::ThreadPoolInstance
In order to leave the base::ThreadPool symbol available for
an upcoming "destination" task trait.

Also moved ThreadPoolImpl to be the implementation of TaskExecutor,
not ThreadPoolInstance. It was a mistake that base::ThreadPool was
implementing TaskExecutor, its users shouldn't have access to
PostTask*() and Create*TaskRunner*().

TBR=fdoray@chromium.org
(bypass owners for side-effects beyond //base)

Bug: 968047
Change-Id: I0607fba6d7f30d202bf7f61a9f461b1256e87467
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634851
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664300}
2019-05-29 16:36:51 +00:00
Gabriel Charette
52fa3aed17 [base] Rename TaskScheduler to ThreadPool
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}
2019-04-15 21:44:37 +00:00
Gabriel Charette
44db142be5 [TaskScheduler] Remove temporary forwarding headers and mass migrate users
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}
2018-08-06 11:19:33 +00:00
Gabriel Charette
ffaaf85f21 [TaskScheduler] Forward all public TaskScheduler headers to forwarding headers in preparation for source move
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}
2018-08-03 19:20:47 +00:00
fdoray
a70d7175ad Use TaskScheduler::InitParams to initialize TaskScheduler in child processes.
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}
2017-04-04 20:52:20 +00:00
fdoray
31cc6f8573 Add TaskScheduler initialization arguments to ChildProcess.
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}
2017-02-10 23:31:10 +00:00
avi
1023d01cf1 Switch to standard integer types in content/renderer/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1547073003

Cr-Commit-Position: refs/heads/master@{#366847}
2015-12-25 02:40:22 +00:00
dcheng
6d18e40fc2 Standardize usage of virtual/override/final in content/renderer/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.

BUG=417463
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/670683003

Cr-Commit-Position: refs/heads/master@{#300473}
2014-10-21 12:33:10 +00:00
simonhong@chromium.org
dd72d81c04 Remove unused code in the RenderProcess[Impl]
R=jamesr@chromium.org
BUG=NONE
TEST=NONE(No functional change)

Review URL: https://codereview.chromium.org/310733003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274814 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-04 14:01:24 +00:00
jbauman@chromium.org
1cf03f7f0c Remove TransportDIB methods from RenderProcess(Host)
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
2014-04-24 03:09:49 +00:00
jam@chromium.org
7c85e7a40a Start removing support for in-process NPAPI plugins. This was a debugging mode and was only supported by non-Aura Windows code.
BUG=330735
R=avi@chromium.org

Review URL: https://codereview.chromium.org/111613005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242552 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-26 20:52:58 +00:00
scottmg@chromium.org
10208eaf1c Move a bunch of child-only code from content/common to content/child
Was just trying to move content/common/resource_dispatcher.{cc,h}, but that ends up needing a lot of other things to move.

TBR=jam@chromium.org

BUG=246357

Review URL: https://codereview.chromium.org/16328003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204569 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-06 20:08:03 +00:00
reed@google.com
9d611ca037 Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend
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
2012-11-14 13:46:56 +00:00
jam@chromium.org
eb39819364 Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace.
Review URL: https://codereview.chromium.org/11227033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163359 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-22 20:16:19 +00:00
fsamuel@chromium.org
1b88d9f90a Make RenderProcessImpl::CreateTransportDIB and RenderProcessImpl::FreeTransportDIB public
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
2012-08-02 00:09:09 +00:00
ajwong@chromium.org
f78671752a Remove #pragma once from content
Review URL: https://chromiumcodereview.appspot.com/10696166

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146071 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-11 07:04:07 +00:00
creis@chromium.org
744c2a2d90 Allow browser to handle all WebUI navigations.
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
2012-03-15 18:42:04 +00:00
jam@chromium.org
f1933791ea Get rid of the following dependencies from content:
chrome/common/chrome_constants.h
  chrome/common/chrome_paths.h
  chrome/common/logging_chrome.h

BUG=76697
Review URL: http://codereview.chromium.org/7104144

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88935 0039d316-1c4b-4281-b951-d872f2087c98
2011-06-14 00:49:34 +00:00
jam@chromium.org
8704f89ba4 Move RenderProcess to content.
TBR=avi
Review URL: http://codereview.chromium.org/6864001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81681 0039d316-1c4b-4281-b951-d872f2087c98
2011-04-15 00:30:05 +00:00