OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "courgette/memory_allocator.h" | 5 #include "courgette/memory_allocator.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 | 11 |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // The file is created in the %TEMP% folder. | 16 // The file is created in the %TEMP% folder. |
17 // NOTE: Since the file will be used as backing for a memory allocation, | 17 // NOTE: Since the file will be used as backing for a memory allocation, |
18 // it will never be so big that size_t cannot represent its size. | 18 // it will never be so big that size_t cannot represent its size. |
19 base::File CreateTempFile() { | 19 base::File CreateTempFile() { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 if (mem) { | 127 if (mem) { |
128 ret = reinterpret_cast<TempMapping**>(mem)[-1]; | 128 ret = reinterpret_cast<TempMapping**>(mem)[-1]; |
129 } | 129 } |
130 DCHECK(ret); | 130 DCHECK(ret); |
131 return ret; | 131 return ret; |
132 } | 132 } |
133 | 133 |
134 } // namespace courgette | 134 } // namespace courgette |
135 | 135 |
136 #endif // OS_WIN | 136 #endif // OS_WIN |
OLD | NEW |