summaryrefslogtreecommitdiffstats
path: root/base/platform_file_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* GetPlatformFileInfo was always never returning directorycpu@chromium.org2011-12-291-1/+1
| | | | | | | | | | | - Because relational operators have higher precedence than bitwise operators BUG=none TEST=unittest included Review URL: http://codereview.chromium.org/9004052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115998 0039d316-1c4b-4281-b951-d872f2087c98
* FileStream unit tests now check for file close.ahendrickson@chromium.org2011-10-101-1/+1
| | | | | | | | | | | | | willchan: base/platform_file_win.cc has a comment correction. others: net/base/file_stream_unittest.cc BUG=None TEST=None Review URL: http://codereview.chromium.org/8112006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104691 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Change ReadPlatformFile to perform a bestrvargas@google.com2011-09-011-0/+5
| | | | | | | | | | | | | | | effort read of the requested data, and add another function (ReadPlatformFileNoBestEffort) that just forwards the call to the OS. Now ReadPlatformFile and WritePlatformFile behave the same way. BUG=none TEST=base_unittests Review URL: http://codereview.chromium.org/7821013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99264 0039d316-1c4b-4281-b951-d872f2087c98
* Add a flag to open files in share delete modejochen@chromium.org2011-06-221-0/+2
| | | | | | | | | | BUG=86928 TEST=base_unittests Review URL: http://codereview.chromium.org/7233007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90071 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PP_FileOpenFlags_Dev handling:yzshen@chromium.org2011-05-231-1/+1
| | | | | | | | | | | | | | | - rewrite the mapping from PP_FileOpenFlags_Dev to PlatformFileFlags. - let ppb_flash_file_impl and ppb_file_io_impl use the same mapping logic. - CreatePlatformFile: resolve the conflict between the win and posix implementation. Before this change, the win implementation didn't allow PLATFORM_FILE_TRUNCATE to be used with any of the (OPEN|CREATE)(_ALWAYS)? flags; while the posix implementation required it to be used with them. - add more test cases to test the behavior of different PP_FileOpenFlags_Dev combinations. - also unify the conversion from PlatformFileError to Pepper error. BUG=68489 TEST=New test cases in test_file_io.cc Review URL: http://codereview.chromium.org/7038032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86349 0039d316-1c4b-4281-b951-d872f2087c98
* ObfuscatedFileSystemFileUtil classericu@google.com2011-05-131-1/+3
| | | | | | | | | | This is functional and reasonably well-tested, but we'll still have to adapt the system a bit in order to use it. BUG=none TEST=included unit tests Review URL: http://codereview.chromium.org/6955013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85332 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstring method from PlatformFileevan@chromium.org2011-03-131-6/+0
| | | | | | | | It appears to be unused. Review URL: http://codereview.chromium.org/6646036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77974 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-011-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* Some additions to support symlinks better on platforms that support them.gspencer@chromium.org2010-11-301-0/+1
| | | | | | | | | BUG=none TEST=Ran new unit test, passed trybots. Review URL: http://codereview.chromium.org/5349007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67631 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on file access checks on Win.jam@chromium.org2010-11-041-0/+10
| | | | | | | | | BUG=60211 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64960 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65075 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 64960 - Turn on file access checks on Win.rafaelw@chromium.org2010-11-031-10/+0
| | | | | | | | | | BUG=60211 Review URL: http://codereview.chromium.org/4222005 TBR=jam@chromium.org Review URL: http://codereview.chromium.org/4431001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64974 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on file access checks on Win.jam@chromium.org2010-11-031-0/+10
| | | | | | | BUG=60211 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64960 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FileUtilProxy::Create to EnsureFileExistskinuko@chromium.org2010-10-151-2/+2
| | | | | | | | | | | | | | | | | | per follow-up discussion on http://codereview.chromium.org/3717001/show Rename FileUtilProxy::Create to EnsureFileExists to make it clear that it doesn't open the file (or doesn't leave a file handle opened). Also fixes CreatePlatformFile to set |created| correctly when PLATFORM_FILE_CREATE flag is given (I think this is the correct behavior). BUG=none TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62683 0039d316-1c4b-4281-b951-d872f2087c98
* Add a TouchFile() function that takes a FilePath argument.dumi@chromium.org2010-09-231-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3496005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60381 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add a TouchFile function that operates on FilePaths + fixing a bug"maruel@chromium.org2010-09-231-2/+2
| | | | | | | | | | | | This reverts commit 60322. TBR=dumi TEST=none BUG=none Review URL: http://codereview.chromium.org/3439019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60327 0039d316-1c4b-4281-b951-d872f2087c98
* Add a TouchFile function that operates on FilePaths + fixing a bugdumi@chromium.org2010-09-231-2/+2
| | | | | | | | | | | related to FILE_WRITE_ATTRIBUTES on Windows. BUG=none TEST=FileUtilTest::TouchFile Review URL: http://codereview.chromium.org/3404018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60322 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some functions that operate on file handles.dumi@chromium.org2010-09-101-21/+128
| | | | | | | | | | TEST=platform_file_unittest.cc BUG=none TBR=darin Review URL: http://codereview.chromium.org/3354020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59041 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59007 - Adding some utility functions that work on file handles, and ↵dumi@chromium.org2010-09-091-128/+21
| | | | | | | | | | | | | | | | | adding the corresponding relays to file_util_proxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/3303007 TBR=dumi@chromium.org Review URL: http://codereview.chromium.org/3371011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59013 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some utility functions that work on file handles, and addingdumi@chromium.org2010-09-091-21/+128
| | | | | | | | | | | | the corresponding relays to file_util_proxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/3303007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59007 0039d316-1c4b-4281-b951-d872f2087c98
* Add an optional parameter to CreatePlatformFile() to report the typedumi@chromium.org2010-08-311-2/+30
| | | | | | | | | | | | of error that occured while trying to open/create a file. TEST=none BUG=none Review URL: http://codereview.chromium.org/3223007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58045 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 42152 - Fix the case where the browser livelocks if we cannot open a ↵vandebo@chromium.org2010-03-191-8/+0
| | | | | | | | | | | | | | | | | | | | | | file. If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. BUG=30850 Review URL: http://codereview.chromium.org/541022 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/1145004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42154 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the case where the browser livelocks if we cannot open a file.vandebo@chromium.org2010-03-191-0/+8
| | | | | | | | | | | | | | | | | If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. BUG=30850 Review URL: http://codereview.chromium.org/541022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42152 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix the case where the browser livelocks if we cannot open a file."agl@chromium.org2010-03-011-8/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40291 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the case where the browser livelocks if we cannot open a file.agl@chromium.org2010-02-261-0/+8
| | | | | | | | | | | | | | | | | | | | If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. (Land attempt three: first in r39446, reverted in r39448. Second in r39899, reverted in r39901.) http://codereview.chromium.org/541022 BUG=30850 TEST=Try to upload a file that isn't readable (i.e. /etc/shadow). The resulting upload should be a 0 byte file. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40146 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix the case where the browser livelocks if we cannot open a file."agl@chromium.org2010-02-241-8/+0
| | | | | | (Still breaks Mac net_unittests. Damm you Mac.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39901 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the case where the browser livelocks if we cannot open a file.agl@chromium.org2010-02-241-0/+8
| | | | | | | | | | | | | | | | | | | If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. (Land attempt two: first in r39446, reverted in r39448) http://codereview.chromium.org/541022 BUG=30850 TEST=Try to upload a file that isn't readable (i.e. /etc/shadow). The resulting upload should be a 0 byte file. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39899 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r39446: "Fix the case where the browser livelocks if we cannot open a ↵agl@chromium.org2010-02-191-8/+0
| | | | | | | | file." This somehow broke net_unittests on the Mac. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39448 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the case where the browser livelocks if we cannot open a file.agl@chromium.org2010-02-191-0/+8
| | | | | | | | | | | | | | | | | If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. http://codereview.chromium.org/541022 BUG=30850 TEST=Try to upload a file that isn't readable (i.e. /etc/shadow). The resulting upload should be a 0 byte file. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39446 0039d316-1c4b-4281-b951-d872f2087c98
* Step 2 in porting disk cache to using FilePath.tony@chromium.org2009-10-121-3/+9
| | | | | | | | BUG=24444 Review URL: http://codereview.chromium.org/270066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28742 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium side patch for DB support on Linux.dumi@chromium.org2009-08-281-0/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/174232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24807 0039d316-1c4b-4281-b951-d872f2087c98
* Adding HTML5 DB support to Chromium: Chromium changesdumi@chromium.org2009-07-271-0/+6
| | | | | | | | | 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
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in base/. All files end in a single newline. Review URL: http://codereview.chromium.org/42011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
* * Add write and read/write support to FileStream (renamed from FileInputStream).erikkay@google.com2008-11-031-0/+63
* Moved net/disk_cache/os_file to base/platform_file. Review URL: http://codereview.chromium.org/8843 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4454 0039d316-1c4b-4281-b951-d872f2087c98