summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 18:29:43 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 18:29:43 +0000
commit0de9b67aa1b649f0df8d5a5910b2e26b3f42aa38 (patch)
tree91c016fb7c1a80ae9bd0051a74399e50586bf478 /webkit/fileapi/file_system_operation.cc
parent79e2336c1782fff5147a447495a20729007935c2 (diff)
downloadchromium_src-0de9b67aa1b649f0df8d5a5910b2e26b3f42aa38.zip
chromium_src-0de9b67aa1b649f0df8d5a5910b2e26b3f42aa38.tar.gz
chromium_src-0de9b67aa1b649f0df8d5a5910b2e26b3f42aa38.tar.bz2
1) Declare three new proxayable QuotaManager methods:
// 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
Diffstat (limited to 'webkit/fileapi/file_system_operation.cc')
-rw-r--r--webkit/fileapi/file_system_operation.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc
index 1d6c5a6..ac9ef88 100644
--- a/webkit/fileapi/file_system_operation.cc
+++ b/webkit/fileapi/file_system_operation.cc
@@ -559,9 +559,9 @@ bool FileSystemOperation::GetUsageAndQuotaThenCallback(
quota::QuotaManager::GetUsageAndQuotaCallback* callback) {
quota::QuotaManagerProxy* quota_manager_proxy =
file_system_context()->quota_manager_proxy();
- if (quota_manager_proxy != NULL &&
+ if (quota_manager_proxy && quota_manager_proxy->quota_manager() &&
file_system_operation_context_.src_type() != kFileSystemTypeExternal) {
- quota_manager_proxy->GetUsageAndQuota(
+ quota_manager_proxy->quota_manager()->GetUsageAndQuota(
file_system_operation_context_.src_origin_url(),
FileSystemTypeToQuotaStorageType(
file_system_operation_context_.src_type()),