summaryrefslogtreecommitdiff
path: root/courgette/memory_allocator.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-03-18 10:20:56 +0000
committerTorne (Richard Coles) <torne@google.com>2014-03-18 10:20:56 +0000
commita1401311d1ab56c4ed0a474bd38c108f75cb0cd9 (patch)
tree3437151d9ae1ce20a1e53a0d98c19ca01c786394 /courgette/memory_allocator.h
parentaf5066f1e36c6579e74752647e6c584438f80f94 (diff)
downloadchromium_org-a1401311d1ab56c4ed0a474bd38c108f75cb0cd9.tar.gz
Merge from Chromium at DEPS revision 257591
This commit was generated by merge_to_master.py. Change-Id: I0010df2ec3fbb5d4947cd026de2feb150ce7a6b5
Diffstat (limited to 'courgette/memory_allocator.h')
-rw-r--r--courgette/memory_allocator.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/courgette/memory_allocator.h b/courgette/memory_allocator.h
index d848915b5f..5386dad0d7 100644
--- a/courgette/memory_allocator.h
+++ b/courgette/memory_allocator.h
@@ -8,9 +8,9 @@
#include <memory>
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
-#include "base/platform_file.h"
#ifndef NDEBUG
@@ -57,30 +57,6 @@ namespace courgette {
#if defined(OS_WIN)
-// Manages a temporary file. The file is created in the %TEMP% folder and
-// is deleted when the file handle is closed.
-// NOTE: Since the file will be used as backing for a memory allocation,
-// it will never be so big that size_t cannot represent its size.
-class TempFile {
- public:
- TempFile();
- ~TempFile();
-
- bool Create();
- void Close();
- bool SetSize(size_t size);
-
- // Returns true iff the temp file is currently open.
- bool valid() const;
-
- // Returns the handle of the temporary file or INVALID_HANDLE_VALUE if
- // a temp file has not been created.
- base::PlatformFile handle() const;
-
- protected:
- base::PlatformFile file_;
-};
-
// Manages a read/write virtual mapping of a physical file.
class FileMapping {
public:
@@ -130,7 +106,7 @@ class TempMapping {
static TempMapping* GetMappingFromPtr(void* mem);
protected:
- TempFile file_;
+ base::File file_;
FileMapping mapping_;
};