summaryrefslogtreecommitdiffstats
path: root/webkit/quota
Commit message (Collapse)AuthorAgeFilesLines
* Add QM::DeleteOriginData for browser data deleter supportkinuko@chromium.org2011-07-014-56/+209
| | | | | | | | | | | | The method basically does what EvictOriginData used to do, but in a more generalized way. I refactored EvictOriginData to use DeleteOriginData in this patch too. BUG=86308 TEST=QuotaManager.{EvictOriginData,DeleteOriginDataMultiple} Review URL: http://codereview.chromium.org/7185012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91304 0039d316-1c4b-4281-b951-d872f2087c98
* Change references from app_base to sql.tfarina@chromium.org2011-07-011-1/+1
| | | | | | | | | | | BUG=72317 TEST=None R=rsesek@chromium.org Review URL: http://codereview.chromium.org/7294007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91288 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Pass parameters by reference.jhawkins@chromium.org2011-06-221-2/+2
| | | | | | | | | | | | CID=8725,14376,15499,15540,15655,16687,16688 BUG=none TEST=none R=kmadhusu@chromium.org Review URL: http://codereview.chromium.org/7211037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89976 0039d316-1c4b-4281-b951-d872f2087c98
* Add QM::NotifyStorageAccessedInternal which takes time parameterkinuko@chromium.org2011-06-163-319/+305
| | | | | | | | | | | We need to be able to explicitly specify 'last_access_time' so that test works on all the platforms (namely on Windows). BUG=83805 TEST=QuotaManager.{NotifyAndLRUOrigin,GetLRUOriginWithOriginInUse} Review URL: http://codereview.chromium.org/7167010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89291 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 2)thestig@chromium.org2011-06-151-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7149008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89131 0039d316-1c4b-4281-b951-d872f2087c98
* Remove msvs_guids from third_party, webkit, tools and views.tony@chromium.org2011-06-141-1/+0
| | | | | | | | BUG=28727 Review URL: http://codereview.chromium.org/7146001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89100 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Crash in DeleteTask<quota::QuotaTask>::Runmichaeln@google.com2011-06-131-4/+8
| | | | | | | | BUG=85901 TEST=manual Review URL: http://codereview.chromium.org/7147004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88924 0039d316-1c4b-4281-b951-d872f2087c98
* Don't crash when quota is queried on file:///kinuko@chromium.org2011-06-012-8/+30
| | | | | | | | | BUG=none TEST=QuotaManagerTest.QuotaForEmptyHost Review URL: http://codereview.chromium.org/7020016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87429 0039d316-1c4b-4281-b951-d872f2087c98
* Add eviction statistics.dmikurube@chromium.org2011-05-315-15/+243
| | | | | | | | | | BUG=61676 TEST=QuotaTemporaryStorageEvictorTest.* Review URL: http://codereview.chromium.org/7065022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87300 0039d316-1c4b-4281-b951-d872f2087c98
* Always enable quota storage APIkinuko@chromium.org2011-05-313-5/+5
| | | | | | | | | BUG=61676 TEST=QuotaManagerTest.* Review URL: http://codereview.chromium.org/7083020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87283 0039d316-1c4b-4281-b951-d872f2087c98
* Quota InfoBarkinuko@chromium.org2011-05-312-21/+3
| | | | | | | | | | | | | For persistent storage request we need to show 'request quota' infoBar if the requested storage size (or requested new quota size) is greater than the current quota, and to show an infoBar we need to let the browser know which render view is requesting the storage. This patch includes necessary plumbing to send render process_id/view_id to the browser process and the info bar implementation itself. BUG=61676 TEST=none Review URL: http://codereview.chromium.org/6976026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87275 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate QuotaTemporaryStorageEvictor and QuotaManager functions.dmikurube@chromium.org2011-05-308-38/+204
| | | | | | | | | | | | It enables the Evictor for the temporary storage if the --enable-quota-evictor option is given. BUG=61676 TEST=QuotaTemporaryStorageEvictorTest.*,QuotaManagerTest.* Review URL: http://codereview.chromium.org/7039008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87228 0039d316-1c4b-4281-b951-d872f2087c98
* Make clang happy again.michaeln@google.com2011-05-292-1/+5
| | | | | | | | TBR=ericu BUG=none Review URL: http://codereview.chromium.org/7082033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87208 0039d316-1c4b-4281-b951-d872f2087c98
* Retain support for 'UnlimitedStorage' in the QuotaManager.michaeln@google.com2011-05-2916-139/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Track unlimited_usage in parallel with total global_usage. The latter value is the sum of all usage by any origin (same as before). The new value is the amount of the total that is attributable to origins with the unlimited storage permission. Widened the GlobalUsageCallback to take two int64 params, one for the total global_usage and the other for the unlimited_usage. Modified the eviction logic to exempt origins with the unlimited storage right from eviction. Modified the behavior of QuotaManager::GetUsageAndQuota(origin) method to return kint64max for unlimited origins. Also modified the return value in the limited case to be 10% of the total limit for temp storage, unless the system is over the total limit in which case they're capped at their current usage level. // Allow an individual host to utilize no more than 10% of the total // pool available for temp storage. int64 host_quota = quota() / 10; // If total temp usage is over-budget, stop letting new data in until we reclaim space. limited_global_usage = global_usage() - unlimted_global_usage(); if (limited_global_usage > quota()) host_quota = std::min(host_quota, host_usage()); return host_quota; At this time, the total limit for temp storage is 1G, that gives each site 100M to work with (no prompts involved). BUG=61676 TEST=unittests Review URL: http://codereview.chromium.org/6962005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87207 0039d316-1c4b-4281-b951-d872f2087c98
* Fix quota manager's usage tracking for a new originkinuko@chromium.org2011-05-273-48/+33
| | | | | | | | | BUG=none TEST=QuotaManagerTest.Get*Usage_WithModify Review URL: http://codereview.chromium.org/7075025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86998 0039d316-1c4b-4281-b951-d872f2087c98
* More WebSQLDatabase and QuotaManager integration.michaeln@google.com2011-05-261-0/+16
| | | | | | | | | | | | 1) Fix bugs with how usage and deltas in usage were being computed. The tracker was reporting confusing numbers because in some cases it was stat'ing files and in other cases it was using a value cached in memory. Now the tracker always uses a cached value for open database files, and updates the cached value when changes are noticed. During that update, delta notifications are sent. 2) Remove the old and unsed support for quota from the DatabaseTracker. Changes to the class interface rippled to various unit tests. BUG=61676 TEST=updated existing unit tests Review URL: http://codereview.chromium.org/7056025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86871 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the invalid read in QuotaTemporaryStorageEvictorTest at r86597.dmikurube@chromium.org2011-05-261-1/+1
| | | | | | | | | | BUG=83944 TEST=memory_tests for QuotaTemporaryStorageEvictorTest.* Review URL: http://codereview.chromium.org/7071004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86828 0039d316-1c4b-4281-b951-d872f2087c98
* Add Dump{Quota,LastAccessTime}Table to QuotaManagertzik@chromium.org2011-05-265-1/+227
| | | | | | | | | | BUG=61676 TEST='QuotaManagerTest.*' Review URL: http://codereview.chromium.org/7068004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86825 0039d316-1c4b-4281-b951-d872f2087c98
* Implement QuotaTemporaryStorageEvictor.dmikurube@chromium.org2011-05-255-3/+467
| | | | | | | | | | | It's based on http://codereview.chromium.org/7029009/. BUG=61676 TEST=QuotaTemporaryStorageEvictorTest.* Review URL: http://codereview.chromium.org/7002024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86597 0039d316-1c4b-4281-b951-d872f2087c98
* Add StorageType as parameter to {,Host}{Usage,Quota}Callbacktzik@chromium.org2011-05-256-53/+164
| | | | | | | | | | BUG=61676 TEST='QuotaManagerTest.*' Review URL: http://codereview.chromium.org/6990055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86592 0039d316-1c4b-4281-b951-d872f2087c98
* Virtual destructors should have virtual keyword.hans@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | | | Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
* Implement DatabaseQuotaClient's DeteleteOriginData method.michaeln@google.com2011-05-252-4/+22
| | | | | | | | TEST=database_quota_client_unittest.cc BUG=61676 Review URL: http://codereview.chromium.org/7046019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86561 0039d316-1c4b-4281-b951-d872f2087c98
* Disable QuotaMananger tests which rely on precise time.shess@chromium.org2011-05-251-2/+13
| | | | | | | | | | | | | | | The tests were storing time values in SQLite, and different inserts were all the same. Previous version of SQLite was returning them in the order inserted (test succeeded), current version returns a different order (test fails). TBR=kinuko@chromium.org BUG=83805 TEST=none Review URL: http://codereview.chromium.org/7067045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86553 0039d316-1c4b-4281-b951-d872f2087c98
* Add Dump{Quota,LastAccessTime}Table to QuotaDatabasetzik@chromium.org2011-05-243-8/+243
| | | | | | | | | | BUG=61676 TEST='QuotaDatabaseTest.*' Review URL: http://codereview.chromium.org/7057006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86403 0039d316-1c4b-4281-b951-d872f2087c98
* QuotaManager::GetUsageAndQuota should not hung even when the returned ↵kinuko@chromium.org2011-05-231-28/+34
| | | | | | | | | | | usage/quota value is negative BUG=none TEST=QuotaManager.* Review URL: http://codereview.chromium.org/7056006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86266 0039d316-1c4b-4281-b951-d872f2087c98
* Implement NotifyStorageAccessedkinuko@chromium.org2011-05-205-46/+244
| | | | | | | | | | BUG=61676 TEST=to be added Review URL: http://codereview.chromium.org/7011033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86075 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_temp_dir and scoped_native_library back from base/memory to base.thakis@chromium.org2011-05-192-2/+2
| | | | | | | | | | | It looks like they got moved accidentally in http://codereview.chromium.org/6714032 BUG=none TEST=none Review URL: http://codereview.chromium.org/7048007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86010 0039d316-1c4b-4281-b951-d872f2087c98
* Globally replace <(library) with static_libraryevan@chromium.org2011-05-191-1/+1
| | | | | | | | | | | We provided <(library) as a variable to support a peculiar build configuration on Linux. We no longer support that build configuration, so we can simplify this code to no longer use a variable. Review URL: http://codereview.chromium.org/7051014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86004 0039d316-1c4b-4281-b951-d872f2087c98
* StartEviction and RegisterOriginskinuko@chromium.org2011-05-195-84/+283
| | | | | | | | | | | | | | - changed LazyInitialize() to post one more task to register origins for the very 1st-time initialization - added some helper methods for GetLRUOrigin - added some methods (including mock one) to kick eviction once we have initialized temporary storage - sorted some newly-added QM methods as well BUG=61676 TEST=not yet Review URL: http://codereview.chromium.org/7032006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85930 0039d316-1c4b-4281-b951-d872f2087c98
* RegisterOrigins to QuotaDatabasetzik@chromium.org2011-05-193-5/+97
| | | | | | | | | | BUG=61676 TEST=QuotaDatabaseTest.RegisterOrigins Review URL: http://codereview.chromium.org/7039031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85881 0039d316-1c4b-4281-b951-d872f2087c98
* Implement GetUsageAndQuotaForEviction in QuotaManager.dmikurube@chromium.org2011-05-194-24/+136
| | | | | | | | | | | | | This change includes : * Merge EvictOriginData members into EvictionContext. * Fix GetAvailableSpaceTest. BUG=61676 TEST=QuotaManagerTest.GetUsageANdQuotaForEviction. Review URL: http://codereview.chromium.org/7039006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85874 0039d316-1c4b-4281-b951-d872f2087c98
* fix QuotaDatabaseTest.BootstrapFlagtzik@chromium.org2011-05-191-2/+1
| | | | | | | | | | BUG=61676 TEST=QuotaDatabaseTest.BootstrapFlag Review URL: http://codereview.chromium.org/7039056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85873 0039d316-1c4b-4281-b951-d872f2087c98
* InitializationFlag to QuotaDatabasetzik@chromium.org2011-05-193-1/+40
| | | | | | | | | | BUG=61676 TEST=QuotaDatabaseTest.InitializationFlag Review URL: http://codereview.chromium.org/7042001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85867 0039d316-1c4b-4281-b951-d872f2087c98
* Implement EvictOriginData in QuotaManager.dmikurube@chromium.org2011-05-183-6/+120
| | | | | | | | | BUG=61676 TEST=QuotaManagerTest.EvictOriginData Review URL: http://codereview.chromium.org/7029007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85750 0039d316-1c4b-4281-b951-d872f2087c98
* Added GetAvailableSpace to QuotaManagerkinuko@chromium.org2011-05-184-1/+65
| | | | | | | | | | BUG=61676 TEST=QuotaManagerTest.GetAvailableSpaceTest Review URL: http://codereview.chromium.org/7014042 Patch from Taiju Tsuiki <tzik@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85720 0039d316-1c4b-4281-b951-d872f2087c98
* QuotaManager shouldn't crash if is_incognito is true.michaeln@google.com2011-05-174-146/+166
| | | | | | | | BUG=82698 TEST=existing test chrome\test\functional\databases.py Review URL: http://codereview.chromium.org/7031016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85645 0039d316-1c4b-4281-b951-d872f2087c98
* Add an interface QuotaEvictionHandler.dmikurube@chromium.org2011-05-172-16/+61
| | | | | | | | | | BUG=61676 TEST=none Review URL: http://codereview.chromium.org/7029009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85613 0039d316-1c4b-4281-b951-d872f2087c98
* Added DeleteOriginData to QuotaClientkinuko@chromium.org2011-05-175-4/+99
| | | | | | | | | | BUG=61676 TEST=SandboxQuotaClientTest.DeleteOriginTest Review URL: http://codereview.chromium.org/7003021 Patch from Taiju Tsuiki <tzik@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85588 0039d316-1c4b-4281-b951-d872f2087c98
* Add DeleteOriginFromDatabase private method to QuotaManagerkinuko@chromium.org2011-05-172-95/+131
| | | | | | | | | | BUG=61676 TEST=to be added Review URL: http://codereview.chromium.org/7035014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85583 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetLRUOrigin into QuotaManager.dmikurube@chromium.org2011-05-165-68/+116
| | | | | | | | | | BUG=61676 TEST=QuotaDatabaseTest.*, (no tests for QuotaManagerTest.*). Review URL: http://codereview.chromium.org/7033006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85480 0039d316-1c4b-4281-b951-d872f2087c98
* More Quota + WebSQLDatabase integration.michaeln@google.com2011-05-151-1/+2
| | | | | | | | | | | | * Notify the QuotaManager of accesses and modifications to the amount of storage utlized. * Still, the hard-coded 5MB limit is in place. BUG=61676 TEST=database_tracker_unittest.cc, database_connections_unittest.cc Review URL: http://codereview.chromium.org/7001014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85400 0039d316-1c4b-4281-b951-d872f2087c98
* Added {Get,Set}PersistentHostQuota and Get{Global,Host}Usage to QuotaManager.kinuko@chromium.org2011-05-139-111/+647
| | | | | | | | | | | | Fixed version of issue 6904042. BUG=61676 TEST='QuotaManagerTests.*' Review URL: http://codereview.chromium.org/7004019 Patch from Taiju Tsuiki <tzik@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85263 0039d316-1c4b-4281-b951-d872f2087c98
* 1) Declare three new proxayable QuotaManager methods:michaeln@google.com2011-05-123-30/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | // QuotaClients should call this method when storage is accessed. // Used to maintain LRU ordering. void NotifyStorageAccessed(client, origin, type); // Used to avoid evicting origins with open pages. // A call to NotifyOriginInUse must be balanced by a later call // to NotifyOriginNoLongerInUse. void NotifyOriginInUse(origin); void NotifyOriginNoLongerInUse(origin); Implemented the latter two along with an IsOriginInUse(origin) method. 2) Added a quota_manager() getter to the proxy interface for use only on the IO thread. 3) Removed GetUsageAndQuota from the proxy interface, since the impl does not support that. Changed the callsite for that to use proxy->quota_manager()->GetUsageAndQuota(). 4) Virtualized the proxy interface to make client testing easier. 5) Use raw MessageLoopProxy ptrs for ctor args instead of scoped_refptr<T> to avoid having to inlude as much. BUG=61676 TEST=added tests for OriginInUse bookeeping Review URL: http://codereview.chromium.org/6973017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85155 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r84963: "Added {Get,Set}PersistentHostQuota"dilmah@chromium.org2011-05-116-718/+81
| | | | | | | | | | | | | | | | | failures in webkit tests: QuotaManagerTest.GetUsage_WithModification: .\quota\quota_manager_unittest.cc(645): error: Value of: 4000 + 50000 + 900000000 Actual: 900054000 Expected: usage() Which is: 900108000 BUG=None TEST=None TBR=tzik@google.com Review URL: http://codereview.chromium.org/7004018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84968 0039d316-1c4b-4281-b951-d872f2087c98
* Added {Get,Set}PersistentHostQuotatzik@google.com2011-05-116-81/+718
| | | | | | | | | | BUG=61676 TEST='QuotaManagerTests.*' Review URL: http://codereview.chromium.org/6904042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84963 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu, #include "base/message_loop_proxy.h since a scoped_refptr<Loop> is ↵michaeln@google.com2011-05-101-0/+1
| | | | | | | | | | used as a constructor arg. BUG=82098 TEST=none Review URL: http://codereview.chromium.org/7002002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84837 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix attempt for 84776; QuotaManager should not crash when it gets ↵kinuko@chromium.org2011-05-101-0/+6
| | | | | | | | | | | | unknown storage type TBR=dmikurube BUG=none TEST=green bots Review URL: http://codereview.chromium.org/6994007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84779 0039d316-1c4b-4281-b951-d872f2087c98
* Set allowed bytes growth in FileSystemOperation from QuotaManager.dmikurube@chromium.org2011-05-102-3/+16
| | | | | | | | | | | | | | | | It sets allowed bytes growth before copy(/move)/write/truncate. It includes : 1) rewriting FileSystemOperationTest with using FileSystemContext, PathManager and QuotaManager, and 2) switching the callee of LocalFileSystemFileUtil into QuotaFileUtil. BUG=74841 TEST=FileSystemOperationTest.*, FileSystemOperationWriteTest.* Review URL: http://codereview.chromium.org/6865008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84776 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Use callback_old.h where appropriate, part 1.jhawkins@chromium.org2011-05-102-2/+2
| | | | | | | | | | | BUG=none TEST=none R=thakis@chromium.org Review URL: http://codereview.chromium.org/6985009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84725 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r84649 and r84671: "Move MockQuotaManager out of anonymous namespace tompcomplete@chromium.org2011-05-092-13/+26
| | | | | | | | | | | fix build" and "Notify the quota manager when write operation is made in FileSystem API." FileSystemExtensionApiTest.FileBrowserTest is consistently crashing on chrome OS. TBR=kinuko git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84699 0039d316-1c4b-4281-b951-d872f2087c98