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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 9958034: Convert plugin and GPU process to brokered handle duplication. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 FilePath plugin_path(plugin_dll); 402 FilePath plugin_path(plugin_dll);
403 if (plugin_path.BaseName() != builtin_flash.BaseName()) 403 if (plugin_path.BaseName() != builtin_flash.BaseName())
404 return false; 404 return false;
405 405
406 if (base::win::GetVersion() <= base::win::VERSION_XP || 406 if (base::win::GetVersion() <= base::win::VERSION_XP ||
407 CommandLine::ForCurrentProcess()->HasSwitch( 407 CommandLine::ForCurrentProcess()->HasSwitch(
408 switches::kDisableFlashSandbox)) { 408 switches::kDisableFlashSandbox)) {
409 return false; 409 return false;
410 } 410 }
411 411
412 // Add policy for proxy window pump.
cpu_(ooo_6.6-7.5) 2012/04/11 23:12:49 what is what are we allowing to dup here? "window
jschuh 2012/04/11 23:52:32 It's very confusing, but it's explained here in W
413 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
414 sandbox::TargetPolicy::HANDLES_DUP_ANY,
415 L"Event") != sandbox::SBOX_ALL_OK) {
416 NOTREACHED();
417 return false;
418 }
419
412 // Add the policy for the pipes. 420 // Add the policy for the pipes.
413 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, 421 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
414 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 422 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
415 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) { 423 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) {
416 NOTREACHED(); 424 NOTREACHED();
417 return false; 425 return false;
418 } 426 }
419 427
420 // Spawn the flash broker and apply sandbox policy. 428 // Spawn the flash broker and apply sandbox policy.
421 if (LoadFlashBroker(plugin_path, command_line)) { 429 if (LoadFlashBroker(plugin_path, command_line)) {
(...skipping 29 matching lines...) Expand all
451 DCHECK(sandbox_profile_resource_id); 459 DCHECK(sandbox_profile_resource_id);
452 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { 460 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) {
453 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 461 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
454 return true; 462 return true;
455 } 463 }
456 return false; 464 return false;
457 } 465 }
458 #endif 466 #endif
459 467
460 } // namespace chrome 468 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.h » ('j') | content/common/sandbox_policy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698