0
Commit Graph

66 Commits

Author SHA1 Message Date
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
rvargas
5779b38e9f Don't pass ProcessHandle through ChildProcessHostDelegate.
ChildProcessHostDelegate doesn't make clear what ownership rules apply to
the process handle and as a result one of the implementations assume that
the caller has to delete the handle (ServiceUtilityProcessHost) while the
other one assumes that it does not (BrowserChildProcessHostImpl).

On the other hand, one caller closes the handle (ChildProcessHostImpl)
and the other does not (PpapiPluginProcessHost).

This CL enforces the API of not transfering ownership when getting the
process handle (as both implementations keep using the handle after they
receive the call).

BUG=417532

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

Cr-Commit-Position: refs/heads/master@{#304664}
2014-11-18 20:44:38 +00:00
thestig
27bf1c27bf Cleanup: Remove unneeded path_service.h includes.
Review URL: https://codereview.chromium.org/689563002

Cr-Commit-Position: refs/heads/master@{#303095}
2014-11-06 21:56:07 +00:00
kbr
e41aa9b6c8 Delete bogus assertion about child process handle.
BUG=428571
R=cpu@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#302026}
2014-10-30 03:14:59 +00:00
jbauman
319402eea0 Stop early exit watcher in BrowserChildProcessHostImpl::OnChildDisconnected
The early exit watcher holds on to a reference to the waitable event which ChildProcessLauncher::GetChildTerminationStatus deletes, so it should be stopped first.

BUG=424024

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

Cr-Commit-Position: refs/heads/master@{#300518}
2014-10-21 17:52:41 +00:00
rvargas
079d184e27 Enforce handle ownership in base::Process.
The main user (and the immediate reason for the change) is to improve handle
ownership in content::ChildProcessLauncher.

This CL is not enforcing clean ownership beyond ChildProcessLauncher; that is
to be covered by subsequent CLs.

BUG=417532
TEST=base_unittests
R=scottmg@chromium.org, thestig@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#300180}
2014-10-17 22:32:40 +00:00
brettw@chromium.org
47927870b2 Add base:: qualification to some COmmandLine references in content.
TBR=sky

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

Cr-Commit-Position: refs/heads/master@{#288787}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288787 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-11 20:33:10 +00:00
fmeawad@chromium.org
45b918c9aa Use HighResNow whenever possible on Windows.
Relanding simonjam@'s CL https://codereview.chromium.org/41953002/ to enable QPC.

This may result in perf changes, the perf changes may only be in the measurements and not actual regressions.

BUG=158234

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286928 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-01 01:01:42 +00:00
fmeawad@chromium.org
30c4c67a00 Initialize PowerMonitor on_power_battery initial value for newly created processes.
Adding an Init method to the Broadcaster, that gets invoked while initializing the host.
The Init method broadcasts the original on_power_battery value to the new processes.

BUG=153139

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284599 0039d316-1c4b-4281-b951-d872f2087c98
2014-07-22 02:33:55 +00:00
jam@chromium.org
65f0ff79ce Increase the child process connection timeout for browser tests.
Normally a child process kills itself if it can't connect to the browser in 15 seconds. This is to prevent a child process from staying around if the browser crashed right after launching it but before connecting to it.

When browser tests are sharded, sometimes tests run slower because of resource starvation which is why we have longer timeouts. So increase the child process connection timeout to match this.

BUG=TODO
R=phajdan.jr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278812 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-20 20:32:15 +00:00
bradnelson@google.com
0c94bdf174 Remove knowledge of nacl from content.
Content should not have knowledge of NaCl. Moving per process NaCl debug
stub port information to NaClBrowser.

More explicitly distiquish between the case where the debug port is not yet
known versus when it is unused.

Switch debug port to being a per-process value (as it is).

This relands r270907 with a fix to make it work with disable_nacl=1
and therefore ASAN.

BUG=None
TEST=trybots
R=jam@chromium.org,sehr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271133 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-17 01:03:21 +00:00
jam@chromium.org
e44d13473d Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes.
R=avi@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271096 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-16 21:29:33 +00:00
benwells@chromium.org
a15e0fe221 Revert 270907 "Remove knowledge of nacl from content."
> Remove knowledge of nacl from content.
> 
> Content should not have knowledge of NaCl. Moving per process NaCl debug
> stub port information to NaClBrowser.
> 
> More explicitly distiquish between the case where the debug port is not yet
> known versus when it is unused.
> 
> Switch debug port to being a per-process value (as it is).
> 
> BUG=None
> TEST=trybots
> R=jam@chromium.org
> 
> Review URL: https://codereview.chromium.org/286993006

This caused the compile to fail on the TSAN v2 bot:
http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Builder%20%28TSan%20v2%29/builds/19971

TBR=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270924 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-16 04:32:15 +00:00
bradnelson@google.com
720a221b29 Remove knowledge of nacl from content.
Content should not have knowledge of NaCl. Moving per process NaCl debug
stub port information to NaClBrowser.

More explicitly distiquish between the case where the debug port is not yet
known versus when it is unused.

Switch debug port to being a per-process value (as it is).

BUG=None
TEST=trybots
R=jam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270907 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-16 02:56:55 +00:00
jam@chromium.org
ef2f6ba19e Ensure that any IPC sent from a child process that couldn't be deserialized causes that process to be killed.
Today we do this only for a subset of IPCs and not all process types.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270839 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-15 23:06:07 +00:00
jam@chromium.org
745fe5b108 Remove kChildCleanExit since it's not used anymore.
R=pkasting@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260304 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-28 23:46:36 +00:00
aberent@chromium.org
121e6138b0 Refactor configuration of sandboxes - first steps
See
https://docs.google.com/document/d/1H-hCsIcMsAEP0fWHimbuiNA-Hc9eXEmR94eb-2RQAhA/edit?usp=sharing
for background.

This moves all process type dependent decisions on how to create
Linux processes (not how to sandbox them once created, not Android)
into the launch delegates and makes the arguments to the
ChildProcessLauncher constructor and
BrowserChildProcessHostImpl::Launch OS independent.

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256802 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-13 11:35:15 +00:00
wangxianzhu@chromium.org
1a150551a6 Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only
- Remove DCHECK in non-official-release build by default
- Gyp variable dcheck_always_on=1 (existing) forces to enable DCHECK
  in release build
- Remove flag --enable-dcheck

Other effects/notes:
- Now allow "buildtype=Official dcheck_always_on=1" (which will
  enable DCHECK in official build) combination.
- Gyp variable logging_like_official_build no longer has an effect
- Leave DCHECK_IS_ON() unchanged. May deal with it in a later change
  if needed.

This won't affect bots which use dcheck_always_on=1.

BUG=350462
TEST=LoggingTest.Dcheck
R=thakis@chromium.org
TBR=darin,sehr (command line changes in components/nacl and mojo)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255987 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-10 18:23:38 +00:00
haven@chromium.org
fa01e47350 Creates a way to launch the utility process with elevated privileges on Windows systems for the rare operations that require administrator access.
IPCs to the utility process will be filtered when it is running elevated.

BUG=331881

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250409 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-11 14:45:35 +00:00
bradnelson@google.com
bb4ee2d0db Allow multiple NaCl modules to be debugged.
Assigning the first NaCl module to load to port 4014, allowing other to be
dynamic, using a code path currently used for testing.

Expose the port used by each module in the Task Manager UI to make it available
to users debugging NaCl modules.

Follow on changes will add extension api fields to make debuggable modules
discoverable to a web based debugger.

NOTE: The debug stub port on windows is opened at a different layer (inside nacl, only availabled with --disable-sandbox). This will be exposed in a follow on change.

Reviewers:
yoshiki@chromium.org (for task_manager)
pkasting@chromium.org (for browser/ui)
brettw@chromium.org (for content)
noelallen@chromium.org (for nacl)

BUG=328714
TEST=trybots
R=yoshiki@chromium.org,pkasting@chromium.org,brettw@chromium.org,noelallen@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244041 0039d316-1c4b-4281-b951-d872f2087c98
2014-01-10 02:12:59 +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
scottmg@chromium.org
c9343f1d1b Revert 230968 "Use HighResNow whenever possible on Windows."
Speculative revert. Appears to be causing problems on webgl gpu bots
(unsure of root cause), and possible some XP test bots (TimeTicks::Now
non-monotonic).

TBR=awong@chromium.org, kbr@chromium.org, simonjam@chromium.org

BUG=311646

> Use HighResNow whenever possible on Windows.
> 
> This has been enabled on Canary channel for sometime now and seems to be
> safe there. We also now have data from stable channel showing there are
> no unexpectedly buggy CPUs out there. This should be safe to turn on for
> all users with adequate CPUs, which is the majority of them.
> 
> BUG=158234
> 
> Review URL: https://codereview.chromium.org/41953002

TBR=simonjam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231152 0039d316-1c4b-4281-b951-d872f2087c98
2013-10-25 23:38:45 +00:00
simonjam@chromium.org
5da0c636db Use HighResNow whenever possible on Windows.
This has been enabled on Canary channel for sometime now and seems to be
safe there. We also now have data from stable channel showing there are
no unexpectedly buggy CPUs out there. This should be safe to turn on for
all users with adequate CPUs, which is the majority of them.

BUG=158234

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230968 0039d316-1c4b-4281-b951-d872f2087c98
2013-10-25 06:39:17 +00:00
jam@chromium.org
ba780c1bb6 Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide the OnMessageReceived which shouldn't be overridden from child classes, and also avoid the pattern of requiring an overridden method to have to call to the base class.
R=scherkus@chromium.org, scherkus

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226251 0039d316-1c4b-4281-b951-d872f2087c98
2013-10-01 17:07:06 +00:00
simonjam@chromium.org
c8e8cb9437 Enable high resolution time for TimeTicks::Now on Windows Canary
This should be unnoticeable, except for improved resolution in places such as window.performance.now().

The feature is enabled if the user is running Canary channel or has manually specified the --enable-high-resolution-time flag. This will only work if the CPU has a non-stop TSC and isn't a broken Athlon processor. UMA data show this is a safe combination.

The flag is propagated to renderer processes so that they know to enable it too.

BUG=158234

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222396 0039d316-1c4b-4281-b951-d872f2087c98
2013-09-10 23:36:08 +00:00
brettw@chromium.org
b345c488df Move AlterEnvironment to base/environment.h, implement on Windows. This re-implements the Posix version to be more like the Windows version and to share some parsing code. The new version will be somewhat slower due to some extra mallocs, but is shorter and more clear. I didn't want to implement a super optimized version on Windows, and the alternative would be to keep the new Windows version and the old Posix version in parallel which seemed less desirable.
This changes the input from a vector to a map and just adds the map on the LaunchOptions rather than requiring the caller to set a pointer. This cleans up the callsites somewhat.

BUG=
R=viettrungluu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220608 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-30 18:00:39 +00:00
jln@chromium.org
547603d326 Fix getting exit status for browser child process.
This makes BrowserChildProcessHost::GetTerminationStatus() similar to
RenderProcessHostImpl::GetChildTerminationStatus().

Linux requires waitpid() to block to get an exit status reliably. Otherwise
the kernel is at liberty to not reap the process, even if it's already currently
exiting or dead.

If we know that a process is dead, we should make use of the known_dead
argument to ChildProcessLauncher::GetChildTerminationStatus(), as does
RenderProcessHostImpl::GetChildTerminationStatus().

A discussion of this tricky issue is available in crbug.com/157458 and the
related CL.

This will, among other things, fix NaCl's crash throttling security measure.

BUG=274827,nativeclient:359
R=mseaborn@chromium.org, piman@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219814 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-27 17:59:19 +00:00
nhiroki@chromium.org
08961e988c Revert 217172 "Enable high resolution time for TimeTicks::Now on..."
There is a suspicion that this might break some tests:

MessageLoopTest.PostDelayedTask_InPostOrder_2,
StatsTableTest.StatsCounterTimer
TimeTicks.Deltas

http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%282%29/builds/30128
http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/21737

> Enable high resolution time for TimeTicks::Now on Windows Canary
> 
> This should be unnoticeable, except for improved resolution in places such as window.performance.now().
> 
> The feature is enabled if the user is running Canary channel or has manually specified the --enable-high-resolution-time flag. This will only work if the CPU has a non-stop TSC and isn't a broken Athlon processor. UMA data show this is a safe combination.
> 
> The flag is propagated to renderer processes so that they know to enable it too.
> 
> BUG=158234
> 
> Review URL: https://chromiumcodereview.appspot.com/16896018

TBR=simonjam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217226 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-13 09:30:11 +00:00
simonjam@chromium.org
a7eda97977 Enable high resolution time for TimeTicks::Now on Windows Canary
This should be unnoticeable, except for improved resolution in places such as window.performance.now().

The feature is enabled if the user is running Canary channel or has manually specified the --enable-high-resolution-time flag. This will only work if the CPU has a non-stop TSC and isn't a broken Athlon processor. UMA data show this is a safe combination.

The flag is propagated to renderer processes so that they know to enable it too.

BUG=158234

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217172 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-13 02:45:59 +00:00
bajones@chromium.org
9dd901522e Created multi-process-friendly PowerMonitor interface.
PowerMonitor status is now captured in the browser process, which has the
appropriate UI thread, and then sent via IPC to other processes which are
interested in the power state.

BUG=236031
R=apatrick@chromium.org, jam@chromium.org, jar@chromium.org, jvoung@chromium.org, kbr@chromium.org, mpcomplete@chromium.org, palmer@chromium.org, piman@chromium.org, vandebo@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215381 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-02 22:09:13 +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
vollick@chromium.org
2bf64a930e Allow tracing to console everywhere.
This patch gets rid of the cc-only trace-to-vlog stuff and replaces it with a
general trace-to-console approach that can be used everywhere, even the
browser.

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211245 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-11 23:10:40 +00:00
jam@chromium.org
6d057a0cd2 Make utility process run in-process when running in single-process mode.
Remove the unit test/single process code path for SandboxedUnpacker as a first step.

BUG=19192
R=asargent@chromium.org, scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210620 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-09 21:12:07 +00:00
avi@chromium.org
10994d13b7 Use a direct include of strings headers in content/browser/, part 1.
BUG=247723
TEST=none
TBR=ben@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205449 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-11 07:16:18 +00:00
simonhatch@chromium.org
d36860d7e8 Lower the priority of shared workers that aren't associated with the foreground tab.
This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground.

BUG=
TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth.

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

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203272 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-31 00:04:21 +00:00
jamesr@chromium.org
872f3a9486 Move child-common classes to content/common_child
We need a place to put code that is shared between child processes of different
types but not used in the browser process. For instance, the NPObject bindings
code is used in the plugin and renderer processes but depends on WebBindings
which the browser shouldn't depend on. Some web platform features require shared
code between renderer and worker processe. The WebKit image decoders are used
by worker, renderer and utility processes.

This creates a content/common_child directory for code shared by more than one
child process type. content/common_child can depend on content/common and all
content/ subdirs except for content/browser and content/common can depend on it.

The java bridge code is (more than a) bit busted since it pulls the NPObject
bindings in to the browser, but since this code is only intended for use on
android single-process configurations I've just created DEPS exceptions for
this bit of code.

BUG=241606

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201252 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-21 08:16:08 +00:00
simonhatch@chromium.org
57e1d686b0 Revert 200932 "Lower the priority of shared workers that aren't ..."
> Lower the priority of shared workers that aren't associated with the foreground tab.
> 
> This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground.
> 
> BUG=
> TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth.
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199840
> 
> Review URL: https://chromiumcodereview.appspot.com/14137016

TBR=simonhatch@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201090 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-20 16:00:42 +00:00
simonhatch@chromium.org
b378803abc Lower the priority of shared workers that aren't associated with the foreground tab.
This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground.

BUG=
TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200932 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-18 00:14:46 +00:00
simonhatch@chromium.org
4993128061 Revert 199840 "Lower the priority of shared workers that aren't ..."
> Lower the priority of shared workers that aren't associated with the foreground tab.
> 
> This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground.
> 
> BUG=
> TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth.
> 
> Review URL: https://chromiumcodereview.appspot.com/14137016

TBR=simonhatch@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199847 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-13 23:24:29 +00:00
simonhatch@chromium.org
3e44cf62a6 Lower the priority of shared workers that aren't associated with the foreground tab.
This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground.

BUG=
TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199840 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-13 22:46:17 +00:00
thestig@chromium.org
d8c7006078 Cleanup various bits of BrowserThreadImpl and PluginServiceImpl.
Review URL: https://chromiumcodereview.appspot.com/13896004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195957 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-24 00:22:34 +00:00
erg@chromium.org
59383c78c7 Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.
In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes
these in content/.

BUG=232084

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194608 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-17 16:43:27 +00:00
jam@chromium.org
f3b3576935 Split the ProcessType enum into process types that content knows about (which will remain in src\content) and those that are for chrome (which moved to src\chrome). This way we won't get any more layering violations where nacl code is in content.
Also move the NaCl command line switches to chrome.

BUG=191682
Review URL: https://codereview.chromium.org/12662019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189763 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-22 05:16:13 +00:00
jam@chromium.org
34f4868ad6 Refactor sandbox_policy.cc so that it doesn't contain the sandbox policies for all processes. Instead have whoever creates a sandboxed process set this data. This allows us to clean a few NaCl related changes in content:
-remove NaCl sandbox rules from content
-remove the hack for ifdef'ing out the GPU policy since it didn't link for nacl64.exe
-remove the 1GB memory reservation for the NaCl loader process out of content

Other cleanup:
-renamed sandbox_policy.* to sandbox_win.* to match the other platform-specific sandbox files
-moved BrokerGetFileHandleForProcess to internal content files since it's not called from outside
-remove AddGpuDllEvictionPolicy since it was redundant (the one dll it removed was already listed in the generic list)

There's still more cleanup to be done in the sandbox code (i.e. remove chrome frame switch, nacl process type switch etc). I will do that in future changes.

BUG=191682
Review URL: https://codereview.chromium.org/12805004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189175 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-20 00:30:18 +00:00
apatrick@chromium.org
162a9fd70d Windows: BrowserChildProcessHostImpl reports OnProcessCrashed if the child process crashes before connecting the IPC channel.
When a child process crashes, this is generally detected by an error on the IPC channel, i.e. OnChannelError being called. However, if the child process exits or crashes before this IPC channel has been established, the crash is lost. The browser process sees the child process being launched but never learns of its termination.

This patch uses a WaitableEventWatcher to track the lifetime of the child process up to the point the IPC channel is connected. If the child process crashes in the interim, the usual OnProcessCrashed handler is invoked.

This is important for the GPU child process because it is prone to crashing before the IPC channel is established; it has to initialize Direct3D before the sandbox is turned on. This would lead to a browser hang if Direct3D or the driver crashed during initialization.

BUG=177611

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186498 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-06 20:47:49 +00:00
phajdan.jr@chromium.org
f4eaf7b97f content: convert child process notifications to observer usage
BUG=170921

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185337 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-28 22:00:40 +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
jam@chromium.org
3a85b1f23e Move tracing code in content\browser to content\browser\tracing now that there's a separate directory.
BUG=169170
Review URL: https://codereview.chromium.org/12149003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180071 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-01 04:47:40 +00:00
jln@chromium.org
c7691de340 Linux: inform the Zygote when it's waiting on a dead process
If the browser calls ProcessDied() and asks the Zygote to wait (without blocking)
on a dead process, the kernel might not be done destroying it and the Zygote may
mistakenly claim that the process is alive.

We now inform the Zygote over the IPC that the process is already dead so
that it can wait synchroneously.

BUG=157458
NOTRY=true


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171450 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 08:31:51 +00:00