Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1458)

Unified Diff: webkit/browser/fileapi/file_system_context.cc

Issue 23545016: Not creating ClientUsageTracker for unsupported storage type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/browser/database/database_quota_client.cc ('k') | webkit/browser/fileapi/file_system_quota_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/file_system_context.cc
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index f2973d35fa2dae22c1c9bd90880c1b5c73c6df8c..6619259d2303cd9c484752aefdcfa7d4d8a6ff66 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -121,11 +121,6 @@ FileSystemContext::FileSystemContext(
external_mount_points_(external_mount_points),
partition_path_(partition_path),
operation_runner_(new FileSystemOperationRunner(this)) {
- if (quota_manager_proxy) {
- quota_manager_proxy->RegisterClient(CreateQuotaClient(
- this, options.is_incognito()));
- }
-
RegisterBackend(sandbox_backend_.get());
RegisterBackend(isolated_backend_.get());
@@ -135,6 +130,12 @@ FileSystemContext::FileSystemContext(
RegisterBackend(*iter);
}
+ if (quota_manager_proxy) {
+ // Quota client assumes all backends have registered.
+ quota_manager_proxy->RegisterClient(CreateQuotaClient(
+ this, options.is_incognito()));
+ }
+
sandbox_backend_->Initialize(this);
isolated_backend_->Initialize(this);
for (ScopedVector<FileSystemBackend>::const_iterator iter =
@@ -230,7 +231,8 @@ FileSystemBackend* FileSystemContext::GetFileSystemBackend(
}
bool FileSystemContext::IsSandboxFileSystem(FileSystemType type) const {
- return GetQuotaUtil(type) != NULL;
+ FileSystemBackendMap::const_iterator found = backend_map_.find(type);
+ return found != backend_map_.end() && found->second->GetQuotaUtil();
}
const UpdateObserverList* FileSystemContext::GetUpdateObservers(
« no previous file with comments | « webkit/browser/database/database_quota_client.cc ('k') | webkit/browser/fileapi/file_system_quota_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698