| OLD | NEW |
| 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 Loading... |
| 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 |
| 420 // Allow Talk's camera control. | 428 // Allow Talk's camera control. |
| 421 base::win::RegKey talk_key(HKEY_CURRENT_USER, | 429 base::win::RegKey talk_key(HKEY_CURRENT_USER, |
| 422 L"Software\\Google\\Google Talk Plugin", | 430 L"Software\\Google\\Google Talk Plugin", |
| 423 KEY_READ); | 431 KEY_READ); |
| 424 if (talk_key.Valid()) { | 432 if (talk_key.Valid()) { |
| 425 string16 install_dir; | 433 string16 install_dir; |
| 426 if (talk_key.ReadValue(L"install_dir", &install_dir) == ERROR_SUCCESS) { | 434 if (talk_key.ReadValue(L"install_dir", &install_dir) == ERROR_SUCCESS) { |
| 427 if (install_dir[install_dir.size() - 1] != '\\') | 435 if (install_dir[install_dir.size() - 1] != '\\') |
| 428 install_dir.append(L"\\*"); | 436 install_dir.append(L"\\*"); |
| 429 else | 437 else |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 DCHECK(sandbox_profile_resource_id); | 481 DCHECK(sandbox_profile_resource_id); |
| 474 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 482 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
| 475 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 483 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
| 476 return true; | 484 return true; |
| 477 } | 485 } |
| 478 return false; | 486 return false; |
| 479 } | 487 } |
| 480 #endif | 488 #endif |
| 481 | 489 |
| 482 } // namespace chrome | 490 } // namespace chrome |
| OLD | NEW |