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

Unified Diff: base/win/scoped_process_information.h

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix delegate_execute for google_chrome_build Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/scoped_handle_unittest.cc ('k') | base/win/scoped_process_information.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_process_information.h
diff --git a/base/win/scoped_process_information.h b/base/win/scoped_process_information.h
index 1f404c2dbac77150f8279b1d25d037004f30207e..2e240544122f13b07c53b78543a13883e8c7b0f4 100644
--- a/base/win/scoped_process_information.h
+++ b/base/win/scoped_process_information.h
@@ -18,33 +18,10 @@ namespace win {
// structures. Allows clients to take ownership of either handle independently.
class BASE_EXPORT ScopedProcessInformation {
public:
- // Helper object to contain the effect of Receive() to the funtion that needs
- // a pointer.
- class Receiver {
- public:
- explicit Receiver(ScopedProcessInformation* owner)
- : info_(),
- owner_(owner) {}
- ~Receiver() { owner_->Set(info_); }
-
- operator PROCESS_INFORMATION*() { return &info_; }
-
- private:
- PROCESS_INFORMATION info_;
- ScopedProcessInformation* owner_;
- };
-
ScopedProcessInformation();
+ explicit ScopedProcessInformation(const PROCESS_INFORMATION& process_info);
~ScopedProcessInformation();
- // Returns an object that may be passed to API calls such as CreateProcess.
- // DCHECKs that the object is not currently holding any handles.
- // HANDLEs stored in the returned PROCESS_INFORMATION will be owned by this
- // instance.
- // The intended use case is something like this:
- // if (::CreateProcess(..., startup_info, scoped_proces_info.Receive()))
- Receiver Receive();
-
// Returns true iff this instance is holding a thread and/or process handle.
bool IsValid() const;
« no previous file with comments | « base/win/scoped_handle_unittest.cc ('k') | base/win/scoped_process_information.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698