| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ | 5 #ifndef SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ |
| 6 #define SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ | 6 #define SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <io.h> | 9 #include <io.h> |
| 10 #include "base/basictypes.h" | |
| 11 | 10 |
| 12 #include "base/macros.h" | 11 #include "base/macros.h" |
| 13 | 12 |
| 14 // Class to convert a HANDLE to a FILE *. The FILE * is closed when the | 13 // Class to convert a HANDLE to a FILE *. The FILE * is closed when the |
| 15 // object goes out of scope | 14 // object goes out of scope |
| 16 class HandleToFile { | 15 class HandleToFile { |
| 17 public: | 16 public: |
| 18 HandleToFile() { | 17 HandleToFile() { |
| 19 file_ = NULL; | 18 file_ = NULL; |
| 20 }; | 19 }; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return file_; | 57 return file_; |
| 59 }; | 58 }; |
| 60 private: | 59 private: |
| 61 // the FILE* returned. We need to closed it at the end. | 60 // the FILE* returned. We need to closed it at the end. |
| 62 FILE* file_; | 61 FILE* file_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(HandleToFile); | 63 DISALLOW_COPY_AND_ASSIGN(HandleToFile); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 #endif // SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ | 66 #endif // SANDBOX_SANDBOX_POC_POCDLL_UTILS_H__ |
| OLD | NEW |