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

Side by Side Diff: base/process/process.h

Issue 1407443002: Remove old C++03 move emulation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef BASE_PROCESS_PROCESS_H_ 5 #ifndef BASE_PROCESS_PROCESS_H_
6 #define BASE_PROCESS_PROCESS_H_ 6 #define BASE_PROCESS_PROCESS_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/move.h" 10 #include "base/move.h"
(...skipping 14 matching lines...) Expand all
25 // claim to be valid. The actual behavior in that case is OS dependent like so: 25 // claim to be valid. The actual behavior in that case is OS dependent like so:
26 // 26 //
27 // Windows: The underlying ProcessHandle will be valid after the process dies 27 // Windows: The underlying ProcessHandle will be valid after the process dies
28 // and can be used to gather some information about that process, but most 28 // and can be used to gather some information about that process, but most
29 // methods will obviously fail. 29 // methods will obviously fail.
30 // 30 //
31 // POSIX: The underlying PorcessHandle is not guaranteed to remain valid after 31 // POSIX: The underlying PorcessHandle is not guaranteed to remain valid after
32 // the process dies, and it may be reused by the system, which means that it may 32 // the process dies, and it may be reused by the system, which means that it may
33 // end up pointing to the wrong process. 33 // end up pointing to the wrong process.
34 class BASE_EXPORT Process { 34 class BASE_EXPORT Process {
35 MOVE_ONLY_TYPE_FOR_CPP_03(Process, RValue) 35 MOVE_ONLY_TYPE_FOR_CPP_03(Process)
36 36
37 public: 37 public:
38 explicit Process(ProcessHandle handle = kNullProcessHandle); 38 explicit Process(ProcessHandle handle = kNullProcessHandle);
39 39
40 // Move constructor for C++03 move emulation of this type. 40 Process(Process&& other);
41 Process(RValue other);
42 41
43 // The destructor does not terminate the process. 42 // The destructor does not terminate the process.
44 ~Process(); 43 ~Process();
45 44
46 // Move operator= for C++03 move emulation of this type. 45 Process& operator=(Process&& other);
47 Process& operator=(RValue other);
48 46
49 // Returns an object for the current process. 47 // Returns an object for the current process.
50 static Process Current(); 48 static Process Current();
51 49
52 // Returns a Process for the given |pid|. 50 // Returns a Process for the given |pid|.
53 static Process Open(ProcessId pid); 51 static Process Open(ProcessId pid);
54 52
55 // Returns a Process for the given |pid|. On Windows the handle is opened 53 // Returns a Process for the given |pid|. On Windows the handle is opened
56 // with more access rights and must only be used by trusted code (can read the 54 // with more access rights and must only be used by trusted code (can read the
57 // address space and duplicate handles). 55 // address space and duplicate handles).
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool is_current_process_; 128 bool is_current_process_;
131 win::ScopedHandle process_; 129 win::ScopedHandle process_;
132 #else 130 #else
133 ProcessHandle process_; 131 ProcessHandle process_;
134 #endif 132 #endif
135 }; 133 };
136 134
137 } // namespace base 135 } // namespace base
138 136
139 #endif // BASE_PROCESS_PROCESS_H_ 137 #endif // BASE_PROCESS_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698