| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SANDBOX_POLICY_H_ | 5 #ifndef CHROME_BROWSER_SANDBOX_POLICY_H_ |
| 6 #define CHROME_BROWSER_SANDBOX_POLICY_H_ | 6 #define CHROME_BROWSER_SANDBOX_POLICY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "sandbox/src/sandbox.h" | 11 #include "sandbox/src/sandbox.h" |
| 12 #include "webkit/activex_shim/activex_shared.h" | 12 #include "webkit/activex_shim/activex_shared.h" |
| 13 | 13 |
| 14 // Adds the generic policy rules to a sandbox TargetPolicy. | 14 // Adds the generic policy rules to a sandbox TargetPolicy. |
| 15 bool AddGenericPolicy(sandbox::TargetPolicy* policy); | 15 bool AddGenericPolicy(sandbox::TargetPolicy* policy); |
| 16 | 16 |
| 17 // Adds policy rules for unloaded the known dlls that cause chrome to crash. | 17 // Adds policy rules for unloaded the known dlls that cause chrome to crash. |
| 18 bool AddDllEvictionPolicy(sandbox::TargetPolicy* policy); | 18 bool AddDllEvictionPolicy(sandbox::TargetPolicy* policy); |
| 19 | 19 |
| 20 // Adds policy rules for running Gears in the renderer process. | |
| 21 bool AddPolicyForGearsInRenderer(sandbox::TargetPolicy* policy); | |
| 22 | |
| 23 // Adds the custom policy rules for a given plugin. If dll is activex-shim, | 20 // Adds the custom policy rules for a given plugin. If dll is activex-shim, |
| 24 // then clsid is the clsid of ActiveX control. Otherwise clsid is ignored. | 21 // then clsid is the clsid of ActiveX control. Otherwise clsid is ignored. |
| 25 // |trusted_plugins| contains the comma separate list of plugins that should | 22 // |trusted_plugins| contains the comma separate list of plugins that should |
| 26 // not be sandboxed. The plugin in the list can be either the plugin dll name | 23 // not be sandboxed. The plugin in the list can be either the plugin dll name |
| 27 // of the class id if it's an ActiveX. | 24 // of the class id if it's an ActiveX. |
| 28 bool AddPolicyForPlugin(const FilePath &plugin_dll, | 25 bool AddPolicyForPlugin(const FilePath &plugin_dll, |
| 29 const std::string &activex_clsid, | 26 const std::string &activex_clsid, |
| 30 const std::wstring &trusted_plugins, | 27 const std::wstring &trusted_plugins, |
| 31 sandbox::TargetPolicy* policy); | 28 sandbox::TargetPolicy* policy); |
| 32 | 29 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 43 | 40 |
| 44 // Creates a sandbox without any restriction. | 41 // Creates a sandbox without any restriction. |
| 45 bool ApplyPolicyForTrustedPlugin(sandbox::TargetPolicy* policy); | 42 bool ApplyPolicyForTrustedPlugin(sandbox::TargetPolicy* policy); |
| 46 | 43 |
| 47 // Creates a sandbox with the plugin running in a restricted environment. | 44 // Creates a sandbox with the plugin running in a restricted environment. |
| 48 // Only the "Users" and "Everyone" groups are enabled in the token. The User SID | 45 // Only the "Users" and "Everyone" groups are enabled in the token. The User SID |
| 49 // is disabled. | 46 // is disabled. |
| 50 bool ApplyPolicyForUntrustedPlugin(sandbox::TargetPolicy* policy); | 47 bool ApplyPolicyForUntrustedPlugin(sandbox::TargetPolicy* policy); |
| 51 | 48 |
| 52 #endif // CHROME_BROWSER_SANDBOX_POLICY_H_ | 49 #endif // CHROME_BROWSER_SANDBOX_POLICY_H_ |
| OLD | NEW |