summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-27 23:06:34 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-27 23:06:34 +0000
commit017022b726b9e1b7ceb022c3b046b0cadb0302f9 (patch)
tree7fb115ea6421413029ae4f35ca7b6d09fc66fc95 /base
parent0f9813550e8055faab81e77a9e134b3cff3aa3b3 (diff)
downloadchromium_src-017022b726b9e1b7ceb022c3b046b0cadb0302f9.zip
chromium_src-017022b726b9e1b7ceb022c3b046b0cadb0302f9.tar.gz
chromium_src-017022b726b9e1b7ceb022c3b046b0cadb0302f9.tar.bz2
Adding HTML5 DB support to Chromium: Chromium changes
BUG=none TEST=none Review URL: http://codereview.chromium.org/74001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/platform_file.h5
-rw-r--r--base/platform_file_win.cc6
2 files changed, 10 insertions, 1 deletions
diff --git a/base/platform_file.h b/base/platform_file.h
index 52484c7..a584d42 100644
--- a/base/platform_file.h
+++ b/base/platform_file.h
@@ -31,7 +31,10 @@ enum PlatformFileFlags {
PLATFORM_FILE_WRITE = 32,
PLATFORM_FILE_EXCLUSIVE_READ = 64, // EXCLUSIVE is opposite of Windows SHARE
PLATFORM_FILE_EXCLUSIVE_WRITE = 128,
- PLATFORM_FILE_ASYNC = 256
+ PLATFORM_FILE_ASYNC = 256,
+ PLATFORM_FILE_TEMPORARY = 512, // Used on Windows only
+ PLATFORM_FILE_HIDDEN = 1024, // Used on Windows only
+ PLATFORM_FILE_DELETE_ON_CLOSE = 2048 // Used on Windows only
};
// Creates or open the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 7624798..b389a16 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -47,6 +47,12 @@ PlatformFile CreatePlatformFile(const std::wstring& name,
DWORD create_flags = 0;
if (flags & PLATFORM_FILE_ASYNC)
create_flags |= FILE_FLAG_OVERLAPPED;
+ if (flags & PLATFORM_FILE_TEMPORARY)
+ create_flags |= FILE_ATTRIBUTE_TEMPORARY;
+ if (flags & PLATFORM_FILE_HIDDEN)
+ create_flags |= FILE_ATTRIBUTE_HIDDEN;
+ if (flags & PLATFORM_FILE_DELETE_ON_CLOSE)
+ create_flags |= FILE_FLAG_DELETE_ON_CLOSE;
HANDLE file = CreateFile(name.c_str(), access, sharing, NULL, disposition,
create_flags, NULL);