summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/file_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Disk cache: Remove all non essential synchronization from thervargas@google.com2012-03-201-3/+9
| | | | | | | | | | | | | | | | | | cache destructor. The default setting for unit tests is still to perform full synchronization so we make sure that all work is performed, and that there are no leaks. However, when not running unit tests, all in progress operations are simply dropped on the flor, so they should result in dirty entries for the next run. BUG=74623 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/9702059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127826 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind conversion for net/disk_cache/...adamk@chromium.org2011-10-201-2/+3
| | | | | | | | | R=willchan@chromium.org Review URL: http://codereview.chromium.org/8353019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106415 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-211-0/+1
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Use platform_file functions for POSIX.rvargas@google.com2011-09-071-6/+11
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7824027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99997 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: detect block files that are shorter than expectedrvargas@google.com2011-07-131-2/+3
| | | | | | | | | | and return a proper net error code from async IO. BUG=88968 TEST=net_unittests Review URL: http://codereview.chromium.org/7351007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92390 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Check for negative lseek return valies in disk_cache::File::GetLength.thestig@chromium.org2011-06-211-2/+4
| | | | | | | | | | BUG=none TEST=none CID=11651 Review URL: http://codereview.chromium.org/7218019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89925 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Make sure that file descriptors are valid before calling close().rvargas@google.com2011-02-101-1/+1
| | | | | | | | | BUG=71399 TEST=none Review URL: http://codereview.chromium.org/6490007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74486 0039d316-1c4b-4281-b951-d872f2087c98
* More net/ method ordering.erg@google.com2011-01-261-18/+18
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6339012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72710 0039d316-1c4b-4281-b951-d872f2087c98
* Move some misc thread-related stuff from base to base/thread and into the basebrettw@chromium.org2010-12-301-3/+3
| | | | | | | | | | namespace. This does not move the "hard" thread stuff (thread.h). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6079009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70315 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Cleanup file_posix so that it uses the latestrvargas@google.com2010-11-171-159/+74
| | | | | | | | | | | | version of InFlightIO & Co. BUG=55629 TEST=current tests. Review URL: http://codereview.chromium.org/4956001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66497 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 2thakis@chromium.org2010-11-021-3/+3
| | | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2826041 I then did quite a bit of manual editing to fix style issues. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4291001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64798 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-4/+4
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize data members in constructor.kmadhusu@chromium.org2010-10-181-1/+4
| | | | | | | | | | CID=1634, 11587, 5007, 13234, 13398, 9295, 8294, 8285 BUG=none TEST=none Review URL: http://codereview.chromium.org/3817007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62945 0039d316-1c4b-4281-b951-d872f2087c98
* Add an optional parameter to CreatePlatformFile() to report the typedumi@chromium.org2010-08-311-1/+1
| | | | | | | | | | | | 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
* Disk cache: Extend the internal buffering performed by each entryrvargas@google.com2010-08-231-23/+10
| | | | | | | | | | | | | | | | | | | | | | to cover external files. We now keep a variable-size buffer and use it even after we know that the data is not going to be stored by a block-file. The backend keeps track of the total memory used by all entries and prevents that value from going over a max value that depends on the total memory available. This CL removes the tests that were checking the synchronous operation of sparse IO because that model is no longer supported by the public API, and this CL would add complexity to them (they fail due to thread safety concerns). BUG=6626 TEST=net_unittests Review URL: http://codereview.chromium.org/3167020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57082 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-07-131-2/+11
| | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2945002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52185 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51858 - Disk cache: Switch the disk cache to use the cache_thread. rvargas@google.com2010-07-081-11/+2
| | | | | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2827043 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/2944002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51874 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Switch the disk cache to use the cache_thread. rvargas@google.com2010-07-081-2/+11
| | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2827043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51858 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51456 - Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-07-021-11/+2
| | | | | | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2841034 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/2881010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51469 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-07-011-2/+11
| | | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2841034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51456 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51312 - Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-07-011-11/+2
| | | | | | | | | | | | | | | | | | | (tsan errors on the unit tests) Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2829008 TBR=nsylvain@chromium.org Review URL: http://codereview.chromium.org/2819032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51325 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-06-301-2/+11
| | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2829008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51312 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some uses of scoped_ptr.release() in net/ such that the return value is ↵estade@chromium.org2010-05-041-2/+2
| | | | | | | | | | | | | not ignored. client_socket_pool_base.cc change contributed by vandebo@chromium BUG=42904 TEST=existing net tests/ Review URL: http://codereview.chromium.org/1756019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46409 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-2/+3
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix a race accessing a file's reference counterrvargas@google.com2009-10-211-3/+10
| | | | | | | | | | | from a worker thread. BUG=24307 TEST=current unit tests / valgrind Review URL: http://codereview.chromium.org/309001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29720 0039d316-1c4b-4281-b951-d872f2087c98
* Step 2 in porting disk cache to using FilePath.tony@chromium.org2009-10-121-1/+1
| | | | | | | | 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
* Disk cache: Implement asynchronous IO for Posix.rvargas@google.com2009-08-211-15/+258
| | | | | | | | | | BUG=16507 TEST=Unittests Review URL: http://codereview.chromium.org/173170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23990 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 23919 to investigate valgrind failures.rvargas@google.com2009-08-211-252/+15
| | | | | | | | | | | TBR=willchan TEST=none BUG=none Review URL: http://codereview.chromium.org/174205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23926 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Implement asynchronous IO for Posix.rvargas@google.com2009-08-211-15/+252
| | | | | | | | | | BUG=16507 TEST=Unittests Review URL: http://codereview.chromium.org/171085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23919 0039d316-1c4b-4281-b951-d872f2087c98
* initialize mixed_ in the File(PlatformFile) constructor variant.ericroman@google.com2009-03-201-1/+1
| | | | | | Review URL: http://codereview.chromium.org/42419 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12193 0039d316-1c4b-4281-b951-d872f2087c98
* * Add write and read/write support to FileStream (renamed from FileInputStream).erikkay@google.com2008-11-031-15/+17
| | | | | | | | * 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
* Fix a memory leak on the disk cache for posix.rvargas@google.com2008-09-181-0/+6
| | | | | | Review URL: http://codereview.chromium.org/3154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2393 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux buildbot breakage on BlockFiles_Grow due to lingering cache files.mmoss@google.com2008-09-091-2/+1
| | | | | | | | | | | | | | The buildbot was breaking because temporary cache files were being created under /tmp, like "/tmp/cache_test\data_*", rather than under /tmp/cache_test, like "/tmp/cache_test/data_*". This prevented the files from being cleaned up when /tmp/cache_test was deleted, and after a few runs, the max of 256 cache files was reached, and the tests failed when they couldn't create more. The following changes were made: - Replace '\' with platform-dependent path separator in various places. - Define constant (same as Windows) for invalid Linux file handle to fix error where wrong value was tested. - Force cache initialization in block_files tests, otherwise it fails to create cache files after calling DeleteCache(). BUG=1917 Review URL: http://codereview.chromium.org/1840 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1918 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sync IO for the disk cache, and temporarily redirectrvargas@google.com2008-08-271-14/+34
| | | | | | | async IO to be performed synchronously. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1414 0039d316-1c4b-4281-b951-d872f2087c98
* Move NOTIMPLEMENTED() macro from "base/notimplemented.h" into "base/logging.h".ericroman@google.com2008-08-251-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1300 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Second pass move the os dependent code apart on the disk cache.rvargas@google.com2008-08-151-0/+125
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@960 0039d316-1c4b-4281-b951-d872f2087c98