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

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

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 4 years, 12 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 | « content/common/sandbox_win.h ('k') | sandbox/linux/bpf_dsl/bpf_dsl.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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 if (command_line.HasSwitch(switches::kEnableAppContainer)) 552 if (command_line.HasSwitch(switches::kEnableAppContainer))
553 return true; 553 return true;
554 return base::StartsWith(appcontainer_group_name, "Enabled", 554 return base::StartsWith(appcontainer_group_name, "Enabled",
555 base::CompareCase::INSENSITIVE_ASCII); 555 base::CompareCase::INSENSITIVE_ASCII);
556 } 556 }
557 557
558 } // namespace 558 } // namespace
559 559
560 void SetJobLevel(const base::CommandLine& cmd_line, 560 void SetJobLevel(const base::CommandLine& cmd_line,
561 sandbox::JobLevel job_level, 561 sandbox::JobLevel job_level,
562 uint32 ui_exceptions, 562 uint32_t ui_exceptions,
563 sandbox::TargetPolicy* policy) { 563 sandbox::TargetPolicy* policy) {
564 if (ShouldSetJobLevel(cmd_line)) { 564 if (ShouldSetJobLevel(cmd_line)) {
565 #ifdef _WIN64 565 #ifdef _WIN64
566 policy->SetJobMemoryLimit(4ULL * 1024 * 1024 * 1024); 566 policy->SetJobMemoryLimit(4ULL * 1024 * 1024 * 1024);
567 #endif 567 #endif
568 policy->SetJobLevel(job_level, ui_exceptions); 568 policy->SetJobLevel(job_level, ui_exceptions);
569 } else { 569 } else {
570 policy->SetJobLevel(sandbox::JOB_NONE, 0); 570 policy->SetJobLevel(sandbox::JOB_NONE, 0);
571 } 571 }
572 } 572 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 } 851 }
852 852
853 return false; 853 return false;
854 } 854 }
855 855
856 bool BrokerAddTargetPeer(HANDLE peer_process) { 856 bool BrokerAddTargetPeer(HANDLE peer_process) {
857 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 857 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
858 } 858 }
859 859
860 } // namespace content 860 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_win.h ('k') | sandbox/linux/bpf_dsl/bpf_dsl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698