0
Commit Graph

106 Commits

Author SHA1 Message Date
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
Ali Hijazi
4d4e24099b DanglingPtr: Mark all of them as untriaged [1/N]
This patch must be a no-op with all the common build flags.

Add the "DanglingUntriaged" raw_ptr annotation. It indicates a
raw_ptr becomes dangling, and it should be triaged/fixed. This will also disable dangling protection for those pointers, once enabled.

These were identified by running the CQ bots with DPD activated (both build + runtime here: https://crrev.com/c/3941825)

Bug: 1291138
Change-Id: I07e3d85b1c629f7d49c928f1fca42a538c64ef3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3959615
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Pâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061867}
2022-10-20 22:59:31 +00:00
Lei Zhang
8403fa6515 Change content::PluginList to only run on the UI thread.
All the callers are now on the UI thread, so remove all the locking and
complicated threading requirements. Do the same for PluginService.

Bug: 990013
Change-Id: Ie4dac75b4829825978d5873fd28f4ce75c14510b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866812
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1058235}
2022-10-12 20:15:26 +00:00
Rohit Bhatia
6b92d02c53 [DownloadBubble] Remove nested runloop and synchronously call GetPlugins
Remove nested runloops from production code.

Instead, this CL creates a synchronous version of GetPlugin, and calls
it when DownloadItemModel::ShouldPreferOpeningInBrowser() is queried.
This is required because this should be resolved synchronously for its
callers, which include context menus, or downloads being opened.

The GetPlugins method does not perform any disk IO, and it is safe to
create a synchronous version of it.

This synchronous method is queried only under DownloadBubbleV2 flag,
and should not affect anything if the flag is off.

Screencast (Context Menu): http://go/scrcast/NTY4MTM0Mjk4MjM4OTc2MHwyOWY4YzZhMy1hNA
Screencast (Download Bubble): http://go/scrcast/NTA2NTk0NjY0NjQ0NjA4MHw5ZDdlYTUzMS01NQ
Screencast (Download Page): http://go/scrcast/NjAyODQyMjEwODE1MTgwOHwwN2ZjN2VmMC1jOQ
New Downloads:
http://go/scrcast/NjE3OTgwNTkzMTI0MTQ3MnxhOGY5NmQxNy05Zg

Bug: 1369673
Change-Id: Ieb1054c0c122fd7f341dae9c32dd6b611a15ee17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928952
Reviewed-by: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Rohit Bhatia <bhatiarohit@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1055303}
2022-10-05 15:40:54 +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
67441a1b5b Rename PepperPluginInfo to ContentPluginInfo
Renames PepperPluginInfo to ContentPluginInfo, in order to reflect that
this struct no longer is used only with PPAPI.

The name ContentPluginInfo was chosen because the name PluginInfo is
overloaded already for 3 different types in Chromium. The name also
emphasizes that this type supports the //content layer specifically.

Most of this change is mechanical, with the following exceptions:

1. Some other names have been changed to drop references to Pepper, such
   as renaming ContentClient::AddPepperPlugins() to
   ContentClient::AddPlugins(). Note that Pepper-specific functions like
   MakePepperPluginInfo() intentionally still mention Pepper.
2. Refactored PluginManager::UpdatePluginListWithNaClModules() to use
   range-based "for" loops, instead of iterators.

Bug: 1344644
Change-Id: I9b8596f6a53593ed7c4b7e06a266b57c82b0d9bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3835746
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1040827}
2022-08-30 07:26:43 +00:00
Rohit Bhatia
23df04c021 Find Plugins by BrowserContext
This CL adds newer functions that check safety of plugins by
BrowserContext, and not renderer_process_id.

This is needed as we want to set pdfs loaded from history service to
open in the browser by default, which requires this check. The pdfs do
not have an associated renderer process, and the check only requires a
BrowserContext anyway.

Bug: 1352120
Change-Id: I232071529b62b0213e4e760796596f6b07fd5b83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3849622
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Rohit Bhatia <bhatiarohit@google.com>
Reviewed-by: Xinghui Lu <xinghuilu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1038995}
2022-08-24 22:42:14 +00:00
K. Moon
b91ba27698 Register PDF plugin even when enable_ppapi=false
Registers the PDF plugin even when PPAPI is disabled. This requires two
main changes:

1. Allowing use of PepperPluginInfo, regardless of the ENABLE_PPAPI
   buildflag. This required making the "internal_entry_points" member
   conditional.
2. Registering the PDF plugin in ChromeContentClint::AddPepperPlugins(),
   regardless of the ENABLE_PPAPI buildflag.

This change also makes several other improvements to PepperPluginInfo:

1. Uses default member initializers, greatly reducing the need for
   conditional compilation in pepper_plugin_info.cc.
2. Adds a move constructor, since there's already a copy constructor.
3. Drops the "is_external" field, which became dead code in
   crrev.com/1037953.

Finally, this change inlines ComputeBuiltInPlugins(), since the
remaining code is relatively straightforward.

Fixed: 1306610
Change-Id: Ia8927b632f31f53c23a965766c2d8946b5062b16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3837314
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1038300}
2022-08-23 16:56:02 +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
de11886024 Remove CountPpapiPluginProcessesForProfile() API
Removes the CountPpapiPluginProcessesForProfile() API from
PluginService. This API is only used externally by
plugin_response_interceptor_url_loader_throttle_browsertest.cc for
counting PDF plugin processes, but is unfit for this purpose ever since
the PDF viewer migrated from Pepper (crbug.com/702993).

This API is still used internally by PluginServiceImpl, but an anonymous
free function in plugin_service_impl.cc suffices.

Bug: 1306610
Change-Id: I055c5ed2d2c192c859c594a100faeb6dc8bdfc3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3789927
Reviewed-by: Nigi <nigi@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1029489}
2022-07-28 22:21:51 +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
Dave Tapuska
a1d4d4358d Remove unused variables from GetPluginInfo
These variables went unused so remove them so we don't need
to look them up.

BUG=850278

Change-Id: Ib92a305f858919c10ba614d06641b632ff813182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3308826
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946716}
2021-11-30 22:48:23 +00:00
Lei Zhang
0306cbaff6 Remove unneeded base/compiler_specific.h includes in //content and //ui.
Bug: 242216
Change-Id: Id89d638f8859731d00ab17b760f93dd77a2df7a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3292226
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946514}
2021-11-30 17:32:28 +00:00
Keishi Hattori
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
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@{#945735}
2021-11-27 09:25:52 +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
9b036533b6 Remove DISALLOW_* macros from content/
This inlines all remaining DISALLOW_* macros in content/. This is done
manually (vim regex + manually finding insertion position).

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

Bug: 1010217
Change-Id: I8b5ea6dd9f8a3f584cf3eef82634017a38b15be8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3193883
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: 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@{#936160}
2021-10-28 23:37:28 +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
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
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
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
Jan Wilken Dörrie
aace0cfef2 [LSC] Replace base::string16 with std::u16string in //{chrome*,content}
This change replaces base::string16 with std::u16string in //chrome,
//chromecast, //chromeos and //content.

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

Bug: 1184339
Change-Id: I8fae0ab25b5d9bf1cb416ae5f47d7f680fb8f3ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752229
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862152}
2021-03-11 22:01:58 +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
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
Clark DuVall
1df2052bf8 Remove ResourceContext from PluginService
This switches to using BrowserContext instead of ResourceContext for
PluginService and plugin_utils.cc. This required moving
PluginRegistryImpl, PluginInfoHostImpl, and
RenderFrameMessageFilter::OnGetPluginInfo to run on the UI thread.

This eliminates one of the major dependencies of extensions::InfoMap.

Bug: 980774
Change-Id: I7b26c5b40dc8b98c518339b771249ef16e6ec856
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730093
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684082}
2019-08-05 19:58:46 +00:00
Kinuko Yasuda
cd87bdf0aa Run some methods on PluginService on UI thread during navigation.
Some of the methods can be run on any threads while not all of them
are explicitly marked so. Update documentation to make it clear and
call it on UI thread during navigation when needed.

Bug: 824840
Change-Id: I138d70338b2a35e164538918e23e034ba5d7045d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1687015
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#674735}
2019-07-04 06:10:18 +00:00
Lei Zhang
fa5e24d9cf Clean up PluginServiceImpl.
- Make GetRegisteredPpapiPluginInfo() return a const pointer.
- Remove dead method declarations.
- Modernize code.

Change-Id: I03d15a156127d51d3371638e4e0839935f2bda59
Reviewed-on: https://chromium-review.googlesource.com/1175551
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586984}
2018-08-29 01:34:09 +00:00
Scott Violet
02e38b93c3 Rename buildflag_headers for consistency
This updates ppapi.

Targets go from foo_features to foo_buildflags
And similarly the header now has buildflags in the name.

BUG=814485
TEST=covered by build
TBR=xhwang@chromium.org

Change-Id: I25f990ebd1e7f8530ddd0cee24dba31c88a45fae
Reviewed-on: https://chromium-review.googlesource.com/980921
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546312}
2018-03-27 23:42:14 +00:00
Tom Sepez
f84d722890 Add mechanism to count PDF PPAPI processes in browser tests
Call it as appropriate in pdf_extension_test.cc

Split off from https://chromium-review.googlesource.com/c/chromium/src/+/922727
so as to get a baseline before making further changes.

Bug: 809614
Change-Id: I85e947230fd4f87547dac169e2271c2510c41b29
Reviewed-on: https://chromium-review.googlesource.com/953712
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541866}
2018-03-08 19:34:50 +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
Steven Holte
ba045f186a Whitelist UpdateSourceURL callers.
New UKM recorders should avoid using this API, since it requires
additional privacy auditting.

Bug: 780930
Change-Id: If4aef754cc56997a82dce27ffd4df308e894dd7d
Reviewed-on: https://chromium-review.googlesource.com/820683
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525836}
2017-12-21 22:39:43 +00:00
Raymes Khoury
978652cd62 Add UKM to record actions associated with the Pepper Broker
Records when the Pepper broker process channel is opened by a plugin.

Bug: 756138
Change-Id: Ibc480af41cb0f0b004d167dcefae325e7920b7ad
Reviewed-on: https://chromium-review.googlesource.com/778743
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519228}
2017-11-27 06:28:37 +00:00
Nico Weber
43ddd7a3af Remove uses NON_EXPORTED_BASE now that it's a no-op.
CL generated by

   git grep -l NON_EXPORTED_BASE | xargs sed -i 's/NON_EXPORTED_BASE(\([^)]*\))/\1/g'
   git cl format

I'm not changing compiler_specific.h itself in this cl, to keep the revert
small if the subsequent removal of the actual macro should break something.

Bug: 752837
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I53d6460e592b91a173f7aa55dfdb05631e51e5f7
Reviewed-on: https://chromium-review.googlesource.com/614703
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494486}
2017-08-15 19:19:27 +00:00
fdoray
9292e072c4 Use PostTaskAndReplyWithResult in plugin_service_impl.cc.
BUG=

Review-Url: https://codereview.chromium.org/2873963005
Cr-Commit-Position: refs/heads/master@{#471549}
2017-05-13 03:47:51 +00:00
leon.han
9ed4df7531 Remove ScopedVector from content/browser/.
base::ScopedVector is deprecated, see bug.

BUG=554289
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2752533003
Cr-Commit-Position: refs/heads/master@{#456954}
2017-03-15 02:17:03 +00:00
brettw
4b46108b37 Convert enable_plugins to a buildflag header.
Moves the build flag from build/config/features.gni to ppapi/features/features.gni so it's not global any more.

Moves the define from build/config (global) to a generated buildflag header //ppapi/features:features. Updates callers to use BUILDFLAG, include the new header, and depend on this target.

R=bbudge
TBR=rsesek@chromium.org (*_messages.h files).
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2512563003
Cr-Commit-Position: refs/heads/master@{#433426}
2016-11-19 18:58:06 +00:00
jbriance
ed975026c4 content: Cleanup class/struct forward declarations
Remove useless class and struct forward declarations, and add
missing ones in content header files.

BUG=662195
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2473003002
Cr-Commit-Position: refs/heads/master@{#429839}
2016-11-04 09:16:42 +00:00
tommycli
f2a1e9f94f [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash.
This patch does two things:

1) Blocks all non-HTTP and non-FILE plugin loads within plugin_utils.cc (unless the user has chosen ALLOW)

2) Fixes FILE plugin loads. Previously, FILE origins were getting lost in the GetPlugins, since WebSecurityOrigin serializes FILE origins to "null".

This meant that content settings exceptions did not work correctly for the plugin list retrieval. This didn't matter before HBD because the plugin list wasn't affected by content settings until HBD.

This patch fixes it by passing url::Origin throughout the Plugins code rather than GURL for the page origin.

BUG=649223
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2378573005
Cr-Commit-Position: refs/heads/master@{#423598}
2016-10-06 18:37:14 +00:00
fdoray
5e1706c385 Remove calls to IsRunningSequenceOnCurrentThread() from plugin_service_impl.cc
SequencedWorkerPool is being migrated to base/task_scheduler and there
is no equivalent to IsRunningSequenceOnCurrentThread() in
base/task_scheduler.

Developers should use SequenceChecker to verify that tasks run
sequentially. Unlike
SequencedWorkerPool::IsRunningSequenceOnCurrentThread(),
SequenceChecker works everywhere in Chrome (MessageLoop,
SequencedWorkerPool, base/task_scheduler...).

BUG=622400

Review-Url: https://codereview.chromium.org/2319623002
Cr-Commit-Position: refs/heads/master@{#417266}
2016-09-08 12:58:36 +00:00
dcheng
5971627d34 Convert //content/browser from scoped_ptr to std::unique_ptr
BUG=554298
R=avi@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#386285}
2016-04-09 05:20:41 +00:00
piman
e8c57eac84 Remove NPAPI from browser and utility
This pulls a lot of hairballs but that's pretty much everything left.

BUG=493212,123851,234591,238460
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

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

Cr-Commit-Position: refs/heads/master@{#385358}
2016-04-06 01:21:31 +00:00
piman
bfb2cebc0c Remove windowed NPAPI code
BUG=493212
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

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

Cr-Commit-Position: refs/heads/master@{#382094}
2016-03-18 21:35:03 +00:00
avi
b7348940d3 Switch to standard integer types in content/browser/.
BUG=138542
TBR=jam@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#366868}
2015-12-25 20:58:00 +00:00
olli.raula
36aa8be4eb Move Singleton and related structs to namespace base
Public APIs from base should live inside base:: so moved Singleton class
and structs to base{} and fixed consumers.

also fixed:

** Presubmit ERRORS **
Found Singleton<T> in the following header files.
Please move them to an appropriate source file so that the template
gets instantiated in a single compilation unit.
  chrome/browser/plugins/plugin_finder.h \
  chromecast/media/base/media_message_loop.h \
  content/browser/media/android/media_drm_credential_manager.h

Presubmit warnings:
src/chrome/browser/extensions/warning_badge_service_factory.h:5:
  #ifndef header guard has wrong style, please use:
  CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_
  [build/header_guard] [5]
src/chrome/browser/extensions/warning_badge_service_factory.h:39:
  #endif line should be "#endif  //
  CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_"
  [build/header_guard] [5]

TBR=jam@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#348136}
2015-09-10 11:15:10 +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