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

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 the plugin proxy window pump event
413 // used by WebPluginDelegateProxy::HandleInputEvent().
414 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
415 sandbox::TargetPolicy::HANDLES_DUP_ANY,
416 L"Event") != sandbox::SBOX_ALL_OK) {
417 NOTREACHED();
418 return false;
419 }
420
412 // Add the policy for the pipes. 421 // Add the policy for the pipes.
413 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, 422 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
414 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 423 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
415 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) { 424 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) {
416 NOTREACHED(); 425 NOTREACHED();
417 return false; 426 return false;
418 } 427 }
419 428
420 // Spawn the flash broker and apply sandbox policy. 429 // Spawn the flash broker and apply sandbox policy.
421 if (LoadFlashBroker(plugin_path, command_line)) { 430 if (LoadFlashBroker(plugin_path, command_line)) {
(...skipping 29 matching lines...) Expand all
451 DCHECK(sandbox_profile_resource_id); 460 DCHECK(sandbox_profile_resource_id);
452 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { 461 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) {
453 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 462 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
454 return true; 463 return true;
455 } 464 }
456 return false; 465 return false;
457 } 466 }
458 #endif 467 #endif
459 468
460 } // namespace chrome 469 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698