summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/cache_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Test cache creation retry via public interface only.pasko@google.com2013-04-051-37/+0
| | | | | | | | | | | | | | | | | | | | | | | This is a cleanup after: https://codereview.chromium.org/12794003/ One test for backend force retry is enough, the other test (CreateBackend_MissingFile) is converted to be backend implementation specific. The CreateCacheViaPublicInterface() is called only once, but to eliminate it there is a need to make the cache_thread_ protected. Also, I am sure the name is not ideal, please suggest another. The New Eviction allows not to be very strict about version comparison as stored in the files on disk, this allows creating the BackendImpl with no flags and then being able to pass the common integrity check. BUG=173384 Review URL: https://chromiumcodereview.appspot.com/13517004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192558 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the simple cache backend enabling.pasko@google.com2013-04-031-0/+1
| | | | | | | | | | | | The simple backend was created but then the pointer to it was overwritten to NULL. BUG=173384 Review URL: https://chromiumcodereview.appspot.com/13539002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192123 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize the simple cache backend at runtime. pasko@google.com2013-04-021-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need to choose the backend at runtime for A/B testing. This change is the first step towards backend comparisons: it moves the logic of choosing among cache backends to a single point (cache_creator.cc) and makes it logically separate from BackendImpl. Next step would be to inject performance-analyzer backend into this cache backend choice logic. The analyzer is going to be under a compile-time flag. With this change the Simple Cache Backend operation gets enabled when the "SimpleCacheTrial" experiment is set. Cache Initialization. The Simple Cache Backend now shares the common initialization/cleanup code. So it can delete inconsistent cache, cache of a different version etc asynchronously. It is just a positive side-effect of moving the backend choice to a single point. The CacheCreator with almost no change. To see the difference: shell> out/Debug/chrome --enable-logging=stderr --v=1 \ --user-data-dir=/tmp/unique --use-simple-cache-backend=on \ http://url 2>&1 | grep "Simple Cache" BUG=173390, 173384 TBR=maruel Review URL: https://chromiumcodereview.appspot.com/12794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191830 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath to base namespace.brettw@chromium.org2013-02-021-4/+7
| | | | | | | This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-121-4/+5
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* disk cache: Add NET_API for net.dllrvargas@google.com2011-05-071-4/+5
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/6933045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84532 0039d316-1c4b-4281-b951-d872f2087c98
* This adds a cache_util::MoveCacheContents function for ChromeOS to usegspencer@chromium.org2010-10-121-1/+5
| | | | | | | | | | | | | | | | | | when "cleaning" the cache, since we don't actually want to remove the old cache directory. Because when we do that creating it anew will cause ecryptfs to give it an encrypted name, and we want to be able to find the cache directories in an encrypted user home dir. [This was already reviewed and LGTM'd here: http://codereview.chromium.org/3560001/show But never made it into the tree] BUG=chromium-os:6859 TEST=added and ran unittest, ran chrome in new user_data dir and cleared cache. Review URL: http://codereview.chromium.org/3714002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62257 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unnecessary STL #includes from src/net.viettrungluu@chromium.org2010-08-191-3/+1
| | | | | | | | | | | | This removes obviously unneeded inclusions of <map>, <set>, <string>, <vector>, etc. from src/net. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3132022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56654 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Move disk_cache::MappedFile to use FilePath instead of wstring.tony@chromium.org2009-10-131-2/+0
| | | | | | | | | | | 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-131-2/+0
| | | | | | | | 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
* Start migrating the disk cache to using FilePath.tony@chromium.org2009-10-121-1/+7
| | | | | | | | | | 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
* Disk cache: Implement asynchronous IO for Posix.rvargas@google.com2009-08-211-3/+0
| | | | | | | | | | 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-0/+3
| | | | | | | | | | | 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-3/+0
| | | | | | | | | | 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
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Move GetFreeDiskSpace to SysInfo.deanm@chromium.org2008-09-181-4/+0
| | | | | | | 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-171-4/+0
| | | | | | | | | | 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
* Implement GetFreeDiskSpace for POSIX and GetSystemMemory for Linux.mark@chromium.org2008-09-101-3/+4
| | | | | | | | | 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 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
* Fix WaitForPendingIO to actually exit the wait at some point.rvargas@google.com2008-08-211-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1143 0039d316-1c4b-4281-b951-d872f2087c98
* Second pass move the os dependent code apart on the disk cache.rvargas@google.com2008-08-151-0/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@960 0039d316-1c4b-4281-b951-d872f2087c98
* Move remaining OS dependent bits from the main logic on the disk cache.rvargas@google.com2008-08-131-0/+59
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@819 0039d316-1c4b-4281-b951-d872f2087c98