Index: storage/browser/fileapi/file_system_context.cc |
diff --git a/storage/browser/fileapi/file_system_context.cc b/storage/browser/fileapi/file_system_context.cc |
index 4b300ef286ea800eac9f6e79fa22a9aaa5a272ec..85a9317b3e82f9553cd35d3095687f781b52ccf8 100644 |
--- a/storage/browser/fileapi/file_system_context.cc |
+++ b/storage/browser/fileapi/file_system_context.cc |
@@ -150,7 +150,6 @@ FileSystemContext::FileSystemContext( |
special_storage_policy, |
options)), |
sandbox_backend_(new SandboxFileSystemBackend(sandbox_delegate_.get())), |
- isolated_backend_(new IsolatedFileSystemBackend()), |
plugin_private_backend_( |
new PluginPrivateFileSystemBackend(file_task_runner, |
partition_path, |
@@ -163,7 +162,6 @@ FileSystemContext::FileSystemContext( |
is_incognito_(options.is_incognito()), |
operation_runner_(new FileSystemOperationRunner(this)) { |
RegisterBackend(sandbox_backend_.get()); |
- RegisterBackend(isolated_backend_.get()); |
RegisterBackend(plugin_private_backend_.get()); |
for (ScopedVector<FileSystemBackend>::const_iterator iter = |
@@ -172,6 +170,16 @@ FileSystemContext::FileSystemContext( |
RegisterBackend(*iter); |
} |
+ // If the embedder's additional backends already provide support for |
+ // kFileSystemTypeNativeLocal and kFileSystemTypeNativeForPlatformApp then |
+ // IsolatedFileSystemBackend does not need to handle them. For example, on |
+ // Chrome OS the additional backend chromeos::FileSystemBackend handles these |
+ // types. |
+ isolated_backend_.reset(new IsolatedFileSystemBackend( |
+ !ContainsKey(backend_map_, kFileSystemTypeNativeLocal), |
+ !ContainsKey(backend_map_, kFileSystemTypeNativeForPlatformApp))); |
+ RegisterBackend(isolated_backend_.get()); |
+ |
if (quota_manager_proxy) { |
// Quota client assumes all backends have registered. |
quota_manager_proxy->RegisterClient(CreateQuotaClient( |