| OLD | NEW |
| 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 #ifndef BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ | 5 #ifndef BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ |
| 6 #define BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ | 6 #define BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include "base/process.h" | 8 #include "base/process.h" |
| 10 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 11 | 10 |
| 12 namespace base { | 11 namespace base { |
| 13 | 12 |
| 14 // A class that opens a process from its process id and closes it when the | 13 // A class that opens a process from its process id and closes it when the |
| 15 // instance goes out of scope. | 14 // instance goes out of scope. |
| 16 class ScopedOpenProcess { | 15 class ScopedOpenProcess { |
| 17 public: | 16 public: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 | 40 |
| 42 ProcessHandle handle() const { return handle_; } | 41 ProcessHandle handle() const { return handle_; } |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 ProcessHandle handle_; | 44 ProcessHandle handle_; |
| 46 DISALLOW_COPY_AND_ASSIGN(ScopedOpenProcess); | 45 DISALLOW_COPY_AND_ASSIGN(ScopedOpenProcess); |
| 47 }; | 46 }; |
| 48 } // namespace base | 47 } // namespace base |
| 49 | 48 |
| 50 #endif // BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ | 49 #endif // BASE_MEMORY_SCOPED_OPEN_PROCESS_H_ |
| OLD | NEW |