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

Unified Diff: webkit/browser/fileapi/file_system_url_request_job.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_url_request_job.cc
diff --git a/webkit/browser/fileapi/file_system_url_request_job.cc b/webkit/browser/fileapi/file_system_url_request_job.cc
index d93c14089f24218d9806ba54f202cfec8a922158..7d1f86131384e33c370e5b89db51ae17e47cac76 100644
--- a/webkit/browser/fileapi/file_system_url_request_job.cc
+++ b/webkit/browser/fileapi/file_system_url_request_job.cc
@@ -157,6 +157,11 @@ void FileSystemURLRequestJob::StartAsync() {
return;
DCHECK(!reader_.get());
url_ = file_system_context_->CrackURL(request_->url());
+ if (!file_system_context_->CanServeURLRequest(url_)) {
+ // In incognito mode the API is not usable and there should be no data.
+ NotifyFailed(net::ERR_FILE_NOT_FOUND);
+ return;
+ }
file_system_context_->operation_runner()->GetMetadata(
url_,
base::Bind(&FileSystemURLRequestJob::DidGetMetadata,

Powered by Google App Engine
This is Rietveld 408576698