diff options
author | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 16:32:53 +0000 |
---|---|---|
committer | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 16:32:53 +0000 |
commit | 36254f7371c1f78a19442b4ae6fcab5f7cbcb330 (patch) | |
tree | 791a15f4881aa4d1105dd148f9ae5bb0e9a7dfdf /chrome | |
parent | 52205c2324522017ee596cfdf97615baa4bd2b89 (diff) | |
download | chromium_src-36254f7371c1f78a19442b4ae6fcab5f7cbcb330.zip chromium_src-36254f7371c1f78a19442b4ae6fcab5f7cbcb330.tar.gz chromium_src-36254f7371c1f78a19442b4ae6fcab5f7cbcb330.tar.bz2 |
Basic support for ppapi trusted broker process: --type=ppapi-broker.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6803016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome_main.cc | 5 | ||||
-rw-r--r-- | chrome/app/dummy_main_functions.cc | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc index 22838ee..264727d 100644 --- a/chrome/app/chrome_main.cc +++ b/chrome/app/chrome_main.cc @@ -94,6 +94,7 @@ extern int RendererMain(const MainFunctionParams&); extern int GpuMain(const MainFunctionParams&); extern int PluginMain(const MainFunctionParams&); extern int PpapiPluginMain(const MainFunctionParams&); +extern int PpapiBrokerMain(const MainFunctionParams&); extern int WorkerMain(const MainFunctionParams&); extern int NaClMain(const MainFunctionParams&); extern int UtilityMain(const MainFunctionParams&); @@ -162,6 +163,9 @@ static void AdjustLinuxOOMScore(const std::string& process_type) { if (process_type == switches::kPluginProcess || process_type == switches::kPpapiPluginProcess) { score = kPluginScore; + } else if (process_type == switches::kPpapiBrokerProcess) { + // Kill the broker before the plugin. + score = kPluginScore + 1; } else if (process_type == switches::kUtilityProcess || process_type == switches::kWorkerProcess || process_type == switches::kGpuProcess || @@ -451,6 +455,7 @@ int RunNamedProcessTypeMain(const std::string& process_type, { switches::kPluginProcess, PluginMain }, { switches::kWorkerProcess, WorkerMain }, { switches::kPpapiPluginProcess, PpapiPluginMain }, + { switches::kPpapiBrokerProcess, PpapiBrokerMain }, { switches::kUtilityProcess, UtilityMain }, { switches::kGpuProcess, GpuMain }, { switches::kServiceProcess, ServiceProcessMain }, diff --git a/chrome/app/dummy_main_functions.cc b/chrome/app/dummy_main_functions.cc index bc942f6..f3b4a61 100644 --- a/chrome/app/dummy_main_functions.cc +++ b/chrome/app/dummy_main_functions.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -23,6 +23,10 @@ int PpapiPluginMain(const MainFunctionParams& parameters) { return ResultCodes::BAD_PROCESS_TYPE; } +int PpapiBrokerMain(const MainFunctionParams& parameters) { + return ResultCodes::BAD_PROCESS_TYPE; +} + int WorkerMain(const MainFunctionParams& parameters) { return ResultCodes::BAD_PROCESS_TYPE; } |