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

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

Issue 838323003: app_shell: Fix crash on chrome.runtime.getPackageDirectoryEntry for cros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (filesystem) remove spam Created 5 years, 11 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 | « no previous file | storage/browser/fileapi/isolated_file_system_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | storage/browser/fileapi/isolated_file_system_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698