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

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

Issue 1258173002: Changing command line flag from disable appcontainer to enable appcontainer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('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 "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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 base::string16 object_path = PrependWindowsSessionPath( 574 base::string16 object_path = PrependWindowsSessionPath(
575 L"\\BaseNamedObjects\\windows_shell_global_counters"); 575 L"\\BaseNamedObjects\\windows_shell_global_counters");
576 policy->AddKernelObjectToClose(L"Section", object_path.data()); 576 policy->AddKernelObjectToClose(L"Section", object_path.data());
577 } 577 }
578 578
579 void AddAppContainerPolicy(sandbox::TargetPolicy* policy, const wchar_t* sid) { 579 void AddAppContainerPolicy(sandbox::TargetPolicy* policy, const wchar_t* sid) {
580 if (base::win::GetVersion() == base::win::VERSION_WIN8 || 580 if (base::win::GetVersion() == base::win::VERSION_WIN8 ||
581 base::win::GetVersion() == base::win::VERSION_WIN8_1) { 581 base::win::GetVersion() == base::win::VERSION_WIN8_1) {
582 const base::CommandLine& command_line = 582 const base::CommandLine& command_line =
583 *base::CommandLine::ForCurrentProcess(); 583 *base::CommandLine::ForCurrentProcess();
584 if (!command_line.HasSwitch(switches::kDisableAppContainer)) { 584 if (command_line.HasSwitch(switches::kEnableAppContainer)) {
585 policy->SetLowBox(sid); 585 policy->SetLowBox(sid);
586 } 586 }
587 } 587 }
588 } 588 }
589 589
590 bool InitBrokerServices(sandbox::BrokerServices* broker_services) { 590 bool InitBrokerServices(sandbox::BrokerServices* broker_services) {
591 // TODO(abarth): DCHECK(CalledOnValidThread()); 591 // TODO(abarth): DCHECK(CalledOnValidThread());
592 // See <http://b/1287166>. 592 // See <http://b/1287166>.
593 DCHECK(broker_services); 593 DCHECK(broker_services);
594 DCHECK(!g_broker_services); 594 DCHECK(!g_broker_services);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } 845 }
846 846
847 return false; 847 return false;
848 } 848 }
849 849
850 bool BrokerAddTargetPeer(HANDLE peer_process) { 850 bool BrokerAddTargetPeer(HANDLE peer_process) {
851 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 851 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
852 } 852 }
853 853
854 } // namespace content 854 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698