Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Unified Diff: net/disk_cache/block_files.cc

Issue 8843: Add write and read/write support to FileStream (renamed from FileInputStream)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/block_files.cc
===================================================================
--- net/disk_cache/block_files.cc (revision 4450)
+++ net/disk_cache/block_files.cc (working copy)
@@ -196,10 +196,12 @@
bool BlockFiles::CreateBlockFile(int index, FileType file_type, bool force) {
std::wstring name = Name(index);
- int flags = force ? OS_FILE_CREATE_ALWAYS : OS_FILE_CREATE;
- flags |= OS_FILE_WRITE | OS_FILE_SHARE_READ;
+ int flags =
+ force ? base::PLATFORM_FILE_CREATE_ALWAYS : base::PLATFORM_FILE_CREATE;
+ flags |= base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE;
- scoped_refptr<File> file(new File(CreateOSFile(name.c_str(), flags, NULL)));
+ scoped_refptr<File> file(new File(
+ base::CreatePlatformFile(name.c_str(), flags, NULL)));
if (!file->IsValid())
return false;
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698