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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bug link Created 9 years, 10 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/common/extensions/extension_file_util.cc ('k') | chrome/common/zip.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sandbox_policy.h" 5 #include "chrome/common/sandbox_policy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 // Hack for Google Desktop crash. Trick GD into not injecting its DLL into 604 // Hack for Google Desktop crash. Trick GD into not injecting its DLL into
605 // this subprocess. See 605 // this subprocess. See
606 // http://code.google.com/p/chromium/issues/detail?id=25580 606 // http://code.google.com/p/chromium/issues/detail?id=25580
607 cmd_line->AppendSwitchASCII("ignored", " --type=renderer "); 607 cmd_line->AppendSwitchASCII("ignored", " --type=renderer ");
608 } 608 }
609 } 609 }
610 610
611 if (!exposed_dir.empty()) { 611 if (!exposed_dir.empty()) {
612 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, 612 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
613 sandbox::TargetPolicy::FILES_ALLOW_ANY, 613 sandbox::TargetPolicy::FILES_ALLOW_ANY,
614 exposed_dir.ToWStringHack().c_str()); 614 exposed_dir.value().c_str());
615 if (result != sandbox::SBOX_ALL_OK) 615 if (result != sandbox::SBOX_ALL_OK)
616 return 0; 616 return 0;
617 617
618 FilePath exposed_files = exposed_dir.AppendASCII("*"); 618 FilePath exposed_files = exposed_dir.AppendASCII("*");
619 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, 619 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
620 sandbox::TargetPolicy::FILES_ALLOW_ANY, 620 sandbox::TargetPolicy::FILES_ALLOW_ANY,
621 exposed_files.ToWStringHack().c_str()); 621 exposed_files.value().c_str());
622 if (result != sandbox::SBOX_ALL_OK) 622 if (result != sandbox::SBOX_ALL_OK)
623 return 0; 623 return 0;
624 } 624 }
625 625
626 if (!AddGenericPolicy(policy)) { 626 if (!AddGenericPolicy(policy)) {
627 NOTREACHED(); 627 NOTREACHED();
628 return 0; 628 return 0;
629 } 629 }
630 630
631 TRACE_EVENT_BEGIN("StartProcessWithAccess::LAUNCHPROCESS", 0, 0); 631 TRACE_EVENT_BEGIN("StartProcessWithAccess::LAUNCHPROCESS", 0, 0);
(...skipping 15 matching lines...) Expand all
647 647
648 // Help the process a little. It can't start the debugger by itself if 648 // Help the process a little. It can't start the debugger by itself if
649 // the process is in a sandbox. 649 // the process is in a sandbox.
650 if (child_needs_help) 650 if (child_needs_help)
651 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); 651 base::debug::SpawnDebuggerOnProcess(target.dwProcessId);
652 652
653 return process; 653 return process;
654 } 654 }
655 655
656 } // namespace sandbox 656 } // namespace sandbox
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/zip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698