summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/profile.cc4
-rw-r--r--chrome/browser/spellcheck_host.cc10
-rw-r--r--chrome/browser/spellcheck_host.h4
-rw-r--r--chrome/test/memory_test/memory_test.cc16
4 files changed, 15 insertions, 19 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 76d9b3d..2b6eb4e 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -1318,11 +1318,12 @@ void ProfileImpl::ReinitializeSpellCheckHost(bool force) {
if (!force && spellcheck_host_.get())
return;
+ spellcheck_host_ready_ = false;
+
bool notify = false;
if (spellcheck_host_.get()) {
spellcheck_host_->UnsetObserver();
spellcheck_host_ = NULL;
- spellcheck_host_ready_ = false;
notify = true;
}
@@ -1332,6 +1333,7 @@ void ProfileImpl::ReinitializeSpellCheckHost(bool force) {
spellcheck_host_ = new SpellCheckHost(this,
WideToASCII(prefs->GetString(prefs::kSpellCheckDictionary)),
GetRequestContext());
+ spellcheck_host_->Initialize();
} else if (notify) {
// The spellchecker has been disabled.
SpellCheckHostInitialized();
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index c9fea3ecf..6e77e19 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -144,9 +144,6 @@ SpellCheckHost::SpellCheckHost(Observer* observer,
PathService::Get(chrome::DIR_USER_DATA, &personal_file_directory);
custom_dictionary_file_ =
personal_file_directory.Append(chrome::kCustomDictionaryFileName);
-
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &SpellCheckHost::Initialize));
}
SpellCheckHost::~SpellCheckHost() {
@@ -154,6 +151,11 @@ SpellCheckHost::~SpellCheckHost() {
close(fd_.fd);
}
+void SpellCheckHost::Initialize() {
+ ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ NewRunnableMethod(this, &SpellCheckHost::InitializeInternal));
+}
+
void SpellCheckHost::UnsetObserver() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
@@ -172,7 +174,7 @@ void SpellCheckHost::AddWord(const std::string& word) {
Source<SpellCheckHost>(this), NotificationService::NoDetails());
}
-void SpellCheckHost::Initialize() {
+void SpellCheckHost::InitializeInternal() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
if (!observer_)
diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h
index 8c2ef55..ac540f1 100644
--- a/chrome/browser/spellcheck_host.h
+++ b/chrome/browser/spellcheck_host.h
@@ -28,6 +28,8 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost,
const std::string& language,
URLRequestContextGetter* request_context_getter);
+ void Initialize();
+
// Clear |observer_|. Used to prevent calling back to a deleted object.
void UnsetObserver();
@@ -52,7 +54,7 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost,
// Load and parse the custom words dictionary and open the bdic file.
// Executed on the file thread.
- void Initialize();
+ void InitializeInternal();
// Inform |observer_| that initialization has finished.
void InformObserverOfInitialization();
diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc
index 845885e..40920ee 100644
--- a/chrome/test/memory_test/memory_test.cc
+++ b/chrome/test/memory_test/memory_test.cc
@@ -22,16 +22,6 @@
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_LINUX) && __x86_64__
-#define MAYBE_SingleTabTest DISABLED_SingleTabTest
-#define MAYBE_FiveTabTest DISABLED_FiveTabTest
-#define MAYBE_TwelveTabTest DISABLED_TwelveTabTest
-#else
-#define MAYBE_SingleTabTest SingleTabTest
-#define MAYBE_FiveTabTest FiveTabTest
-#define MAYBE_TwelveTabTest TwelveTabTest
-#endif
-
namespace {
static const FilePath::CharType kTempDirName[] =
@@ -643,15 +633,15 @@ std::string MembusterMemoryTest::source_urls_[] = {
size_t MembusterMemoryTest::urls_length_ =
arraysize(MembusterMemoryTest::source_urls_);
-TEST_F(GeneralMixMemoryTest, MAYBE_SingleTabTest) {
+TEST_F(GeneralMixMemoryTest, SingleTabTest) {
RunTest("1t", 1);
}
-TEST_F(GeneralMixMemoryTest, MAYBE_FiveTabTest) {
+TEST_F(GeneralMixMemoryTest, FiveTabTest) {
RunTest("5t", 5);
}
-TEST_F(GeneralMixMemoryTest, MAYBE_TwelveTabTest) {
+TEST_F(GeneralMixMemoryTest, TwelveTabTest) {
RunTest("12t", 12);
}