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

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

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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/kill_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('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/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
(...skipping 28 matching lines...) Expand all
39 process_.Set(other.process_.Take()); 39 process_.Set(other.process_.Take());
40 is_current_process_ = other.is_current_process_; 40 is_current_process_ = other.is_current_process_;
41 other.Close(); 41 other.Close();
42 return *this; 42 return *this;
43 } 43 }
44 44
45 // static 45 // static
46 Process Process::Current() { 46 Process Process::Current() {
47 Process process; 47 Process process;
48 process.is_current_process_ = true; 48 process.is_current_process_ = true;
49 return process.Pass(); 49 return process;
50 } 50 }
51 51
52 // static 52 // static
53 Process Process::Open(ProcessId pid) { 53 Process Process::Open(ProcessId pid) {
54 return Process(::OpenProcess(kBasicProcessAccess, FALSE, pid)); 54 return Process(::OpenProcess(kBasicProcessAccess, FALSE, pid));
55 } 55 }
56 56
57 // static 57 // static
58 Process Process::OpenWithExtraPrivileges(ProcessId pid) { 58 Process Process::OpenWithExtraPrivileges(ProcessId pid) {
59 DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ; 59 DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 return (::SetPriorityClass(Handle(), priority) != 0); 182 return (::SetPriorityClass(Handle(), priority) != 0);
183 } 183 }
184 184
185 int Process::GetPriority() const { 185 int Process::GetPriority() const {
186 DCHECK(IsValid()); 186 DCHECK(IsValid());
187 return ::GetPriorityClass(Handle()); 187 return ::GetPriorityClass(Handle());
188 } 188 }
189 189
190 } // namespace base 190 } // namespace base
OLDNEW
« no previous file with comments | « base/process/kill_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698