diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-19 19:40:31 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-19 19:40:31 +0000 |
commit | dc895236268d5f20f45c3ed86f1f70f65853cd80 (patch) | |
tree | fa69c05cacb50a7f12e3fce8f23fc974ab43039b /content/browser/fileapi/browser_file_system_helper.cc | |
parent | d8911efaf3cd3635a1edcc985c81416bebebd3a7 (diff) | |
download | chromium_src-dc895236268d5f20f45c3ed86f1f70f65853cd80.zip chromium_src-dc895236268d5f20f45c3ed86f1f70f65853cd80.tar.gz chromium_src-dc895236268d5f20f45c3ed86f1f70f65853cd80.tar.bz2 |
Add mechanism to auto mount file systems in response to a URL request.
This code adds a hook for when a file system URL request can not be cracked.
It will allow external media galleries file systems to be lazily created.
BUG=160900
Review URL: https://codereview.chromium.org/195923002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/fileapi/browser_file_system_helper.cc')
-rw-r--r-- | content/browser/fileapi/browser_file_system_helper.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc index 4ec6259..f7c9183 100644 --- a/content/browser/fileapi/browser_file_system_helper.cc +++ b/content/browser/fileapi/browser_file_system_helper.cc @@ -21,6 +21,7 @@ #include "webkit/browser/fileapi/external_mount_points.h" #include "webkit/browser/fileapi/file_permission_policy.h" #include "webkit/browser/fileapi/file_system_backend.h" +#include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/file_system_operation_runner.h" #include "webkit/browser/fileapi/file_system_options.h" #include "webkit/browser/quota/quota_manager.h" @@ -66,6 +67,12 @@ scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( profile_path, &additional_backends); + // Set up the auto mount handlers for url requests. + std::vector<fileapi::URLRequestAutoMountHandler> + url_request_auto_mount_handlers; + GetContentClient()->browser()->GetURLRequestAutoMountHandlers( + &url_request_auto_mount_handlers); + scoped_refptr<fileapi::FileSystemContext> file_system_context = new fileapi::FileSystemContext( BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), @@ -74,6 +81,7 @@ scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( browser_context->GetSpecialStoragePolicy(), quota_manager_proxy, additional_backends.Pass(), + url_request_auto_mount_handlers, profile_path, CreateBrowserFileSystemOptions(is_incognito)); |