summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
* Disk cache: Add support for an extra data stream for each cache entry.rvargas@google.com2008-12-0410-70/+152
| | | | | | | | | | | | This is the first step to allow the http cache to store additional metadata for certain entries. The cache file format changes to version 2.0 so an effect of this cl is that the borwser will discard the old cache files. Review URL: http://codereview.chromium.org/12880 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6392 0039d316-1c4b-4281-b951-d872f2087c98
* * Cleanup: move base/platform_test.h -> testing/jeremy@chromium.org2008-12-022-2/+2
| | | | | | | | * Add support for "Debug On Start" switch to MultiprocessTest::SpawnChild Review URL: http://codereview.chromium.org/13052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6227 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a tool to upgrade a set of cache files from one version torvargas@google.com2008-12-024-54/+91
| | | | | | | | | another. Also moves crash_cache project to the "tools folder" on the solution. Review URL: http://codereview.chromium.org/12851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6226 0039d316-1c4b-4281-b951-d872f2087c98
* Port stress_cache tool.deanm@chromium.org2008-11-211-25/+57
| | | | | | | | BUG=4491 Review URL: http://codereview.chromium.org/11202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5862 0039d316-1c4b-4281-b951-d872f2087c98
* Some changes necessary to build an optimized binary on Linux.evanm@google.com2008-11-111-4/+7
| | | | | | | | | | | | | | | | | Two other speedup changes that I'm not including: root_env = Environment( tools = ['component_setup'], + RPATH=[], And linux_env.Tool('target_platform_linux') -linux_env.Tool('target_debug') +linux_env.Tool('target_optimized') Review URL: http://codereview.chromium.org/10292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5193 0039d316-1c4b-4281-b951-d872f2087c98
* * Revert "Por rt flush_cache tool."agl@chromium.org2008-11-111-17/+83
| | | | | | | | | This reverts commit 3bd600b37c5ee613c004c84736ee3cb69434562a. Review URL: http://codereview.chromium.org/9774 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5184 0039d316-1c4b-4281-b951-d872f2087c98
* Port flush_cache tool.agl@chromium.org2008-11-111-83/+17
| | | | | | | | | | BUG=4160 Review URL: http://codereview.chromium.org/9639 Patch from Paweł Hajdan jr. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5182 0039d316-1c4b-4281-b951-d872f2087c98
* Switch MessagePumpForIO to use completion ports on Windows.rvargas@google.com2008-11-077-199/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the separation between MessagePumpForUI and MessagePumpForIO, and convert the latter to use Completion Ports instead of MsgWaitForMultipleobjects to sleep when idle. Remove all traces of Windows messages from MessagePumpForIO, remove the transitional API of completion port notifications and remove WatchObject API. Modify all callers of RegisterIOHandler so that they are no longer using RegisterIOContext, and also handle properly the new semantics of completion ports (notifications even when the IO completes immediately). Add a new interface to allow proper cleanup of disk cache (to replace code that was waiting for pending APCs from the destructor). Add a way for the message pump to perform cleanup of abandoned IO. BUG=B/1344358, 3497, 3630 TESt=unit tests R=darin Review URL: http://codereview.chromium.org/8156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5021 0039d316-1c4b-4281-b951-d872f2087c98
* * Add write and read/write support to FileStream (renamed from FileInputStream).erikkay@google.com2008-11-0311-215/+76
| | | | | | | | * 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
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-2717-17/+44
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* This makes net_perftests build and run on Linux.evanm@google.com2008-10-131-1/+25
| | | | | | | | | | BUG=3065 Review URL: http://codereview.chromium.org/6080 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3298 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure there is only one instance of the stats histogram at a given time.rvargas@google.com2008-09-261-3/+7
| | | | | | | | | BUG=2805 Review URL: http://codereview.chromium.org/4292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2620 0039d316-1c4b-4281-b951-d872f2087c98
* Use histograms to send interesting parts of the disk cache statistics.rvargas@google.com2008-09-245-4/+156
| | | | | | | | | | | Most of this CL deals with a derived implementation of histograms that just queries the size stats already generated by the disk cache. The exact number of buckets, and their distribution, is controlled directly by the new class and the disk cache stats code. Review URL: http://codereview.chromium.org/3069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2580 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DeleteCache on POSIX. It wasn't successfully deleting before.evanm@google.com2008-09-231-7/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2468 0039d316-1c4b-4281-b951-d872f2087c98
* Fix AmountOfFreeDiskSpace to be able to differentiate an errorrvargas@google.com2008-09-201-1/+1
| | | | | | | | from a full disk. Review URL: http://codereview.chromium.org/4003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2431 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
* Move GetFreeDiskSpace to SysInfo.deanm@chromium.org2008-09-184-33/+2
| | | | | | | Patch from Pawel Hajdan Jr. Review URL: http://codereview.chromium.org/3141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2359 0039d316-1c4b-4281-b951-d872f2087c98
* Revision 2303 introduced AmountOfPhysicalMemory in SysInfo, so now ↵deanm@chromium.org2008-09-174-47/+2
| | | | | | | | | | GetSystemMemory in net/disk_cache/cache_util is redundant. Patch from Pawel Hajdan Jr. Review URL: http://codereview.chromium.org/3103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2306 0039d316-1c4b-4281-b951-d872f2087c98
* Mac/mach implementation of disk_cache::GetSystemMemory(). Patch by Kellymark@chromium.org2008-09-161-1/+14
| | | | | | | | | Norton <knorton@google.com>. http://codereview.chromium.org/3078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2258 0039d316-1c4b-4281-b951-d872f2087c98
* CreateDirectory() should check if an existing path is actually a directory ↵mmoss@google.com2008-09-111-1/+0
| | | | | | | | before skipping it. Also update a couple instances and comments to reflect current behaviour (see also http://codereview.chromium.org/1681). Review URL: http://codereview.chromium.org/1709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2060 0039d316-1c4b-4281-b951-d872f2087c98
* Implement GetFreeDiskSpace for POSIX and GetSystemMemory for Linux.mark@chromium.org2008-09-102-6/+31
| | | | | | | | | Patch by Paweł Hajdan jr <phajdan.jr@gmail.com> http://codereview.chromium.org/1891 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2007 0039d316-1c4b-4281-b951-d872f2087c98
* Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed outmark@chromium.org2008-09-101-2/+2
| | | | | | | | | | by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux buildbot breakage on BlockFiles_Grow due to lingering cache files.mmoss@google.com2008-09-097-19/+36
| | | | | | | | | | | | | | 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
* Replace all instances of <hash_map> with a "base/hash_tabe.h",erg@google.com2008-09-081-1/+0
| | | | | | | | | | | which does the right thing based on whatever platform we're compiling for, along with changing the hardcoded "stdext::", which is a MSVC++ism to use base::hash_{map,set}. B=1869 Review URL: http://codereview.chromium.org/1629 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1862 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member ↵darin@google.com2008-09-032-60/+35
| | | | | | | | | | | variables into the Task subclass. Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the mac build.rvargas@google.com2008-08-291-0/+2
| | | | | | | | TBR=pamg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1568 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing the comment that was not included with the last cl.rvargas@google.com2008-08-291-0/+5
| | | | | | | TBR=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1554 0039d316-1c4b-4281-b951-d872f2087c98
* Add another disk cache performance test.rvargas@google.com2008-08-291-0/+45
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1553 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Split deleting old entries from the cache into small chunks that ↵rvargas@google.com2008-08-292-3/+13
| | | | | | | | | | | | run through the message loop to improve responsiveness of the io thread. BUG=1345851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1552 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify OneShotTimer and RepeatingTimer. Fix up all consumers.darin@google.com2008-08-283-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | Major changes: OneShotTimer and RepeatingTimer become template classes that no longer require a Task or a Timer object. They just use PostDelayedTask. Under the hood that still uses a Timer object. The API is much simpler for consumers as they now no longer need to worry about allocating a Task or managing the lifetime of the object pointer held by the Task. I added some new unit tests to timer_unittest.cc to cover the API. I preserved the old TimerManager / Timer API for now, but I plan to soon kill it. R=brettw BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1502 0039d316-1c4b-4281-b951-d872f2087c98
* Run some disk cache unit tests on the Macmmentovai@google.com2008-08-289-34/+47
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1475 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the net_perftests to work again.darin@google.com2008-08-271-0/+2
| | | | | | | | | Since only one test needed a MessageLoop, I decided to only give that single test a MessageLoop. I used a MessageLoopForIO (subclass of MessageLoop) for future use when the disk cache leverages MessageLoopForIO for asynchronous IO. TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1428 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sync IO for the disk cache, and temporarily redirectrvargas@google.com2008-08-2711-57/+150
| | | | | | | async IO to be performed synchronously. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1414 0039d316-1c4b-4281-b951-d872f2087c98
* fix builddarin@google.com2008-08-261-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1367 0039d316-1c4b-4281-b951-d872f2087c98
* Move NOTIMPLEMENTED() macro from "base/notimplemented.h" into "base/logging.h".ericroman@google.com2008-08-254-4/+2
| | | | 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-2452-1456/+208
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Make sure we don't overwrite external files when creating new ones.rvargas@google.com2008-08-233-2/+27
| | | | | | | TEST=unit test git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1270 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Delete all files from the cache folder, instead of only thervargas@google.com2008-08-221-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files created by the cache. I changed the code that deletes the cache files from the unit tests to use the same code used by the cache itself to discard old caches. However, said code performs a selective deletion of files, and leave anything that it doesn't know about on the folder, and then attempts to remove the folder (knowing that it will fail if there are extra files or directories there). That causes a problem with the unit tests, because some of the tests create an extra file in that folder, so the folder cannot be deleted. As a result, we start accumulating extra folders until we reach our pre-defined limit, and at that time the tests start to fail. We could modify the code to also delete this extra file, but given that the whole cache lives under a hidden folder, it makes sense to simplify the code and just delete every file when we want to discard an old file. So this means that if a user decides to write a file to that folder, we will delete it whenever we update the cache version, or when the user chooses to "Clear browsing data/ cache". Note that if the foreign object is a directory, we won't delete it and it will be moved aside. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1244 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: add a delay after TruncateData unit test to wait for IO completions.rvargas@google.com2008-08-211-0/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1200 0039d316-1c4b-4281-b951-d872f2087c98
* Fix WaitForPendingIO to actually exit the wait at some point.rvargas@google.com2008-08-214-6/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1143 0039d316-1c4b-4281-b951-d872f2087c98
* Make the disk cache unit tests use some common code from the disk cache.rvargas@google.com2008-08-211-10/+11
| | | | | | | | In particular, this removes the last piece of code on the disk cache that uses SHFileOperation. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1135 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some more warnings.evanm@google.com2008-08-202-2/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1127 0039d316-1c4b-4281-b951-d872f2087c98
* Remove warnings for the net module.rvargas@google.com2008-08-192-3/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1067 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up warnings in net/avi@google.com2008-08-197-9/+11
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1048 0039d316-1c4b-4281-b951-d872f2087c98
* Second pass move the os dependent code apart on the disk cache.rvargas@google.com2008-08-1512-34/+261
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@960 0039d316-1c4b-4281-b951-d872f2087c98
* Large patch set (159 files total) to cleanup the includes.maruel@google.com2008-08-152-7/+11
| | | | | | | | | | - Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
* Fix utilities that were broken by at_exit changes.rvargas@google.com2008-08-141-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@892 0039d316-1c4b-4281-b951-d872f2087c98
* Use %ls instead of %s in wprintf format strings for wchar_t fields.mmentovai@google.com2008-08-143-4/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
* Move remaining OS dependent bits from the main logic on the disk cache.rvargas@google.com2008-08-1319-150/+535
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@819 0039d316-1c4b-4281-b951-d872f2087c98
* Re submitting the histograms change (735)rvargas@google.com2008-08-124-0/+40
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@763 0039d316-1c4b-4281-b951-d872f2087c98