summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 21:48:41 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 21:48:41 +0000
commit25fe7fc560ac4350eb57f070194e2755279f7fb4 (patch)
tree933dfc1d585da191c98634f1dddb883d0bbf62d1 /content
parent7a7c9ed12b42a690ce294903de49d69ddd11b3c4 (diff)
downloadchromium_src-25fe7fc560ac4350eb57f070194e2755279f7fb4.zip
chromium_src-25fe7fc560ac4350eb57f070194e2755279f7fb4.tar.gz
chromium_src-25fe7fc560ac4350eb57f070194e2755279f7fb4.tar.bz2
Get rid of content dependency from sandbox_policy.h
BUG=76697 Review URL: http://codereview.chromium.org/7074025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/child_process_launcher.cc2
-rw-r--r--content/browser/content_browser_client.cc7
-rw-r--r--content/browser/content_browser_client.h10
-rw-r--r--content/browser/plugin_process_host.cc1
-rw-r--r--content/common/content_switches.cc14
-rw-r--r--content/common/content_switches.h5
6 files changed, 33 insertions, 6 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index a812b26..6a53d75 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -11,10 +11,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread.h"
-#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
#include "content/browser/content_browser_client.h"
#include "content/common/chrome_descriptors.h"
+#include "content/common/content_switches.h"
#include "content/common/process_watcher.h"
#include "content/common/result_codes.h"
diff --git a/content/browser/content_browser_client.cc b/content/browser/content_browser_client.cc
index 79759d3..9528f6d 100644
--- a/content/browser/content_browser_client.cc
+++ b/content/browser/content_browser_client.cc
@@ -86,4 +86,11 @@ int ContentBrowserClient::GetCrashSignalFD(const std::string& process_type) {
}
#endif
+#if defined(OS_WIN)
+bool ContentBrowserClient::SandboxPlugin(CommandLine* command_line,
+ sandbox::TargetPolicy* policy) {
+ return false;
+}
+#endif
+
} // namespace content
diff --git a/content/browser/content_browser_client.h b/content/browser/content_browser_client.h
index 5cb2be8..1c46499 100644
--- a/content/browser/content_browser_client.h
+++ b/content/browser/content_browser_client.h
@@ -24,6 +24,10 @@ class CookieList;
class CookieOptions;
}
+namespace sandbox {
+class TargetPolicy;
+}
+
namespace content {
class ResourceContext;
@@ -105,6 +109,12 @@ class ContentBrowserClient {
// Can return an optional fd for crash handling, otherwise returns -1.
virtual int GetCrashSignalFD(const std::string& process_type);
#endif
+
+#if defined(OS_WIN)
+ // Allows the embedder to sandbox a plugin, and apply a custom policy.
+ virtual bool SandboxPlugin(CommandLine* command_line,
+ sandbox::TargetPolicy* policy);
+#endif
};
} // namespace content
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index 9d2e7d4..b755305 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -170,7 +170,6 @@ bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info,
switches::kMemoryProfiling,
switches::kNoSandbox,
switches::kPluginStartupDialog,
- switches::kSafePlugins,
switches::kSilentDumpOnDCHECK,
switches::kTestSandbox,
switches::kUseGL,
diff --git a/content/common/content_switches.cc b/content/common/content_switches.cc
index ccbc378..444b0ce 100644
--- a/content/common/content_switches.cc
+++ b/content/common/content_switches.cc
@@ -20,6 +20,10 @@ const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
// Path to the exe to run for the renderer and plugin subprocesses.
const char kBrowserSubprocessPath[] = "browser-subprocess-path";
+// Run Chrome in Chrome Frame mode. This means that Chrome expects to be run
+// as a dependent process of the Chrome Frame plugin.
+const char kChromeFrame[] = "chrome-frame";
+
// Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
// This is controlled by policy and is kept separate from the other
// enable/disable switches to avoid accidentally regressing the policy
@@ -29,6 +33,9 @@ const char kDisable3DAPIs[] = "disable-3d-apis";
// Disables accelerated compositing.
const char kDisableAcceleratedCompositing[] = "disable-accelerated-compositing";
+// Disables the alternate window station for the renderer.
+const char kDisableAltWinstation[] = "disable-winsta";
+
// Disable the ApplicationCache.
const char kDisableApplicationCache[] = "disable-application-cache";
//
@@ -228,6 +235,10 @@ const char kLoggingLevel[] = "log-level";
// Make plugin processes log their sent and received messages to VLOG(1).
const char kLogPluginMessages[] = "log-plugin-messages";
+// Causes the process to run as a NativeClient broker
+// (used for launching NaCl loader processes on 64-bit Windows).
+const char kNaClBrokerProcess[] = "nacl-broker";
+
// Causes the process to run as a NativeClient loader.
const char kNaClLoaderProcess[] = "nacl-loader";
@@ -336,9 +347,6 @@ const char kRendererProcess[] = "renderer";
// Causes the renderer process to display a dialog on launch.
const char kRendererStartupDialog[] = "renderer-startup-dialog";
-// Runs the plugin processes inside the sandbox.
-const char kSafePlugins[] = "safe-plugins";
-
// Causes the process to run as a service process.
const char kServiceProcess[] = "service";
diff --git a/content/common/content_switches.h b/content/common/content_switches.h
index 111a010..1677a1e 100644
--- a/content/common/content_switches.h
+++ b/content/common/content_switches.h
@@ -14,8 +14,11 @@ extern const char kAllowFileAccessFromFiles[];
extern const char kAllowRunningInsecureContent[];
extern const char kAllowSandboxDebugging[];
extern const char kBrowserSubprocessPath[];
+// TODO(jam): this doesn't belong in content.
+extern const char kChromeFrame[];
extern const char kDisable3DAPIs[];
extern const char kDisableAcceleratedCompositing[];
+extern const char kDisableAltWinstation[];
extern const char kDisableApplicationCache[];
extern const char kDisableAudio[];
extern const char kDisableBackingStoreLimit[];
@@ -75,6 +78,7 @@ extern const char kLoadPlugin[];
extern const char kLoggingLevel[];
extern const char kLogPluginMessages[];
// TODO(jam): this doesn't belong in content.
+extern const char kNaClBrokerProcess[];
extern const char kNaClLoaderProcess[];
extern const char kNoDisplayingInsecureContent[];
extern const char kNoJsRandomness[];
@@ -105,7 +109,6 @@ extern const char kRendererCmdPrefix[];
extern const char kRendererCrashTest[];
extern const char kRendererProcess[];
extern const char kRendererStartupDialog[];
-extern const char kSafePlugins[];
// TODO(jam): this doesn't belong in content.
extern const char kServiceProcess[];
extern const char kShowPaintRects[];