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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}