Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157650
Review URL: https://chromiumcodereview.appspot.com/10868012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157773 0039d316-1c4b-4281-b951-d872f2087c98
Introduced too many static initializers - broke linux sizes.
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Review URL: https://chromiumcodereview.appspot.com/10868012TBR=lazyboy@chromium.org
Review URL: https://codereview.chromium.org/10946044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157656 0039d316-1c4b-4281-b951-d872f2087c98
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Review URL: https://chromiumcodereview.appspot.com/10868012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157650 0039d316-1c4b-4281-b951-d872f2087c98
Having a stack trace is helpful for developers, especially on Linux
where gdb can be slow to start and require complex command line flags
for the renderer process.
Only enabled on debug builds without the sandbox.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10918198
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156856 0039d316-1c4b-4281-b951-d872f2087c98
The new algorithm maps the original 13-bit low entropy source to a
new 13-bit entropy value using a mapping that is shuffled using the
trial name as a seed.
The algorithm is roughly as follows:
Take the low entropy source as an integer between 0-8191.
Generate an identity mapping of size 8192 where mapping[i] == i.
Seed a Mersenne Twister random number generator with the hash of the field trial name.
Use the seeded random number generator to shuffle the mapping array.
Map the low entropy source using the mapping array, i.e. entropy' = mapping[entropy].
Divide the resulting entropy' by 8192 to produce a double in the range of [0, 1) that
will be used for bucketing in field_trial.cc.
The above algorithm improves uniformity over the existing entropy provider when
the 13-bit entropy source is used while still providing very little overlaps of
buckets between different field trials.
Adds third_party library mt19937ar, an implementation of Mersenne Twister, for
the seeded random number generation. This is needed until C++11 becomes available
for use in Chromium, at which point C++11's <random> could be used.
BUG=143239
TEST=Unit tests. Additionally, verified that the new algorithm produces uniform results
with very little overlap of buckets between different field trials.
Review URL: https://chromiumcodereview.appspot.com/10830318
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153322 0039d316-1c4b-4281-b951-d872f2087c98
On bots, seeing that sometimes child processes are hanging around after the browser process is gone. This confuses the sharding scripts.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10834068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149023 0039d316-1c4b-4281-b951-d872f2087c98
all histograms in child processes.
Made StatisticsRecorder a leaky lazy singleton.
R=jar@chromium.org, jam@chromium.org
BUG=114013
TEST=renderer histograms should still work.
Review URL: https://chromiumcodereview.appspot.com/10779040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147501 0039d316-1c4b-4281-b951-d872f2087c98
I spent a lot of time trying to find a way to make the assertion and crash dump locator tests non-flaky and shardable. But it's not really possible, because the log file is per binary, and the dumps all get put into the same directory. That means that running with sharding will give erronous results. Also even if we weren't sharding, there's still race conditions looking at the disk for a crash dump. I kept a test which looks for a notification that we crashed (instead of looking on disk). If this breaks in the field, I believe we'll notice very quickly from the canary builds (do we also have breakpad tests for this?). For the assert/check tests, I think if something breaks there developers will very quickly find it.
BUG=121574
Review URL: https://chromiumcodereview.appspot.com/10082001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132684 0039d316-1c4b-4281-b951-d872f2087c98
To do this, we needed to change the usage from a regular constructor (which is not private) to a static CreateInstance method (which is why there is a bunch of TBR'd owners, those changes were trivial to existing users of FieldTrials).
OWNERs of trivially changed files:
TBR=sky,jamesr,cpu,joi,
BUG=119726
TEST=base_unittests.exe --gtest_filter=FieldTrialTest.*
You can also find an active field trial name and force it to a given group by passing the following command line argument "--force-fieldtest=<trial_name>/<default_group_name>/<group_name>/"
Review URL: http://codereview.chromium.org/9705074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131948 0039d316-1c4b-4281-b951-d872f2087c98
This code is only invoked when --renderer-clean-exit is passed to Chrome.
It does the following:
1. Makes the browser process not send a SIGTERM to its children.
2. Makes the renderer process not call _exit() in OnChannelError().
Why is this needed? The renderer process in Chrome does not exit cleanly
currently so when Chrome is profiled for optimization we do not get
representative data and miss out on optimization opportunities.
This CL addresses that problem by ensuring that exit handlers including
profile dumpers get run before the renderer exits.
BUG=107584
TEST=Rebuilt Chrome with -fprofile-generate. Verified that the renderer
process' profile is included when Chrome is closed.
Review URL: http://codereview.chromium.org/9936002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131625 0039d316-1c4b-4281-b951-d872f2087c98
Background: The Init method is currently called from the RenderThreadImpl constructor. If set_main_thread is not called from Init then ContentRendererClient::RenderThreadStarted, which is also called from Init, will not be able to retrieve the current child thread using ChildThread::current. Retrieving the current child thread from inside RenderThreadStarted is necessary for performing actions that must occur before message processing starts such as adding additional MessageFilters to the child thread's channel.
BUG=112335
TEST=ChildThread::current() returns non-NULL in ContentRendererClient::RenderThreadStarted
Review URL: http://codereview.chromium.org/9297022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120112 0039d316-1c4b-4281-b951-d872f2087c98
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo
-got rid of the duplicated code to initialize the broker
-since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs.
BUG=98716
Review URL: http://codereview.chromium.org/8414020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
Also move the --process=extension command line flag to --extension-process
BUG=89642
TEST=everything still works
Review URL: http://codereview.chromium.org/8113035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104173 0039d316-1c4b-4281-b951-d872f2087c98
I did this in the other sandboxed processes, but missed the renderer because these susbsystems get warmed up implicitly by other initialization. However, changing initialization order (or dependency changes in the underlying libraries) could introduce random crashes. So, for consistency explicit warmup is best, and will be needed for a later patch that closes the LPC ports.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7629015TBR=jschuh@chromium.org
Review URL: http://codereview.chromium.org/7637014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96566 0039d316-1c4b-4281-b951-d872f2087c98
I did this in the other sandboxed processes, but missed the renderer because these susbsystems get warmed up implicitly by other initialization. However, changing initialization order (or dependency changes in the underlying libraries) could introduce random crashes. So, for consistency explicit warmup is best, and will be needed for a later patch that closes the LPC ports.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7629015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96565 0039d316-1c4b-4281-b951-d872f2087c98
Don't use base::SysInfo::OperatingSystemVersionNumbers, because it calls
Gestalt, which has a few bad properties. Introduce new functions that perform
specific version checks.
BUG=85972
TEST=base_unittests MacUtilTest.IsOSEllipsis
Review URL: http://codereview.chromium.org/7144007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89028 0039d316-1c4b-4281-b951-d872f2087c98
USE_X11 where possible. An earlier version of this patch was used to build
Chromium on FreeBSD, OpenBSD, and Solaris.
Patch by ruben (chromium@hybridsource.org)
Review URL: http://codereview.chromium.org/7006006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87382 0039d316-1c4b-4281-b951-d872f2087c98
I plan to use SystemMonitor in net/.
Fix up the Mac implementation not to use Cocoa APIs since @interface is not allowed in base.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7015017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85732 0039d316-1c4b-4281-b951-d872f2087c98
disable field trials. I am going to have a need for both soon.
Update some documentation about empty trial names, add TrialExists() method and update many call-sites to use this (it simplifies the previous logic which checked for existence and then for non-empty name, which can no longer happen).
Refactor a bit in browser_main.
While I'm in there and needing base/OWNERS approval, add an OWNERS
file for base/metrics that adds jar@chromium.org as an owner for that
directory.
Initially committed as r84197.
Rolled back due to DCHECK in official builds, r84373.
Will re-submit with fix.
BUG=81750
TEST=base_unittests
Review URL: http://codereview.chromium.org/6883102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84801 0039d316-1c4b-4281-b951-d872f2087c98
Initial land attempt at http://codereview.chromium.org/6551019/
gpu_trace_event fork at http://codereview.chromium.org/6691013
- gpu_trace_event renamed to base/debug/trace_event and modified as appropriate for base::debug
- Unit Tests implemented for trace_event
- gpu_common library removed (was added only for gpu_trace_event)
- Existing calls to trace_event suffixed with _ETW to make ETW calls (see decisions and incremental plans at end of 6551019)
- GPU trace calls renamed to new calls.
- Tracing switch removed from test_shell, as linux log file support removed.
BUG=79509
TEST=trace_event_win_unittest and about:gpu
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84284
Review URL: http://codereview.chromium.org/6862002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84486 0039d316-1c4b-4281-b951-d872f2087c98
Initial land attempt at http://codereview.chromium.org/6551019/
gpu_trace_event fork at http://codereview.chromium.org/6691013
- gpu_trace_event renamed to base/debug/trace_event and modified as appropriate for base::debug
- Unit Tests implemented for trace_event
- gpu_common library removed (was added only for gpu_trace_event)
- Existing calls to trace_event suffixed with _ETW to make ETW calls (see decisions and incremental plans at end of 6551019)
- GPU trace calls renamed to new calls.
- Tracing switch removed from test_shell, as linux log file support removed.
BUG=79509
TEST=trace_event_win_unittest and about:gpu
Review URL: http://codereview.chromium.org/6862002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84284 0039d316-1c4b-4281-b951-d872f2087c98
disable field trials. I am going to have a need for both soon.
Cleaning up some comments about empty trial names, adding static
method TrialExists() and simplifying many call sites by using this
method.
While I'm in there and needing base/OWNERS approval, add an OWNERS
file for base/metrics that adds jar@chromium.org as an owner for that
directory.
BUG=none
TEST=base_unittests
TBR=jam@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84197 0039d316-1c4b-4281-b951-d872f2087c98
I've moved the breakpad specific code out of content\renderer\renderer_main.cc into chrome\renderer\chrome_render_process_observer.cc. I've also moved the rest of the process-specific initialization from chrome_content_renderer_client.cc there as well, so that all the chrome renderer process init code is one place (some of it existed before chrome_render_process_observer.cc was created).
Review URL: http://codereview.chromium.org/6884001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81979 0039d316-1c4b-4281-b951-d872f2087c98