| 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_SCOPED_HANDLE_H_ | 5 #ifndef BASE_MEMORY_SCOPED_HANDLE_H_ |
| 6 #define BASE_SCOPED_HANDLE_H_ | 6 #define BASE_MEMORY_SCOPED_HANDLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 class ScopedStdioHandle { | 13 class ScopedStdioHandle { |
| 14 public: | 14 public: |
| 15 ScopedStdioHandle() | 15 ScopedStdioHandle() |
| 16 : handle_(NULL) { } | 16 : handle_(NULL) { } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 Close(); | 41 Close(); |
| 42 handle_ = newhandle; | 42 handle_ = newhandle; |
| 43 } | 43 } |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 FILE* handle_; | 46 FILE* handle_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(ScopedStdioHandle); | 48 DISALLOW_COPY_AND_ASSIGN(ScopedStdioHandle); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // BASE_SCOPED_HANDLE_H_ | 51 #endif // BASE_MEMORY_SCOPED_HANDLE_H_ |
| OLD | NEW |