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

Unified Diff: webkit/fileapi/sandboxed_file_system_context.cc

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
Index: webkit/fileapi/sandboxed_file_system_context.cc
===================================================================
--- webkit/fileapi/sandboxed_file_system_context.cc (revision 72915)
+++ webkit/fileapi/sandboxed_file_system_context.cc (working copy)
@@ -5,9 +5,11 @@
#include "webkit/fileapi/sandboxed_file_system_context.h"
#include "base/file_util.h"
+#include "base/file_util_proxy.h"
#include "base/message_loop_proxy.h"
#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/file_system_quota_manager.h"
+#include "webkit/fileapi/obfuscated_file_util_proxy.h"
namespace fileapi {
@@ -17,16 +19,26 @@
const FilePath& profile_path,
bool is_incognito,
bool allow_file_access,
- bool unlimited_quota)
+ bool unlimited_quota,
+ bool obfuscate)
: file_message_loop_(file_message_loop),
io_message_loop_(io_message_loop),
path_manager_(new FileSystemPathManager(
file_message_loop, profile_path, is_incognito, allow_file_access)),
quota_manager_(new FileSystemQuotaManager(
allow_file_access, unlimited_quota)) {
+ if (obfuscate) {
+ delete_file_util_proxy_ = true;
+ file_util_proxy_ = new ObfuscatedFileUtilProxy(this);
+ } else {
+ delete_file_util_proxy_ = false;
+ file_util_proxy_ = base::FileUtilProxy::GetInstance();
+ }
}
SandboxedFileSystemContext::~SandboxedFileSystemContext() {
+ if (delete_file_util_proxy_)
+ delete file_util_proxy_;
}
void SandboxedFileSystemContext::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698