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

Unified Diff: content/browser/file_system/browser_file_system_helper.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 9 years 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
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));
}

Powered by Google App Engine
This is Rietveld 408576698