summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 00:35:34 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 00:35:34 +0000
commitf9fac85d18493f8b83152d11652bbf4a24f02338 (patch)
treee6cbb0cec7d2ce9520c2f5a4108a6e553dc77c25
parent43e37617d3f170e815bbb814144afa77e1156ef3 (diff)
downloadchromium_src-f9fac85d18493f8b83152d11652bbf4a24f02338.zip
chromium_src-f9fac85d18493f8b83152d11652bbf4a24f02338.tar.gz
chromium_src-f9fac85d18493f8b83152d11652bbf4a24f02338.tar.bz2
Add ScopedAllowIO in CreateFileStreamForDrop.
BUG=110709 TEST=See the repro step in the bug. Review URL: http://codereview.chromium.org/9176006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119309 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/download/drag_download_util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc
index 8c25eb3..a0d6f8a 100644
--- a/content/browser/download/drag_download_util.cc
+++ b/content/browser/download/drag_download_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -74,6 +74,9 @@ FileStream* CreateFileStreamForDrop(FilePath* file_path) {
new_file_path = file_path->InsertBeforeExtension(suffix);
}
+ // http://crbug.com/110709
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
// Explicitly (and redundantly check) for file -- despite the fact that our
// open won't overwrite -- just to avoid log spew.
if (!file_util::PathExists(new_file_path) &&