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

Side by Side Diff: content/common/sandbox_win.cc

Issue 212953007: Control DirectWrite from browser side, no RuntimeEnabledFeature any more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix no-sandbox Created 6 years, 9 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 "content/common/sandbox_win.h" 5 #include "content/common/sandbox_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (!disable_default_policy && !AddPolicyForSandboxedProcess(policy)) 647 if (!disable_default_policy && !AddPolicyForSandboxedProcess(policy))
648 return 0; 648 return 0;
649 649
650 if (type_str == switches::kRendererProcess) { 650 if (type_str == switches::kRendererProcess) {
651 if (ShouldUseDirectWrite()) { 651 if (ShouldUseDirectWrite()) {
652 AddDirectory(base::DIR_WINDOWS_FONTS, 652 AddDirectory(base::DIR_WINDOWS_FONTS,
653 NULL, 653 NULL,
654 true, 654 true,
655 sandbox::TargetPolicy::FILES_ALLOW_READONLY, 655 sandbox::TargetPolicy::FILES_ALLOW_READONLY,
656 policy); 656 policy);
657 // We do not automatically propagate this from the browser command line,
658 // and instead only add it when we're actually setting up the sandbox to
659 // work with DirectWrite.
660 cmd_line->AppendSwitch(switches::kEnableDirectWrite);
661 } 657 }
662 } else { 658 } else {
663 // Hack for Google Desktop crash. Trick GD into not injecting its DLL into 659 // Hack for Google Desktop crash. Trick GD into not injecting its DLL into
664 // this subprocess. See 660 // this subprocess. See
665 // http://code.google.com/p/chromium/issues/detail?id=25580 661 // http://code.google.com/p/chromium/issues/detail?id=25580
666 cmd_line->AppendSwitchASCII("ignored", " --type=renderer "); 662 cmd_line->AppendSwitchASCII("ignored", " --type=renderer ");
667 } 663 }
668 664
669 sandbox::ResultCode result; 665 sandbox::ResultCode result;
670 if (!exposed_dir.empty()) { 666 if (!exposed_dir.empty()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 } 762 }
767 763
768 return false; 764 return false;
769 } 765 }
770 766
771 bool BrokerAddTargetPeer(HANDLE peer_process) { 767 bool BrokerAddTargetPeer(HANDLE peer_process) {
772 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 768 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
773 } 769 }
774 770
775 } // namespace content 771 } // namespace content
OLDNEW
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/renderer/renderer_main_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698