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

Side by Side Diff: base/process/process_win.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « base/process/process_posix.cc ('k') | base/test/BUILD.gn » ('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 "base/process/process.h" 5 #include "base/process/process.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 process.is_current_process_ = true; 47 process.is_current_process_ = true;
48 return process.Pass(); 48 return process.Pass();
49 } 49 }
50 50
51 // static 51 // static
52 Process Process::Open(ProcessId pid) { 52 Process Process::Open(ProcessId pid) {
53 return Process(::OpenProcess(kBasicProcessAccess, FALSE, pid)); 53 return Process(::OpenProcess(kBasicProcessAccess, FALSE, pid));
54 } 54 }
55 55
56 // static 56 // static
57 Process Process::OpenWithExtraPriviles(ProcessId pid) { 57 Process Process::OpenWithExtraPrivileges(ProcessId pid) {
58 DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ; 58 DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ;
59 return Process(::OpenProcess(access, FALSE, pid)); 59 return Process(::OpenProcess(access, FALSE, pid));
60 } 60 }
61 61
62 // static 62 // static
63 Process Process::OpenWithAccess(ProcessId pid, DWORD desired_access) { 63 Process Process::OpenWithAccess(ProcessId pid, DWORD desired_access) {
64 return Process(::OpenProcess(desired_access, FALSE, pid)); 64 return Process(::OpenProcess(desired_access, FALSE, pid));
65 } 65 }
66 66
67 // static 67 // static
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 return (::SetPriorityClass(Handle(), priority) != 0); 187 return (::SetPriorityClass(Handle(), priority) != 0);
188 } 188 }
189 189
190 int Process::GetPriority() const { 190 int Process::GetPriority() const {
191 DCHECK(IsValid()); 191 DCHECK(IsValid());
192 return ::GetPriorityClass(Handle()); 192 return ::GetPriorityClass(Handle());
193 } 193 }
194 194
195 } // namespace base 195 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_posix.cc ('k') | base/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698