summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 10:28:15 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 10:28:15 +0000
commit7b277aff24c9e5b0de6fecfc89917065684f2d02 (patch)
tree1937ffd4f9d2665f0a1ee7e15d070f4053c48b4a /webkit
parent2cb47a9d9219a494ba708b2b23e4056c94c18f3d (diff)
downloadchromium_src-7b277aff24c9e5b0de6fecfc89917065684f2d02.zip
chromium_src-7b277aff24c9e5b0de6fecfc89917065684f2d02.tar.gz
chromium_src-7b277aff24c9e5b0de6fecfc89917065684f2d02.tar.bz2
[FileAPI] Inhibit SandboxDirectoryDatabase prepopulation on incognito mode
Inhibits problematic database prepopulation. Prepopulation on incognito mode conflicts to FileSystem operations on non-incognito mode. That causes database corruption and data loss. R=nhiroki@chromium.org BUG=383224 Review URL: https://codereview.chromium.org/327403004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
index 043de0e..6bb2efd 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
+++ b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
@@ -204,7 +204,8 @@ SandboxFileSystemBackendDelegate::SandboxFileSystemBackendDelegate(
// Prepopulate database only if it can run asynchronously (i.e. the current
// thread is not file_task_runner). Usually this is the case but may not
// in test code.
- if (!file_task_runner_->RunsTasksOnCurrentThread()) {
+ if (!file_system_options.is_incognito() &&
+ !file_task_runner_->RunsTasksOnCurrentThread()) {
std::vector<std::string> types_to_prepopulate(
&kPrepopulateTypes[0],
&kPrepopulateTypes[arraysize(kPrepopulateTypes)]);