0
Commit Graph

63 Commits

Author SHA1 Message Date
Takuto Ikuta
a47d7859c4 autofill: remove unnecessary include from browser_test_base.h
This is extracted from https://crrev.com/c/5280997 to reduce compile
time of some test files.

content/public/test/browser_test_base.h is the file removing
unnecessary header.

Bug: b/324519459
Change-Id: Ic6b8e4328f6be3161dd3f09711451c8578032ef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5300036
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262233}
2024-02-19 03:46:58 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Peter Kasting
4524c839c9 Convert various const strings to constexprs: content/
This makes it possible to supply them to absl::StrFormat() as format
strings, and may enable better codegen.

Bug: 1371963
Change-Id: Ic174e2e1a03032fc93286b8c576b04bca03faf6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4945111
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1210892}
2023-10-17 15:55:08 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Keishi Hattori
c1b0023f5a [BRP] Apply raw_ptr rewriter
Rewrites generated by running the raw_ptr rewriter (win/android)
on ecf579231e

PS1: generated rewrite
PS2-PS5: manual build fixes and additional exclusions
PS6: rebase

Binary-Size: This is a batch rewrite so size increase is unavoidable
Change-Id: I23b244e715d6dcf559ce2df9cc8dc97ec9227fca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4044201
Owners-Override: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074510}
2022-11-22 09:04:26 +00:00
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
K. Moon
c5aece5014 Use PpapiPluginProcessHost only with ENABLE_PPAPI
Puts all remaining uses of PpapiPluginProcessHost behind the
ENABLE_PPAPI buildflag.

As all the existing tests for PluginServiceImpl depend on
PpapiPluginProcessHost, also adds a new test that does not.

Also reorganizes plugin_service_impl.h's include order to follow the
style guide more closely.

Bug: 1306610
Change-Id: Ia9ee1e660def3ed0b790539fe3995938770170bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3840473
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1036854}
2022-08-18 23:24:43 +00:00
K. Moon
9ae6ef2c23 Switch //content to use ENABLE_PPAPI
Switches //content to use the ENABLE_PPAPI buildflag for PPAPI-specific
code, rather than the more general ENABLE_PLUGINS buildflag.

Also removes RenderFrame's PluginDidStartLoading() and
PluginDidStopLoading() methods, which are dead code.

Bug: 1306610
Change-Id: Iff4508e2673a92e77dae8a3badea885e31cde7e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3832643
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1036394}
2022-08-18 01:30:06 +00:00
K. Moon
5f45789f0e Delete ContentBrowserClient::ShouldAllowPluginCreation()
Deletes the ContentBrowserClient::ShouldAllowPluginCreation() API, which
always returns true now.

Bug: 702990
Change-Id: I765aa133f254acb0ce09ed3c3a3095c717b687e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3731258
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1026893}
2022-07-21 18:53:52 +00:00
John Abd-El-Malek
b09daeecd3 More simplifications in content now that ProcessHostOnUI is the only path.
Bug: 904556
Change-Id: I811629156a2cc24d55e7f859d8881639dc8e4431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3176490
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924315}
2021-09-23 15:29:34 +00:00
Anton Bikineev
f62d1bf48e content: Replace base::Optional and friends with absl counterparts
This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
  ->
  include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional

Bug: 1202909
Change-Id: Ie9f37bcbf6115632a19f4d063387d07b3723926f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897246
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883270}
2021-05-15 17:56:07 +00:00
John Abd-El-Malek
1b4dbdacb9 Move ProcessHosts for non renderer processes to the main thread.
They were on the IO thread to avoid deadlocks with NPAPI plugins, but we don't have that anymore.

Currently this is off by default behind a feature flag. I have tried to minimize the churn in the code to enable this. Some places where it would involve too much duplication or refactoring I've kept with PostTasks from UI to UI thread. Once this is enabled by default then I'll simplify all the callsites.

Bug: 904556
Change-Id: Ib664d644e0af016d5736348218bcc38cb79341f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2806425
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870614}
2021-04-08 18:15:42 +00:00
Jan Wilken Dörrie
8aeb574da9 [LSC] Remove base::ASCIIToUTF16("...") in //content and //ui
This change removes calls to base::ASCIIToUTF16 in //content and //ui
with a single-line string literal and replaces them with a u"..."
literal instead. Files where this change would cause compilation errors
were not changed.

This is a mechanical change:

$ git grep -lw ASCIIToUTF16 content ui | xargs \
    sed -i 's/\(base::\)\?ASCIIToUTF16(\("\(\\.\|[^\\"]\)*"\))/u\2/g'
$ git cl format

Bug: 1189439
Change-Id: I0d5601dc15324c43012b8d26260405f1efdca07e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2780265
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#865766}
2021-03-23 19:27:02 +00:00
Gabriel Charette
e7cdc5cd07 [BrowserThread] Migration callers without full content:: namespace
Note to QA: This CL is purely mechanical and shouldn't be blamed
for future regressions on touched files.

This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/2211138
which already removed all usage using content::BrowserThread.

Hence this script now matches unqualified BrowserThread:: without
risking having "content::" be selected as "traits_before" by the regex
(ran on same revision as step ).

content:: is now always added if outside namespace content {}
(deleting unused using content::BrowserThread; decls)

Script @ https://crbug.com/1026641#c92

(will TBR fdoray@ post-review for mechanical change)
TBR=fdoray@hchromium.org

AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I51ae2f83eb17d19b54563fd9b4fc040d2aa0c948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212469
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772458}
2020-05-27 23:35:05 +00:00
Peter Kasting
919ce657e4 Add missing #includes of browser_test.h.
This is a step towards doing full IWYU of browser_test.h, which will
have other benefits.

Completely mechanical and already R+ed as part of r765923.

Tbr: sky
Bug: none
Change-Id: Icb7ab728098a6cf29c0920da4b524e96a7c024c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186411
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766361}
2020-05-07 10:22:36 +00:00
Balazs Engedy
683d2c7a8f Revert "IWYU for browser_test.h."
This reverts commit 66a53c909a.

Reason for revert: Breaks compile on official branded builders.

Original change's description:
> IWYU for browser_test.h.
> 
> Include this directly in relevant test files.  This lets us convert the
> HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
> view_event_test_base.h into #errors, and force people to not even
> include this file in files that can't use it.
> 
> Bug: none
> Tbr: sky
> Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#765923}

TBR=sky@chromium.org,pkasting@chromium.org,thestig@chromium.org

Change-Id: I4583916602404c310a93f571dd2c78645c6bd567
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184132
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765931}
2020-05-06 10:36:40 +00:00
Peter Kasting
66a53c909a IWYU for browser_test.h.
Include this directly in relevant test files.  This lets us convert the
HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
view_event_test_base.h into #errors, and force people to not even
include this file in files that can't use it.

Bug: none
Tbr: sky
Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765923}
2020-05-06 09:38:56 +00:00
Lukasz Anforowicz
4600ea3f8c Enforcing in the browser process which origins may embed the PDF plugin.
Before this CL, the PDF plugin process would enforce that it may only be
embedded inside the PDF extension's origin
(mhjfbmdgcfjbbpaeojofohoefgiehjai) and inside chrome://print.  After
this CL, this enforcement is done in the browser process instead.  The
earlier enforcement helps add security assertions that follow-up CLs may
depend on - for example see:
https://crrev.com/c/1986923/15/content/browser/plugin_service_impl.cc#211

The already existing PDFExtensionTest.EnsureInternalPluginDisabled test
makes sure that the PDF plugin may not be embedded in a data: URL.

Bug: 1027173
Change-Id: I0d1d47d9dee7de92d1f3cbb44a72d38b14236f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003262
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733121}
2020-01-18 02:37:48 +00:00
Sami Kyostila
8e4d5a915e content/browser: Always specify thread affinity when posting tasks
*** Note: There is no behavior change from this patch. ***

The PostTask APIs will shortly be changed to require all tasks to explicitly
specify their thread affinity, i.e., whether the task should run on the thread
pool or a specific named thread such as a BrowserThread. This patch updates all
call sites with thread affinity annotation. We also remove the "WithTraits"
suffix to make the call sites more readable.

Before:

    // Thread pool task.
    base::PostTaskWithTraits(FROM_HERE, {...}, ...);

    // UI thread task.
    base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI, ...}, ...);

After:

    // Thread pool task.
    base::PostTask(FROM_HERE, {base::ThreadPool(), ...}, ...);

    // UI thread task.
    base::PostTask(FROM_HERE, {BrowserThread::UI, ...}, ...);

This patch was semi-automatically prepared with these steps:

    1. Patch in https://chromium-review.googlesource.com/c/chromium/src/+/1635827
       to make thread affinity a build-time requirement.
    2. Run an initial pass with a clang rewriter:
       https://chromium-review.googlesource.com/c/chromium/src/+/1635623
    3. ninja -C out/Debug | grep 'requested here' | cut -d: -f1-3 | sort | \
           uniq > errors.txt
    4. while read line; do
         f=$(echo $line | cut -d: -f 1)
         r=$(echo $line | cut -d: -f 2)
         c=$(echo $line | cut -d: -f 3)
         sed -i "${r}s/./&base::ThreadPool(),/$c" $f
       done < errors.txt
    5. GOTO 3 until build succeeds.
    6. Remove the "WithTraits" suffix from task API call sites:

       $ tools/git/mffr.py -i <(cat <<EOF
       [
         ["PostTaskWithTraits",                            "PostTask"],
         ["PostDelayedTaskWithTraits",                     "PostDelayedTask"],
         ["PostTaskWithTraitsAndReply",                    "PostTaskAndReply"],
         ["CreateTaskRunnerWithTraits",                    "CreateTaskRunner"],
         ["CreateSequencedTaskRunnerWithTraits",           "CreateSequencedTaskRunner"],
         ["CreateUpdateableSequencedTaskRunnerWithTraits", "CreateUpdateableSequencedTaskRunner"],
         ["CreateSingleThreadTaskRunnerWithTraits",        "CreateSingleThreadTaskRunner"],
         ["CreateCOMSTATaskRunnerWithTraits",              "CreateCOMSTATaskRunner"]
       ]
       EOF
       )

This CL was uploaded by git cl split.

R=boliu@chromium.org, tsepez@chromium.org

Bug: 968047
Change-Id: I346372d16a3856186ea74d14e0dd8a12f7cacae5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729589
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683554}
2019-08-02 12:45:05 +00:00
Sebastien Marchand
f8cbfab434 Include base/bind.h in the files that use it (in //content).
Gab, I've used your refactoring script for this, the rule is:
  matches = re.compile(r'(\n *[^/\n][^/\n]*base::Bind(Once|Repeating)?\b[^*])', re.DOTALL).findall(content)

  if not matches:
    return False

  updated_content = refactor_lib.AddInclude(file_path, content, "base/bind.h")

  if updated_content == content:
    return False

  # Write updated file
  refactor_lib.WriteFile(file_path, updated_content)

TBR=gab@chromium.org

Change-Id: I6cca9dff7fa4937fd7accdc57fe774674f6c147b
Reviewed-on: https://chromium-review.googlesource.com/c/1437100
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626088}
2019-01-25 16:02:30 +00:00
Eric Seckler
8652dcd5d8 content: Replace uses of BrowserThread task posting with post_task.h API
This patch updates callsites of BrowserThread task posting methods to
use the post_task.h API instead.

Background: We're changing the way tasks are posted to a BrowserThread,
see PSA [1] and design doc [2]. This unifies the way tasks are posted
and paves the way for annotating tasks with task types and other
attributes that can be used to prioritize tasks in the future browser
UI thread scheduler (design doc [3]).

This CL changes callsites of the following forms:
(a) BrowserThread::Post*Task(BrowserThread::UI/IO, ..) to
    base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI/IO}, ..),
(b) BrowserThread::GetTaskRunnerForThread(BrowserThread::UI/IO) to
    base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI/IO}).

It also adds necessary includes. These mechanical changes were applied
by a script.

Tasks posted with the same BrowserThread::ID trait (via
PostTaskWithTraits or TaskRunners obtained from
Create*TaskRunnerWithTraits) will still execute in the order they
were posted, see [4].

[1] https://groups.google.com/a/chromium.org/d/topic/chromium-dev/A3_snMVXv8A/discussion
[2] https://docs.google.com/document/d/1SGy9VTXUwyXEX_yBZ0ukFAnS8B0hDeMUJD-1iALaE-Q/edit?usp=sharing
[3] https://docs.google.com/document/d/1z1BDq9vzcEpkhN9LSPF5XMnZ0kLJ8mWWkNAi4OI7cos/edit?usp=sharing
[4] https://cs.chromium.org/chromium/src/base/task/post_task.h?l=66

TBR=achuith@chromium.org, afakhry@chromium.org, agl@chromium.org, avi@chromium.org, bbudge@chromium.org, bengr@chromium.org, benwells@chromium.org, bnc@chromium.org, calamity@chromium.org, ccameron@chromium.org, chiniforooshan@chromium.org, cjgrant@chromium.org, cmumford@chromium.org, csharrison@chromium.org, dalecurtis@chromium.org, delphick@chromium.org, dgozman@chromium.org, dmazzoni@chromium.org, droger@chromium.org, dschuff@chromium.org, dullweber@chromium.org, erikchen@chromium.org, felt@chromium.org, fgorski@chromium.org, gogerald@chromium.org, groby@chromium.org, horo@chromium.org, imcheng@chromium.org, jcivelli@chromium.org, jianli@chromium.org, jinho.bang@samsung.com, jkarlin@chromium.org, jochen@chromium.org, kinuko@chromium.org, lazyboy@chromium.org, lpy@chromium.org, markusheintz@chromium.org, mattcary@chromium.org, maxmorin@chromium.org, miu@chromium.org, mkwst@chromium.org, mmenke@chromium.org, mpearson@chromium.org, msramek@chromium.org, nick@chromium.org, nparker@chromium.org, nyquist@chromium.org, peter@chromium.org, pwnall@chromium.org, qinmin@chromium.org, rbpotter@chromium.org, rdevlin.cronin@chromium.org, rouslan@chromium.org, scottmg@chromium.org, servolk@chromium.org, skuhne@chromium.org, sky@chromium.org, tapted@chromium.org, tbansal@chromium.org, thestig@chromium.org, tommi@chromium.org, tommycli@chromium.org, torne@chromium.org, tschumann@chromium.org, vabr@chromium.org, vakh@chromium.org, waffles@chromium.org, yfriedman@chromium.org, zmo@chromium.org, bartfab@chromium.org

Bug: 878356
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I37526c8e75630ee7bec29421276094a30e903894
Reviewed-on: https://chromium-review.googlesource.com/1186623
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592750}
2018-09-20 10:42:28 +00:00
Tom Sepez
19fecb3def Bound ppapi process totals when isolating by origin.
Otherwise, we risk having an unbounded number of processes.
Results in a "failed to load plugin" page once N == 15 created.
Add test to fork off a handful.

No plugins are yet isolated by origin, so no observable change
to chrome. That will happen in a subsequent CL.

Follow-up to:
  https://chromium-review.googlesource.com/c/chromium/src/+/915182

Bug: 809614
Change-Id: Ie71d41d03d380e31f006173b659023e3de0e3ac8
Reviewed-on: https://chromium-review.googlesource.com/942235
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540565}
2018-03-02 18:40:21 +00:00
Tom Sepez
8db30ad046 Manage ppapi plugins on a per-origin basis.
Expands the management of plugins to consider origin when assigning
a process. Only passes empty origins at present, so no observable
change expected.

Bug: 809614
Change-Id: I129495ddc94c86dc1c4aa1b3a7942354eabe59d4
Reviewed-on: https://chromium-review.googlesource.com/915182
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540294}
2018-03-01 21:38:54 +00:00
jam
a44c8609b6 Delete the NPAPI plugin browsertests.
They're not needed anymore now that NPAPI plugin support is disabled.

BUG=493212

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

Cr-Commit-Position: refs/heads/master@{#334711}
2015-06-16 22:05:42 +00:00
skyostil
95082a6a47 content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002/.

BUG=465354
TBR=nick@chromium.org

Committed: https://crrev.com/422456f9d53f0bf936a64f21a1463fd0abd3df84
Cr-Commit-Position: refs/heads/master@{#333081}

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

Cr-Commit-Position: refs/heads/master@{#333112}
2015-06-05 19:53:37 +00:00
skyostil
d4104aab63 Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs"
This reverts commit 422456f9d5.

TBR=zea@chromium.org
BUG=465354
NOTRY=true
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#333086}
2015-06-05 17:49:39 +00:00
skyostil
422456f9d5 content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002/.

BUG=465354
TBR=nick@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#333081}
2015-06-05 17:24:40 +00:00
skyostil
74f13dc2b6 Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs"
This reverts commit 5d18b2493a.

Reason: Broke iOS build: http://build.chromium.org/p/chromium.mac/builders/iOS_Simulator_%28dbg%29/builds/27843

NOTRY=true
NOTREECHECKS=true
BUG=465354
TBR=sievers@chromium.org,nick@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#333047}
2015-06-05 15:26:51 +00:00
skyostil
5d18b2493a content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002/.

BUG=465354
TBR=nick@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#333043}
2015-06-05 14:21:03 +00:00
nick
5120892497 Update {virtual,override} to follow C++11 style in content.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.

This patch was manually generated using a regex and a text editor.

BUG=417463

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

Cr-Commit-Position: refs/heads/master@{#326880}
2015-04-24 21:38:54 +00:00
mostynb
4c27d0473b favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]*
BUG=466848

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

Cr-Commit-Position: refs/heads/master@{#321215}
2015-03-18 21:48:38 +00:00
avi
83883c8588 Make callers of CommandLine use it via the base:: namespace.
Covers content/.

BUG=422426
TEST=none
TBR=ben@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#309496}
2014-12-23 00:09:30 +00:00
dcheng
c2282aa891 Standardize usage of virtual/override/final in content/browser/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.

BUG=417463
TBR=sky@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#300469}
2014-10-21 12:08:25 +00:00
mohan.reddy
7fc3ac7d5a Replace FINAL and OVERRIDE with their C++11 counterparts in content
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/637183002

Cr-Commit-Position: refs/heads/master@{#298804}
2014-10-09 05:24:24 +00:00
morrita@chromium.org
e482111a87 Introduce IPC::Channel::Create*() to ensure it being heap-allocated.
This change introduces IPC::Channel::Create*() API to turn
IPC::Channel into a heap allocated object. This will allow us to
make Channel a polymorphic class.

This change also tries to hide Channel::Mode from public API
so that we can simplify channel creation code paths cleaner in
following changes. ChannelProxy has to follow same pattern to
finish this cleanup. Such changes will follow.

TEST=none
BUG=377980
R=darin@chromium.org,cpu@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273575

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273713 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-30 03:58:59 +00:00
mattm@chromium.org
cfa4e4bc94 Revert 273575 "Introduce IPC::Channel::Create*() to ensure it be..."
Broke win compile.


> Introduce IPC::Channel::Create*() to ensure it being heap-allocated.
> 
> This change introduces IPC::Channel::Create*() API to turn
> IPC::Channel into a heap allocated object. This will allow us to
> make Channel a polymorphic class.
> 
> This change also tries to hide Channel::Mode from public API
> so that we can simplify channel creation code paths cleaner in
> following changes. ChannelProxy has to follow same pattern to
> finish this cleanup. Such changes will follow.
> 
> TEST=none
> BUG=377980
> R=darin@chromium.org,cpu@chromium.org
> 
> Review URL: https://codereview.chromium.org/307653003

TBR=morrita@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273596 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-29 21:10:32 +00:00
morrita@chromium.org
3909aa922a Introduce IPC::Channel::Create*() to ensure it being heap-allocated.
This change introduces IPC::Channel::Create*() API to turn
IPC::Channel into a heap allocated object. This will allow us to
make Channel a polymorphic class.

This change also tries to hide Channel::Mode from public API
so that we can simplify channel creation code paths cleaner in
following changes. ChannelProxy has to follow same pattern to
finish this cleanup. Such changes will follow.

TEST=none
BUG=377980
R=darin@chromium.org,cpu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273575 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-29 20:30:17 +00:00
jam@chromium.org
6e9def1ccf Move ContentBrowserTest class to content/public, since it's used by components_browsertests for browser tests which use Content Shell.
R=avi@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259967 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-27 20:23:28 +00:00
jochen@chromium.org
de7d61ff0d [content shell] move browser process stuff into browser/ subdir
BUG=180021
R=marja@chromium.org
TBR=joi@chromium.org,ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23316003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218441 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-20 11:30:41 +00:00
jam@chromium.org
d7bd3e5a34 Move webplugininfo.h to content/public.
BUG=237249
TBR=scottmg

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212812 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-21 04:29:20 +00:00
jam@chromium.org
9a60ccb9a1 Remove webkit/plugins/npapi.
-NPAPIPluginsSupported moves to PluginService
  -no need to call it in PluginList methods anymore since PluginService is now the only place that calls these methods, and it can check first
  -no need for the renderer to call this first since now the browser won't enumerate NPAPI plugins if it's disabled
-CreateVersionFromString moves to WebPluginInfo. I couldn't find a better place to put it.
-move the constants back to plugin_constants_win.h
-move PLUGIN_QUIRK_DIE_AFTER_UNLOAD handling to WebPluginDelegateStub and PluginThread instead of being a global
-GetDefaultWindowParent moves to plugin_constants_win.h. I couldn't find a better place.
-IsPluginWindow moves to PluginService
-GetPluginNameFromWindow and GetPluginVersionFromWindow are both replaced by GetPluginInfoFromWindow which is on PluginService
-IsDummyActivationWindow was called by one place so I moved the code there

BUG=237249
R=scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212672 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-19 22:23:36 +00:00
jam@chromium.org
29e2fb456d Move NPAPI implementation out of webkit/plugins/npapi and into content.
Notes:
-gtk_plugin_container_manager* and gtk_plugin_container* move to content/browser/renderer_host/ since that's all where they're used
-plugin_list* and plugin_constants_win* move to content/common as they're used by child processes and the browser
-webplugin_impl* and webplugin_page_delegate.h move to content/renderer as that's where they're used. I will remove webplugin_page_delegate.h in a followup change as it's no longer needed.
-the rest moves to content/child/npapi
-a few constants moved from plugin_constants_win.h to plugin_util.h temporarily

BUG=237249
TBR=scottmg

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212485 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-19 01:13:47 +00:00
xhwang@chromium.org
dd32b127ce content: Use base::MessageLoop.
BUG=236029
R=avi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14335017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198316 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-04 14:17:11 +00:00
dbeam@chromium.org
3166220ef3 ifdef OS_NAME -> if defined(OS_NAME)
ifndef OS_NAME -> if !defined(OS_NAME)

BUG=none
TEST=no regressions


Review URL: https://chromiumcodereview.appspot.com/12545059

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190069 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-23 19:10:54 +00:00
rsleevi@chromium.org
c3e3589c3e Linux/ChromeOS Chromium style checker cleanup, content/ edition.
Automated clean up of style checker errors that were missed due to the plugin
not being executed on implementation files.

BUG=115047

Review URL: https://chromiumcodereview.appspot.com/12210030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181822 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-12 02:08:01 +00:00
brettw@chromium.org
2dec8ec385 Use base namespace for FilePath in content/browser
Review URL: https://codereview.chromium.org/12213066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181349 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-07 19:20:34 +00:00
jschuh@chromium.org
05f51128a7 Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
BUG=172573
Review URL: https://codereview.chromium.org/12177018
Recommit of: https://codereview.chromium.org/12177018

TBR=cevans@chromium.org
Review URL: https://codereview.chromium.org/12209008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180700 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-05 15:02:50 +00:00
jschuh@chromium.org
6a7c000f98 Revert 180600
> Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
> 
> BUG=172573
> Review URL: https://codereview.chromium.org/12177018

Windows and aura bots are failing, and this is the only CL
in range that had no passing try runs for those tests.
If the bots don't go green, I'll unrevert the revert.

TBR=cevans@chromium.org
Review URL: https://codereview.chromium.org/12210009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180620 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-05 06:18:37 +00:00
cevans@chromium.org
ac8bd041b8 Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
BUG=172573
Review URL: https://codereview.chromium.org/12177018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180600 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-05 01:35:58 +00:00
cevans@chromium.org
6be31d20e5 Only permit plug-in loads in the browser if the plug-in isn't blocked or the
user has authorized it with a browser-mediated interaction.

(Reland https://codereview.chromium.org/12086077 with Android test tweak)

BUG=172573
R=jam@chromium.org
Review URL: https://codereview.chromium.org/12092107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180159 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-01 18:20:54 +00:00