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

Unified Diff: chrome/browser/spellcheck_host.cc

Issue 4146004: ThreadRestrictions: disallow blocking IO on the UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 10 years, 2 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: chrome/browser/spellcheck_host.cc
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index 545eaaa19307869fa18f9d280e56a4ff664120d2..d9784c2bf2cc960b6bf3e06378859904f561f547 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/string_split.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/profile.h"
@@ -28,7 +29,13 @@ namespace {
FilePath GetFirstChoiceFilePath(const std::string& language) {
FilePath dict_dir;
- PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir);
+ {
+ // This should not do blocking IO from the UI thread!
+ // Temporarily allow it for now.
+ // http://code.google.com/p/chromium/issues/detail?id=60643
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir);
+ }
return SpellCheckCommon::GetVersionedFileName(language, dict_dir);
}

Powered by Google App Engine
This is Rietveld 408576698