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

Side by Side Diff: base/process_win.cc

Issue 57062: Use portable typedef for PIDs (process IDs). (Closed)
Patch Set: speculative fix for win Created 11 years, 8 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_util_win.cc ('k') | chrome/common/chrome_process_filter.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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.h" 5 #include "base/process.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 bool Process::EmptyWorkingSet() { 102 bool Process::EmptyWorkingSet() {
103 if (!process_) 103 if (!process_)
104 return false; 104 return false;
105 105
106 BOOL rv = SetProcessWorkingSetSize(process_, -1, -1); 106 BOOL rv = SetProcessWorkingSetSize(process_, -1, -1);
107 return rv == TRUE; 107 return rv == TRUE;
108 } 108 }
109 109
110 int32 Process::pid() const { 110 ProcessId Process::pid() const {
111 if (process_ == 0) 111 if (process_ == 0)
112 return 0; 112 return 0;
113 113
114 return GetProcId(process_); 114 return GetProcId(process_);
115 } 115 }
116 116
117 bool Process::is_current() const { 117 bool Process::is_current() const {
118 return process_ == GetCurrentProcess(); 118 return process_ == GetCurrentProcess();
119 } 119 }
120 120
121 // static 121 // static
122 Process Process::Current() { 122 Process Process::Current() {
123 return Process(GetCurrentProcess()); 123 return Process(GetCurrentProcess());
124 } 124 }
125 125
126 } // namespace base 126 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/common/chrome_process_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698