0
Commit Graph

92 Commits

Author SHA1 Message Date
Ali Hijazi
a56154dd81 Extend MiraclePtr coverage to more containers
This rewrites the following containers:
std::list, std::unordered_set, base::flat_set, std::stack, std::queue.

This patch was generated by running
./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh

Binary size increase:
The increase is only (~9.5kB) above the per-patch limit (+16kB). This
is not a lot given the size of the rewrite. Increase of around 500kb was
approved for MiraclePtr.

AX-Relnotes: n/a.
Binary-Size: See commit description.
Bug: 325302189
Change-Id: I969ae345ef6d6117d5c1773773be913197ca2e73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306923
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1265100}
2024-02-26 10:21:17 +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
Ali Hijazi
e63cbaf6fd Rewrite vector<T*> into vector<raw_ptr<T, VectorExperimental>>
See chromium-dev announcement:
https://groups.google.com/a/chromium.org/g/chromium-dev/c/sKckMpzHQgY/m/M3SWxEg3AQAJ?utm_medium=email&utm_source=footer

Code review:
- First patch: Automatic rewrite
- Later patches: Manual fixes

The automatic rewrite used the script:
./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh

Binary size increase:
The increase is only 33% (+5kB) above the per-patch limit (+16kB). This
is not a lot given the size of the rewrite. Increase of around 500kb was
approved for MiraclePtr.

AX-Relnotes: n/a.
Binary-Size: See commit description.
Bug: 1432993
Change-Id: I8dfc4c2b274b724b99cf408f010da5c821edae9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5140028
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1239777}
2023-12-20 19:29:35 +00:00
Lei Zhang
cc67230216 Remove unnecessary base/memory/ref_counted.h includes from headers.
Header files that do not contain "RefCounted" and do not contain
scoped_refptr do not need to include base/memory/ref_counted.h. Remove
it and do IWYU to fix the build.

Bug: 242216
Change-Id: Ie70e43b0c926b8ef610419c99f43eea991ac8d81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4005763
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067592}
2022-11-04 18:28:16 +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
Dave Tapuska
2cf1f53949 Update documentation regarding RenderView.
With RenderViewImpl removed on the renderer side update the documentation so it corresponds to blink::WebView.

BUG=1155202

Change-Id: I1127952d3607160e8e7912bf6aa5b269d3064a4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3813813
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1033524}
2022-08-10 15:30:49 +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
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
38963ea404 Remove PepperMessageFilter since the remaining IPC can now be handled in child processes.
Certificate parsing now doesn't depend on the OS so can happen in child processes. To avoid introducing a dependency on net/ in NaCl, make this private API not be part of NaCl since it was added for Flash. It looks like this can be removed as a result, but I'll leave this as a separate task in bug 1064652 along other Flash-only APIs.

This allows removal of BrowserMessageFilter for non-renderer child processe, since as implemented now they don't work with ChildProcessHostImpl.

Bug: 904556
Change-Id: Ic4ea8871097eb69108e484ab6f8ec6c868aff38a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2808690
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870202}
2021-04-07 21:11:33 +00:00
Jan Wilken Dörrie
09a4396a44 [LSC] Remove base/strings/string16.h #includes
This change removes #includes of base/strings/string16.h from the
codebase.

Bug: 1184339
Change-Id: I3b29dd94c6955d01029d24f88177b755863c865d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2756167
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862683}
2021-03-14 19:20:08 +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
Dave Tapuska
32dcd8a65c Remove Pepper Plugin Throttling.
This is the browser side change of removing pepper throttling.
Since flash is no longer loaded and the throttling code was specific
for flash it can be removed.

Renderer side was done in
https://chromium-review.googlesource.com/c/chromium/src/+/2508289

BUG=1143755,993189

Change-Id: I8eed030decf312ba7e60874428d817ebf7983220
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508430
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823272}
2020-11-02 20:22:08 +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
Ken Rockot
4f8c3c3d0a Move Font Service off Service Manager
This removes all Service Manager dependencies from the Font Service in
favor of direct Mojo interface connection. The browser maintains an
internal API for connecting new pipes to the in-process service
instance.

This requires ChildProcessHostImpl to support the BindHostReceiver()
mojom API for non-renderer child processes, as well as
plumbing it up to UtilityProcessHost and PluginProcessHost. Rather than
generic support through Service Manager with manifest-based filtering,
each process host type explicitly implements its support for binding the
FontService interface when requested by the child process.

This CL also fixes some thread-safety bugs in the existing Font Service
client library code which could cause the client endpoint and/or the
WeakPtrFactory to be destroyed on the wrong sequence. FontServiceThread
has been refactored to make the WeakPtrFactory unnecessary, and the
client endpoint is now always destroyed on the correct sequence.

Finally, this changes font_service_unittests to use an in-process
background service instance rather than using the Service Manager to
spin up a dedicated service executable.

Bug: 977637
Change-Id: I3efdafb06ae2d79e9cb149675e49c29e30d0cad6
Test: for good measure, manually tested PDF rendering
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756435
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687694}
2019-08-16 16:32:33 +00:00
Lucas Furukawa Gadani
0d5e714121 Remove more const interfaces from content/public.
Bug: 908139
Change-Id: Ib362d71f610a90fe094f3c4ed892ef578ebf85aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566417
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652379}
2019-04-18 23:00:50 +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
Brett Wilson
cc8623dc8e Replace std::deque and std::queue in //content.
These are replaced with the base versions base::circular_deque and base::queue.

Typedefs were replaced with using statements in changed code, and adjacent
typedefs were also converted.

RTCTimestamps struct in rtc_video_encoder.cc was made copyable and moveable
(it's just an int64 and an int32) to support being put in a circular_deque.
BrowsingDataRemoverImpl::RemovalTask was made move-only (from previously
not movable or copyable).

BUG=757232

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ib83f929ae4c014ae0d3766a57e9cb56cba446e2b
Reviewed-on: https://chromium-review.googlesource.com/656066
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501169}
2017-09-12 03:28:10 +00:00
Ryan Sleevi
bb1cff42e6 Remove the (deprecated) ResourceContext from PluginClient
The PPAPI plugin client carried around an unused copy of the
ResourceContext associated with the initiator. Remove the dead code.

BUG=None

Change-Id: I6c8a8e2b3d23ee57975cc92cae2dfbbd0c9efdc0
Reviewed-on: https://chromium-review.googlesource.com/587587
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490093}
2017-07-27 23:25:17 +00:00
Lukasz Anforowicz
5a02412fd4 Move |field_trial_syncer_| into ChildThreadImpl.
There are 4 subclasses of ChildThreadImpl:
- RenderThreadImpl
- PpapiThread
- GpuChildThread
- UtilityThreadImpl

Before this CL, RenderThreadImpl and PpapiThread would have a
|field_trial_syncer_| field.  GpuChildThread would construct a
ChildProcessFieldTrialSyncer via ChromeContentGpuClient::Initialize, but
only if the GPU didn't share the browser process.  UtilityThreadImpl did
not have a |field_trial_syncer_| field.

Before this CL, RenderThreadImpl and GpuChildThread would notify the
browser process about trial activations by calling FieldTrialActivated
method of mojom::FieldTrialRecorder.  PpapiThread would notify via
PpapiHostMsg_FieldTrialActivated legacy IPC.  UtilityThreadImpl wouldn't
do anything.

After this CL, ChildProcessFieldTrialSyncer and
base::FieldTrialList::Observer are encapsulated and hidden by
ChildThreadImpl.

Also - after this CL, the //content -> //components/variations
dependency is sighly more restricted.

Bug: 740726
Change-Id: I2fdf4e16f52a7339476e337f695b44e621d0b295
Reviewed-on: https://chromium-review.googlesource.com/567034
Commit-Queue: Lukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Nick Carter <nick@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alexei Svitkine (slow) <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487993}
2017-07-19 21:31:57 +00:00
jamescook
37acc25307 Remove unused copies of EarlyZygoteLaunch()
It looks like this function got cargo-culted around during refactors.

* Remove unused copies for NaCl, utility process and PPAPI
* Inline the one used copy from RenderProcessHostImpl into BrowserMainLoop

No behavior changes.

BUG=none
TEST=bots

Review-Url: https://codereview.chromium.org/2848603003
Cr-Commit-Position: refs/heads/master@{#468015}
2017-04-28 15:54:51 +00:00
asvitkine
92c1a93972 Field trial synchronization to PPAPI process.
This enables the same field trial synchronization mechanism we use for
renderers and GPU process for the PPAPI process. With this CL, crash reports
from PPAPI process will include active field trials and field trials activated
in the PPAPI process will be reported to UMA and crash.

Moves child_process_field_trial_syncer.cc from chrome
to components along the way.

BUG=582602
TEST=In an official Chrome build with crash reporting enabled, verify you have
Variations hashes listed in chrome://version (restart if you don't) and then go
to http://www.adobe.com/software/flash/about/ and load some flash content
before going to chrome://ppapiflashcrash to cause a PPAPI crash. Then, find the
the crash entry that should now appear on chrome://crashes and view it on
http://crash/ via the Server ID and check that the crash report has entries
under Experiments (under Fields).

Review-Url: https://codereview.chromium.org/2514593002
Cr-Commit-Position: refs/heads/master@{#434384}
2016-11-24 19:55:25 +00:00
chili
59caaddfd7 Rename off the record to incognito in ppapi plugin process
BUG=3333
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2317243002
Cr-Commit-Position: refs/heads/master@{#417653}
2016-09-09 18:54:07 +00:00
rockot
da98879041 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
Review-Url: https://codereview.chromium.org/2221153003
Cr-Original-Commit-Position: refs/heads/master@{#410937}
Cr-Commit-Position: refs/heads/master@{#413232}
2016-08-19 20:48:34 +00:00
foolip
83cff6863f Revert of Establish MojoChildConnection from BrowserChildProcessHostImpl (patchset id:190001 of https://codereview.chromium.org/2221153003/ )
Reason for revert:
ContentBrowserTest.BrowserCrashCallStack/RendererCrashCallStack are failing on
"Linux Tests (dbg)(1)" and "Linux Tests (dbg)(1)(32)" since this CL. Reproduced
locally and bisected to "Establish MojoChildConnection from
BrowserChildProcessHostImpl", also verified that reverting it on master locally
fixes the problem.

When it fails, the tests stall for a long time before failing. Sample from bot:

ContentBrowserTest.RendererCrashCallStack (run ):
[ RUN      ] ContentBrowserTest.RendererCrashCallStack
[11795:11795:0810/064214:8507100974:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[11795:11795:0810/064214:8507101034:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected
Xlib:  extension "RANDR" missing on display ":9".
BrowserTestBase signal handler received SIGTERM. Backtrace:
 0x7fdba1ca413e base::debug::StackTrace::StackTrace()
 0x00000145ffaa content::(anonymous namespace)::DumpStackTraceSignalHandler()
 0x7fdb929cf0b0 <unknown>
 0x7fdb92d65d2b __libc_read
 0x7fdba1db7e42 base::GetAppOutputInternal()
 0x7fdba1db7ff6 base::GetAppOutputAndError()
 0x000000993436 content::ContentBrowserTest_RendererCrashCallStack_Test::RunTestOnMainThread()
 0x00000144f6ae content::ContentBrowserTest::RunTestOnMainThreadLoop()
 0x00000145fd24 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
 0x0000005b969d _ZN4base8internal13FunctorTraitsIMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEvE6InvokeIPS6_JEEEvS8_OT_DpOT0_
 0x0000005b95f1 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEJPS8_EEEvOT_DpOT0_
 0x000001461247 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x0000014611ac _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
 0x0000005b971e base::Callback<>::Run()
 0x0000015920a8 content::ShellBrowserMainParts::PreMainMessageLoopRun()
 0x7fdba3457031 content::BrowserMainLoop::PreMainMessageLoopRun()
 0x7fdba29ee2bd _ZN4base8internal13FunctorTraitsIMN4mojo10BindingSetIN7content5mojom14ProcessControlEE7ElementEFvvEvE6InvokeIPS8_JEEEvSA_OT_DpOT0_
 0x7fdba345f091 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMN7content15BrowserMainLoopEFivEJPS5_EEEiOT_DpOT0_
 0x7fdba345f037 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x7fdba345ef9c _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
 0x7fdba29ee36e base::Callback<>::Run()
 0x7fdba3ef057b content::StartupTaskRunner::RunAllTasksNow()
 0x7fdba3455033 content::BrowserMainLoop::CreateStartupTasks()
 0x7fdba346164d content::BrowserMainRunnerImpl::Initialize()
 0x000001541fc4 ShellBrowserMain()
 0x000001521e46 content::ShellMainDelegate::RunProcess()
 0x7fdba5057e3b content::RunNamedProcessTypeMain()
 0x7fdba505a172 content::ContentMainRunnerImpl::Run()
 0x7fdba5056f42 content::ContentMain()
 0x00000145fa46 content::BrowserTestBase::SetUp()
 0x00000144f52d content::ContentBrowserTest::SetUp()
 0x0000016a05da testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x000001691b0e testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x0000016868a3 testing::Test::Run()
 0x000001687098 testing::TestInfo::Run()
 0x00000168763a testing::TestCase::Run()
 0x00000168c98c testing::internal::UnitTestImpl::RunAllTests()
 0x0000016a4d6a testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x0000016931ee testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x00000168c62f testing::UnitTest::Run()
 0x0000014d1d11 RUN_ALL_TESTS()
 0x0000014d0bc2 base::TestSuite::Run()
 0x00000145edcc content::ContentTestLauncherDelegate::RunTestSuite()
 0x00000149b712 content::LaunchTests()
 0x00000145ec28 main
 0x7fdb929ba7ed __libc_start_main
 0x0000005612c5 <unknown>

Original issue's description:
> Establish MojoChildConnection from BrowserChildProcessHostImpl
>
> Rather than have individual BrowserChildProcessHostImpl users
> create their own connection, this moves all that junk into BCPHI
> and allows its users to configure it with a service name and
> instance ID.
>
> Also changes ChildProcessHost to support ChannelMojo connection
> via remote interfaces provided by its delegate, and uses this
> in conjunction with the BCPHI changes. Eliminates one more use
> of kMojoChannelToken.
>
> BUG=623396
> R=ben@chromium.org
>
> Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
> Cr-Commit-Position: refs/heads/master@{#410937}

TBR=ben@chromium.org,rockot@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=623396

Review-Url: https://codereview.chromium.org/2230283003
Cr-Commit-Position: refs/heads/master@{#411039}
2016-08-10 14:53:18 +00:00
rockot
8efa71b852 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Review-Url: https://codereview.chromium.org/2221153003
Cr-Commit-Position: refs/heads/master@{#410937}
2016-08-10 03:11:50 +00:00
yzshen
92cad45212 Ignore certain messages in plugin broker process if they are not sent by the
browser.

BUG=610600
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2069853002
Cr-Commit-Position: refs/heads/master@{#400495}
2016-06-17 20:43:08 +00:00
amistry
80ce6dc508 Use ChannelMojo for pepper plugin processes.
BUG=604282

Review-Url: https://codereview.chromium.org/2021103004
Cr-Commit-Position: refs/heads/master@{#398420}
2016-06-07 23:54:38 +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
kerrnel
afd49a83be Have each SandboxedProcessLauncherDelegate maintain a zygote.
To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
This will allow the PPAPI zygote to be recreated when a plugin is updated.
This CL allows Chrome to maintain a zygote for each process type by having
each SandboxedProcessLauncherDelegate maintain a class which can communicate
with its respective zygote. This CL will be followed up with work to allow
customization of zygotes, which will give Chrome the improve component update
experience.

BUG=569191

Committed: https://crrev.com/3c1e16b490255119b6f70f94d1716645e897b185
Cr-Commit-Position: refs/heads/master@{#370488}

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

Cr-Commit-Position: refs/heads/master@{#371042}
2016-01-22 21:17:03 +00:00
kerrnel
72832708f8 Revert of Have each SandboxedProcessLauncherDelegate maintain a zygote. (patchset id:440001 of https://codereview.chromium.org/1532423003/ )
Reason for revert:
Revert "Have each SandboxedProcessLauncherDelegate maintain a zygote."

This reverts commit 3c1e16b490.
This broke the Site Isolation FYI bot failure:
https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Linux/builds/7700

To re-land the CL, that failure needs to be diagnosed and corrected.

Original issue's description:
> Have each SandboxedProcessLauncherDelegate maintain a zygote.
>
> To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
> This will allow the PPAPI zygote to be recreated when a plugin is updated.
> This CL allows Chrome to maintain a zygote for each process type by having
> each SandboxedProcessLauncherDelegate maintain a class which can communicate
> with its respective zygote. This CL will be followed up with work to allow
> customization of zygotes, which will give Chrome the improve component update
> experience.
>
> BUG=569191
>
> Committed: https://crrev.com/3c1e16b490255119b6f70f94d1716645e897b185
> Cr-Commit-Position: refs/heads/master@{#370488}

TBR=mdempsky@chromium.org,thestig@chromium.org,avi@chromium.org,mseaborn@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=569191

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

Cr-Commit-Position: refs/heads/master@{#370771}
2016-01-21 20:30:12 +00:00
kerrnel
3c1e16b490 Have each SandboxedProcessLauncherDelegate maintain a zygote.
To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
This will allow the PPAPI zygote to be recreated when a plugin is updated.
This CL allows Chrome to maintain a zygote for each process type by having
each SandboxedProcessLauncherDelegate maintain a class which can communicate
with its respective zygote. This CL will be followed up with work to allow
customization of zygotes, which will give Chrome the improve component update
experience.

BUG=569191

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

Cr-Commit-Position: refs/heads/master@{#370488}
2016-01-20 21:12:37 +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
tommycli
c7634dec83 Plugin Power Saver: Throttled Plugins should block TCPSocket reads.
BUG=458687, 403800

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

Cr-Commit-Position: refs/heads/master@{#316963}
2015-02-19 01:47:04 +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
brettw@chromium.org
fcf75d4016 Convert string16 to base::string16 in content.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238447 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-03 20:11:26 +00:00
ygorshenin@chromium.org
8522332eef TCPSockets are switched to the new Pepper proxy.
BUG=230784
TEST=browser_tests:*TCPSocket*, *TCPServerSocket*

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220073 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-28 19:42:59 +00:00
rsesek@chromium.org
fa20e0076d Update include paths in content/browser for base/process changes.
BUG=242290
TBR=sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213225 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-23 21:20:54 +00:00
avi@chromium.org
348fbaac32 Use a direct include of strings headers in content/browser/, part 2.
BUG=247723
TEST=none
TBR=ben@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205435 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-11 06:31:51 +00:00
raymes@chromium.org
c542557af5 Allow renderer to create pepper ResourceHosts in the browser
This CL allows pending ResourceHosts to be created in the browser from the renderer. The functionality is currently exposed through the RendererPpapiHost. The creation call is asynchronous - a callback will be called in the renderer with a pending host ID when the host has been created.

BUG=246396

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204954 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-07 22:15:25 +00:00
brettw@chromium.org
57999817d3 Move file_path.h to base/files.
TBR=sky

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-24 05:40:52 +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
yzshen@chromium.org
029bd94e73 Add two new debug URLs for Pepper Flash:
- chrome://ppapiflashcrash
- chrome://ppapiflashhang

TEST=none
BUG=169915


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177983 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-22 08:30:33 +00:00
brettw@chromium.org
108fd342d9 Use an explicit PID for duplicating Pepper handles rather than the Channel's.
When the browser process launches the plugin, it explicitly tells each side the PID of the other side, and we now use this PID for sharing handles. Previously we'd use the PID from the IPC channel.

Using the PID from the IPC channel creates a race condition because the PID isn't set until the "hello" message from the opposite side is processed, which isn't guaranteed at any particular time.

BUG=168222

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175190 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-04 20:46:54 +00:00
raymes@chromium.org
83d12c8ddc Implement an IsAllowed function in the pepper PPB_Broker_Trusted API
Flash sometimes needs to synchronously know if it can launch the broker, otherwise it will try to launch the broker when it shouldn't, and end up popping an infobar. This adds an IsAllowed function to synchronously test whether the broker is allowed to launch without popping the infobar.

Note that the document URL of the plugin instance is needed in order to check the broker permissions in the browser process. This is only available in the renderer process. In order to avoid an extra hop to the renderer process just to get this URL, it is sent to the browser (with the render view ID) upon initialization of the instance when the instance is registered with the browser process.

BUG=163248


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172104 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-10 19:28:46 +00:00
raymes@chromium.org
0c92b0d107 Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model
The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171902 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 00:46:23 +00:00
raymes@chromium.org
8b73c2e491 Revert 171408
> The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
>
> Review URL: https://codereview.chromium.org/11359097

TBR=raymes@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171562 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 19:32:42 +00:00
raymes@chromium.org
cd57d088c6 Revert 171389
The revert is causing browser tests to fail. Reverting the revert.

> Revert 171080
>
> > The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
> >
> > Review URL: https://codereview.chromium.org/11359097
>
> TBR=raymes@chromium.org
>
> Review URL: https://codereview.chromium.org/11437038

TBR=raymes@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171408 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 06:10:57 +00:00