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

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

Issue 23494028: Do not return FileSystem contents if the profile is in incognito mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/browser/fileapi/file_system_context.cc
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index b7fbf681da6878ca213f6588ca20dbfeeb590a42..26a48d49a3ca7451d89969acb833c1c05dfb7f78 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -120,6 +120,7 @@ FileSystemContext::FileSystemContext(
additional_backends_(additional_backends.Pass()),
external_mount_points_(external_mount_points),
partition_path_(partition_path),
+ is_incognito_(options.is_incognito()),
operation_runner_(new FileSystemOperationRunner(this)) {
RegisterBackend(sandbox_backend_.get());
RegisterBackend(isolated_backend_.get());
@@ -349,6 +350,18 @@ void FileSystemContext::EnableTemporaryFileSystemInIncognito() {
}
#endif
+bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const {
+ if (!is_incognito_)
+ return true;
+#if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
+ if (url.type() == kFileSystemTypeTemporary &&
+ sandbox_backend_->enable_temporary_file_system_in_incognito()) {
+ return true;
+ }
+#endif
+ return false;
+}
+
FileSystemContext::~FileSystemContext() {
}
« no previous file with comments | « webkit/browser/fileapi/file_system_context.h ('k') | webkit/browser/fileapi/file_system_dir_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698