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

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

Issue 323563005: Enable DirectWrite by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 g_target_services = target_services; 557 g_target_services = target_services;
558 return sandbox::SBOX_ALL_OK == result; 558 return sandbox::SBOX_ALL_OK == result;
559 } 559 }
560 560
561 bool ShouldUseDirectWrite() { 561 bool ShouldUseDirectWrite() {
562 // If the flag is currently on, and we're on Win7 or above, we enable 562 // If the flag is currently on, and we're on Win7 or above, we enable
563 // DirectWrite. Skia does not require the additions to DirectWrite in QFE 563 // DirectWrite. Skia does not require the additions to DirectWrite in QFE
564 // 2670838, so a Win7 check is sufficient. We do not currently attempt to 564 // 2670838, so a Win7 check is sufficient. We do not currently attempt to
565 // support Vista, where SP2 and the Platform Update are required. 565 // support Vista, where SP2 and the Platform Update are required.
566 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 566 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
567 return command_line.HasSwitch(switches::kEnableDirectWrite) && 567 return !command_line.HasSwitch(switches::kDisableDirectWrite) &&
568 base::win::GetVersion() >= base::win::VERSION_WIN7; 568 base::win::GetVersion() >= base::win::VERSION_WIN7;
569 } 569 }
570 570
571 base::ProcessHandle StartSandboxedProcess( 571 base::ProcessHandle StartSandboxedProcess(
572 SandboxedProcessLauncherDelegate* delegate, 572 SandboxedProcessLauncherDelegate* delegate,
573 CommandLine* cmd_line) { 573 CommandLine* cmd_line) {
574 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 574 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
575 std::string type_str = cmd_line->GetSwitchValueASCII(switches::kProcessType); 575 std::string type_str = cmd_line->GetSwitchValueASCII(switches::kProcessType);
576 576
577 TRACE_EVENT_BEGIN_ETW("StartProcessWithAccess", 0, type_str); 577 TRACE_EVENT_BEGIN_ETW("StartProcessWithAccess", 0, type_str);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 741 }
742 742
743 return false; 743 return false;
744 } 744 }
745 745
746 bool BrokerAddTargetPeer(HANDLE peer_process) { 746 bool BrokerAddTargetPeer(HANDLE peer_process) {
747 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 747 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
748 } 748 }
749 749
750 } // namespace content 750 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698