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/common/chrome_content_client.cc

Issue 9924010: Revert 129627 - Add a sandbox API for broker handle duplication (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('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) 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 // Add the policy for the pipes. 412 // Add the policy for the pipes.
413 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, 413 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
414 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 414 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
415 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) { 415 L"\\\\.\\pipe\\chrome.*") != sandbox::SBOX_ALL_OK) {
416 NOTREACHED(); 416 NOTREACHED();
417 return false; 417 return false;
418 } 418 }
419 419
420 // Add policy for proxy window pump.
421 if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
422 sandbox::TargetPolicy::HANDLES_DUP_ANY,
423 L"Event") != sandbox::SBOX_ALL_OK) {
424 NOTREACHED();
425 return false;
426 }
427
428 // Allow Talk's camera control. 420 // Allow Talk's camera control.
429 base::win::RegKey talk_key(HKEY_CURRENT_USER, 421 base::win::RegKey talk_key(HKEY_CURRENT_USER,
430 L"Software\\Google\\Google Talk Plugin", 422 L"Software\\Google\\Google Talk Plugin",
431 KEY_READ); 423 KEY_READ);
432 if (talk_key.Valid()) { 424 if (talk_key.Valid()) {
433 string16 install_dir; 425 string16 install_dir;
434 if (talk_key.ReadValue(L"install_dir", &install_dir) == ERROR_SUCCESS) { 426 if (talk_key.ReadValue(L"install_dir", &install_dir) == ERROR_SUCCESS) {
435 if (install_dir[install_dir.size() - 1] != '\\') 427 if (install_dir[install_dir.size() - 1] != '\\')
436 install_dir.append(L"\\*"); 428 install_dir.append(L"\\*");
437 else 429 else
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 DCHECK(sandbox_profile_resource_id); 473 DCHECK(sandbox_profile_resource_id);
482 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { 474 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) {
483 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 475 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
484 return true; 476 return true;
485 } 477 }
486 return false; 478 return false;
487 } 479 }
488 #endif 480 #endif
489 481
490 } // namespace chrome 482 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698