OLD | NEW |
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 #ifndef BASE_SCOPED_HANDLE_H__ | 5 #ifndef BASE_SCOPED_HANDLE_WIN_H__ |
6 #define BASE_SCOPED_HANDLE_H__ | 6 #define BASE_SCOPED_HANDLE_WIN_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 | 12 |
13 // Used so we always remember to close the handle. Example: | 13 // Used so we always remember to close the handle. Example: |
14 // ScopedHandle hfile(CreateFile(...)); | 14 // ScopedHandle hfile(CreateFile(...)); |
15 // if (!hfile.Get()) | 15 // if (!hfile.Get()) |
16 // ...process error | 16 // ...process error |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 private: | 200 private: |
201 HGLOBAL glob_; | 201 HGLOBAL glob_; |
202 | 202 |
203 T* data_; | 203 T* data_; |
204 | 204 |
205 DISALLOW_EVIL_CONSTRUCTORS(ScopedHGlobal); | 205 DISALLOW_EVIL_CONSTRUCTORS(ScopedHGlobal); |
206 }; | 206 }; |
207 | 207 |
208 #endif // BASE_SCOPED_HANDLE_H__ | 208 #endif // BASE_SCOPED_HANDLE_WIN_H__ |
209 | 209 |
OLD | NEW |