Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/sandbox_policy.cc

Issue 200031: Take out the activex control. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "chrome/browser/sandbox_policy.h" 5 #include "chrome/browser/sandbox_policy.h"
6 6
7 #include "app/win_util.h" 7 #include "app/win_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug_util.h" 9 #include "base/debug_util.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA_LOW, NULL, 272 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA_LOW, NULL,
273 sandbox::TargetPolicy::FILES_ALLOW_ANY, 273 sandbox::TargetPolicy::FILES_ALLOW_ANY,
274 policy)) 274 policy))
275 return false; 275 return false;
276 } 276 }
277 277
278 return true; 278 return true;
279 } 279 }
280 280
281 // Adds the custom policy rules for a given plugin. |trusted_plugins| contains 281 // Adds the custom policy rules for a given plugin. |trusted_plugins| contains
282 // the comma separate list of plugins that should not be sandboxed. The plugin 282 // the comma separate list of plugin dll names that should not be sandboxed.
283 // in the list can be either the plugin dll name of the class id if it's an
284 // ActiveX.
285 bool AddPolicyForPlugin(const CommandLine* cmd_line, 283 bool AddPolicyForPlugin(const CommandLine* cmd_line,
286 sandbox::TargetPolicy* policy) { 284 sandbox::TargetPolicy* policy) {
287 std::wstring plugin_dll = cmd_line-> 285 std::wstring plugin_dll = cmd_line->
288 GetSwitchValue(switches::kPluginPath); 286 GetSwitchValue(switches::kPluginPath);
289 std::wstring trusted_plugins = CommandLine::ForCurrentProcess()-> 287 std::wstring trusted_plugins = CommandLine::ForCurrentProcess()->
290 GetSwitchValue(switches::kTrustedPlugins); 288 GetSwitchValue(switches::kTrustedPlugins);
291 // Add the policy for the pipes. 289 // Add the policy for the pipes.
292 sandbox::ResultCode result = sandbox::SBOX_ALL_OK; 290 sandbox::ResultCode result = sandbox::SBOX_ALL_OK;
293 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, 291 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
294 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 292 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 443
446 // Help the process a little. It can't start the debugger by itself if 444 // Help the process a little. It can't start the debugger by itself if
447 // the process is in a sandbox. 445 // the process is in a sandbox.
448 if (child_needs_help) 446 if (child_needs_help)
449 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); 447 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId);
450 448
451 return process; 449 return process;
452 } 450 }
453 451
454 } // namespace sandbox 452 } // namespace sandbox
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698