summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
* Disk cache: Allow the disk cache histograms to generatervargas@google.com2010-05-112-10/+71
| | | | | | | | | | | | | more than one name so that we can move a user from one group to another within the same session. BUG=none TEST=unittest Review URL: http://codereview.chromium.org/2044007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46931 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using TimeTicks for profiling and histogramsjar@chromium.org2010-05-101-1/+0
| | | | | | | | | | | Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some uses of scoped_ptr.release() in net/ such that the return value is ↵estade@chromium.org2010-05-042-6/+5
| | | | | | | | | | | | | 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
* Disk cache: Re-enable some unit tests that were disabledrvargas@google.com2010-04-301-13/+6
| | | | | | | | | | | or marked as flaky. BUG=21110,38562 TEST=unittests Review URL: http://codereview.chromium.org/1800010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46084 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: fix a unit test for Linux.rvargas@google.com2010-04-301-4/+1
| | | | | | | | | | | The name of a test file was not correct. BUG=41563 TEST=unittest Review URL: http://codereview.chromium.org/1792011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46020 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add support for a dedicated cache thread.rvargas@google.com2010-04-292-10/+13
| | | | | | | | | | | | This is an interface-only change, nothing is really moving to another thread yet. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/983007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45974 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Make sure that we don't access the index filervargas@google.com2010-04-283-2/+26
| | | | | | | | | | | | if it was truncated. BUG=41563 TEST=unittest Review URL: http://codereview.chromium.org/1719024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45878 0039d316-1c4b-4281-b951-d872f2087c98
* Make PreferredCacheSize(avail) <= avail*0.8 and f(x) <= f(x+1). nsylvain@chromium.org2010-04-062-38/+60
| | | | | | | | | | | | | Contributed by slamm@google.com BUG=40079 TEST=DiskCacheTest.AutomaticMaxSize http://codereview.chromium.org/1564007 Review URL: http://codereview.chromium.org/1566021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43749 0039d316-1c4b-4281-b951-d872f2087c98
* Change NOTREACHED for a LOG(WARNING) when we can't deletensylvain@chromium.org2010-04-021-4/+8
| | | | | | | | | the cache. This should help the unit tests. BUG:38562 Review URL: http://codereview.chromium.org/1594002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43446 0039d316-1c4b-4281-b951-d872f2087c98
* Disable more DiskCacheBackendTest's as the crash on Linux/shlibtimurrrr@chromium.org2010-03-311-2/+4
| | | | | | | | TBR=rvargas,amit BUG=38562 Review URL: http://codereview.chromium.org/1546007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43213 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling the DiskCacheBackendTest.NewEvictionDisableFailure2 as it crashes ↵timurrrr@chromium.org2010-03-301-1/+2
| | | | | | | | | | on Linux/shlib BUG=38562 TBR=amit Review URL: http://codereview.chromium.org/1593001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43077 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling the DiskCacheBackendTest.DisableFailure2 as it crashes at times on ↵timurrrr@chromium.org2010-03-301-1/+2
| | | | | | | | | | Linux TBR=amit BUG=38562 Review URL: http://codereview.chromium.org/1592002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43074 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling the DiskCacheBackendTest.DisableSuccess2 as it crashes at times on ↵ananta@chromium.org2010-03-291-1/+2
| | | | | | | | | | | Linux Bug=38562 TBR=amit Review URL: http://codereview.chromium.org/1530007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42978 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache" Convert some of the unit tests to the newrvargas@google.com2010-03-184-171/+231
| | | | | | | | | | | disk cache interface (async) BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/1135002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42031 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache: Migrate to the DiskCache's async interface and use the ↵michaeln@chromium.org2010-03-172-0/+13
| | | | | | | | | | | CacheType::APP_CACHE value. BUG=38273 TEST=existing layout tests and unit tests apply Review URL: http://codereview.chromium.org/886003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41884 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Make sure that we don't oveload the IO messagervargas@google.com2010-03-152-3/+9
| | | | | | | | | | | | loop when there are (active) doomed entries that we want to remove from the "deleted" list. BUG=32119 TEST=unittests Review URL: http://codereview.chromium.org/969002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41657 0039d316-1c4b-4281-b951-d872f2087c98
* Use CHECK_* in netwillchan@chromium.org2010-03-021-1/+2
| | | | | | Review URL: http://codereview.chromium.org/660404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40453 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Use TimeTicks instead of Time for some of thervargas@google.com2010-02-227-26/+32
| | | | | | | | | | | cache histograms. BUG=14193 TEST=none Review URL: http://codereview.chromium.org/650068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39654 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Delete the disk cache if it is substantially biggerrvargas@google.com2010-02-193-18/+41
| | | | | | | | | | | | | | | | | | than the desired max size, and adjust eviction to avoid having long periods without it. There's a few users with caches that are too big, and it looks like the problem is that eviction could be stopped forever, while still adding new items to the cache. Now we only allow one minute (at a time) with eviction suspended. BUG=none TEST=none Review URL: http://codereview.chromium.org/647054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39407 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Remove some dead code.rvargas@google.com2010-02-111-9/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/598074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38818 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Use asynchronous Open/Create/Doom entry calls.rvargas@google.com2010-01-145-0/+25
| | | | | | | | | | | | | | | | More changes to the state machine: now we really issue asynchronous calls when getting new cache entries. We have to add a new serialization mechanism to the http cache in order to handle races among multiple requests creating and opening the same entry. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/523019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36211 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup histogram classes mixing SetFlags into FactoryGet argumentsjar@chromium.org2009-12-281-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Generic cleanup of histogram class, renaming *FactoryGet to FactoryGet, along with reformatting. The macros were cleaned up to use common sub-macros rather than repeating code as much. Removed ThreadSafeHistogram (and associated ASSET_HISTOGRAM macros) since this class was not getting used. I introduced UMA_HISTOGRAM_ENUMERATION to support the common use of LinearHistograms to count various enumerated values. I added a Flags argument to all the FactoryGet routines to help avoid needing to call SetFlags each time a new sample is Add()ed. This also simplifies the code. This will all help prepare for a "don't histogram at all" macro setting so that I can test the impact of the histogram macro calls on performance (since there are now so many active histograms). BUG=31206 r=raman.tenneti Review URL: http://codereview.chromium.org/515033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35295 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a test to make sure that the cachervargas@google.com2009-12-184-34/+8
| | | | | | | | | | | | | | | | works as expected with synchronous responses. As an added bonus, now changing the default test mode of kRangeGET_TransactionOK doesn't end up with some tests hanging, so it is easy to manually verify that all tests work as expected. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/501099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34914 0039d316-1c4b-4281-b951-d872f2087c98
* Use factory to create histograms, and refcounts to track lifetimesjar@chromium.org2009-12-065-7/+53
| | | | | | | | | | | | | | | This is CL patch 377028 by Raman Tenneti, with minor changes to make the try-bots happier. It is cleanup that better ensures lifetimes of histograms (making it harder for users to abuse them). bug=16495 (repairs leak induced by the first landing) bug=18840 (should make leaks less possible) tbr=raman.tenneti Review URL: http://codereview.chromium.org/462027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33933 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-2/+3
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer overflow in calculation of sparse I/O extent.cevans@chromium.org2009-11-101-1/+1
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/372076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31532 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-053-4/+7
| | | | | | | | 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: New interface that enables asynchronous completionrvargas@google.com2009-11-059-6/+239
| | | | | | | | | | | of any operation that may block. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/355028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31160 0039d316-1c4b-4281-b951-d872f2087c98
* Don't hang during DiskCacheEntryTest.CancelSparseIO on infinitely fast disks.dkegel@google.com2009-10-281-1/+9
| | | | | | Review URL: http://codereview.chromium.org/341006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30291 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated CommandLine(std::wstring) ctor.evan@chromium.org2009-10-261-1/+1
| | | | | | | | | | | Add a ctor for creating a CommandLine for carrying arguments; convert all the users to either that or the FilePath version. BUG=24672 Review URL: http://codereview.chromium.org/329017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30117 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
* Mark some disabled tests as flaky to increase test coverage.phajdan.jr@chromium.org2009-10-161-3/+3
| | | | | | | | | | | | When a test doesn't hang or crash, it can run on the bots and on developers' machines. BUG=none TEST=none Review URL: http://codereview.chromium.org/269104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29279 0039d316-1c4b-4281-b951-d872f2087c98
* Final patch to convert disk cache to using FilePath instead oftony@chromium.org2009-10-1510-85/+59
| | | | | | | | | | | wstring. After this patch, I'm able to start chrome in a user data dir with non-ascii characters on non-utf8 systems. BUG=24444 Review URL: http://codereview.chromium.org/267085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29136 0039d316-1c4b-4281-b951-d872f2087c98
* A couple new io buffers that encapsulate more data and are therefore easier ↵vandebo@chromium.org2009-10-143-33/+21
| | | | | | | | | | | to use and easier to reason about. Inspired by RequestHeaders and ResponseHeaders in http_network_transaction.h Separated out of the refactoring of HttpNetworkTransaction to support pipelining. (http://codereview.chromium.org/249031) BUG=13289 TEST=none Review URL: http://codereview.chromium.org/264025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28978 0039d316-1c4b-4281-b951-d872f2087c98
* Convert SysInfo::AmountOfFreeDiskSpace from wstring to FilePath.tony@chromium.org2009-10-141-1/+1
| | | | | | | | BUG=24672 Review URL: http://codereview.chromium.org/276012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28927 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Re-enable DiskCacheEntryTest.CancelSparseIOrvargas@google.com2009-10-141-2/+2
| | | | | | | | | | | | | | | | I still don't know why it failed, but the only difference that I could see in this test between xp and vista is that xp accepts a lot of small IOs before returning pending, so this change results in similar behavior in both platforms and a faster run on xp. BUG=23862 TEST=none Review URL: http://codereview.chromium.org/273024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28921 0039d316-1c4b-4281-b951-d872f2087c98
* Move disk_cache::MappedFile to use FilePath instead of wstring.tony@chromium.org2009-10-1312-33/+32
| | | | | | | | | | | Also add some FilePath methods in disk_cache_util.h and obsolete the old. BUG=24444 Review URL: http://codereview.chromium.org/266069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28910 0039d316-1c4b-4281-b951-d872f2087c98
* Convert BlockFiles to use FilePath instead of wstring.tony@chromium.org2009-10-1310-48/+43
| | | | | | | | BUG=24444 Review URL: http://codereview.chromium.org/274012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28873 0039d316-1c4b-4281-b951-d872f2087c98
* Step 2 in porting disk cache to using FilePath.tony@chromium.org2009-10-127-9/+16
| | | | | | | | 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
* Start migrating the disk cache to using FilePath.tony@chromium.org2009-10-1211-71/+99
| | | | | | | | | | This converts BackendImpl to using FilePath. BUG=24444 Review URL: http://codereview.chromium.org/261045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28711 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-091-1/+1
| | | | | | | | | | | | depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
* Disable CancelSparseIO unit test while I see what's going on.rvargas@google.com2009-10-081-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=nsylvain Review URL: http://codereview.chromium.org/265051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28481 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a method to cancel pending sparse operations.rvargas@google.com2009-10-088-1/+155
| | | | | | | | | | | | | | | | | | | The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Review URL: http://codereview.chromium.org/256090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
* Handle reading to the end of a sparse entryhclam@chromium.org2009-10-011-1/+1
| | | | | | | | | | | | TEST=run chrome with --enable-byte-range-support --incognito and watch a video in http://tinyvid.tv/, seeking should be fine. http_cache::PartialData used to read a length of zero when reading has reached the end. The zero parameter will cause MemEntryImpl to complain about invalid argument, so early return for the case that we know we have nothing to read. Review URL: http://codereview.chromium.org/255034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27776 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: End the experiment and use the new evictionrvargas@google.com2009-09-295-96/+78
| | | | | | | | | | | | algorithm by default. BUG=none TEST=none Review URL: http://codereview.chromium.org/248022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27514 0039d316-1c4b-4281-b951-d872f2087c98
* Disable flaky DiskCacheBackendTest.NewEvictionDisableSuccess4.phajdan.jr@chromium.org2009-09-161-1/+3
| | | | | | | | | | This is #9 flaky test and rising (#5 in tests failing recently). TBR=rvargas Review URL: http://codereview.chromium.org/193127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26345 0039d316-1c4b-4281-b951-d872f2087c98
* Avoids the use of "namespace using-directives" in a few places.thakis@chromium.org2009-09-071-2/+1
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/183008 Patch from tfarina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25607 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing bugs in sparse cache when dealing with GetAvailableRange queries not ↵hclam@chromium.org2009-09-022-5/+24
| | | | | | | | | | | | | | | | | aligned TEST=net_unittests --gtest_filter=DiskCacheEntryTest.PartialSparseEntry In handling GetAvailableRange() queries, if the start offset is not aligned to 1KB, there was some strange behaviors: 1. The start offset found is smaller than the input offset 2. Number of continus bytes doesn't take into account offset in a block. This patch will fix the above problems. Review URL: http://codereview.chromium.org/186002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25225 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing a crash in disk_cache::SparseControl::UpdateRange()hclam@chromium.org2009-09-023-1/+15
| | | | | | | | | | | | | | | TEST=net_unittests --gtest_filter=DiskCacheEntryTest::PArtialSparseEntry If we do a partial write with the following criteria, disk_cache::SparseControl will crash: 1. first_byte and last_byte in the same 1KB block 2. first_byte % 1024 != 0 3. (first_byte >> 10) % 32 == 31 Review URL: http://codereview.chromium.org/176067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25134 0039d316-1c4b-4281-b951-d872f2087c98