summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/crx_installer.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 00:05:47 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 00:05:47 +0000
commita8e4b5a8779bed7cb5afcfb7d28cf75486a0b110 (patch)
treee612561599b102cccd1bc6a7165c3ff7d192f0c8 /chrome/browser/extensions/crx_installer.cc
parentc9310561dcb25c863beaf7b76e8da89bd14fd757 (diff)
downloadchromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.zip
chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.gz
chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.bz2
ThreadRestrictions: disallow blocking IO on the UI thread
This patch sets the "disallow IO" flag after the UI thread has started, and then whitelists in the many places where we're accidentally doing IO from the UI thread. (I've filed bugs on all of those cases.) BUG=59847,60630,60641,60211,60634,60643,24163,60825 Review URL: http://codereview.chromium.org/4146004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/crx_installer.cc')
-rw-r--r--chrome/browser/extensions/crx_installer.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 8b523d5..4246ffa 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -12,6 +12,7 @@
#include "base/singleton.h"
#include "base/stringprintf.h"
#include "base/task.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/version.h"
#include "chrome/browser/browser_process.h"
@@ -112,7 +113,12 @@ void CrxInstaller::InstallCrx(const FilePath& source_file) {
source_file_ = source_file;
FilePath user_data_temp_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA_TEMP, &user_data_temp_dir));
+ {
+ // We shouldn't be doing disk IO on the UI thread.
+ // http://code.google.com/p/chromium/issues/detail?id=60634
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ CHECK(PathService::Get(chrome::DIR_USER_DATA_TEMP, &user_data_temp_dir));
+ }
scoped_refptr<SandboxedExtensionUnpacker> unpacker(
new SandboxedExtensionUnpacker(