| Index: content/browser/file_system/browser_file_system_helper.cc
|
| diff --git a/content/browser/file_system/browser_file_system_helper.cc b/content/browser/file_system/browser_file_system_helper.cc
|
| index 4161cad7d985121c72aabbf270526bca1ccc601c..2e13a19369ce15620d629ab3c2edf6dd5a00ea65 100644
|
| --- a/content/browser/file_system/browser_file_system_helper.cc
|
| +++ b/content/browser/file_system/browser_file_system_helper.cc
|
| @@ -8,10 +8,35 @@
|
| #include "base/file_path.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/common/content_switches.h"
|
| +#include "webkit/fileapi/file_system_options.h"
|
| #include "webkit/quota/quota_manager.h"
|
|
|
| using content::BrowserThread;
|
|
|
| +namespace {
|
| +
|
| +class BrowserFileSystemOptions : public fileapi::FileSystemOptions {
|
| + public:
|
| + explicit BrowserFileSystemOptions(bool is_incognito)
|
| + : is_incognito_(is_incognito) {}
|
| +
|
| + // Implements FileSystemOptions.
|
| + virtual bool is_incognito() const OVERRIDE {
|
| + return is_incognito_;
|
| + }
|
| +
|
| + // Implements FileSystemOptions.
|
| + virtual bool allow_file_access_from_files() const OVERRIDE {
|
| + return CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAllowFileAccessFromFiles);
|
| + }
|
| +
|
| + private:
|
| + bool is_incognito_;
|
| +};
|
| +
|
| +} // anonymous namespace
|
| +
|
| scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
|
| const FilePath& profile_path, bool is_incognito,
|
| quota::SpecialStoragePolicy* special_storage_policy,
|
| @@ -22,8 +47,5 @@ scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
|
| special_storage_policy,
|
| quota_manager_proxy,
|
| profile_path,
|
| - is_incognito,
|
| - CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kAllowFileAccessFromFiles),
|
| - NULL);
|
| + new BrowserFileSystemOptions(is_incognito));
|
| }
|
|
|