summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 20:06:34 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 20:06:34 +0000
commit34960a545057de6f1a5c9fbb4d004a11dc6f7d2b (patch)
treef71c1e6743a4233c06dcd8ca36d48ac41428dd42
parent7debf7385682c5fcc4ab8e17b05148491944fb81 (diff)
downloadchromium_src-34960a545057de6f1a5c9fbb4d004a11dc6f7d2b.zip
chromium_src-34960a545057de6f1a5c9fbb4d004a11dc6f7d2b.tar.gz
chromium_src-34960a545057de6f1a5c9fbb4d004a11dc6f7d2b.tar.bz2
Revert r25770 due to valgrind failures on Linux.
TEST=none. BUG=none. Review URL: http://codereview.chromium.org/199065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25781 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/thread.cc6
-rw-r--r--base/thread.h3
-rw-r--r--chrome/browser/history/history.cc26
3 files changed, 4 insertions, 31 deletions
diff --git a/base/thread.cc b/base/thread.cc
index dcda330..f447fbb 100644
--- a/base/thread.cc
+++ b/base/thread.cc
@@ -135,10 +135,6 @@ void Thread::StopSoon() {
message_loop_->PostTask(FROM_HERE, new ThreadQuitTask());
}
-void Thread::Run(MessageLoop* message_loop) {
- message_loop->Run();
-}
-
void Thread::ThreadMain() {
// The message loop for this thread.
MessageLoop message_loop(startup_data_->options.message_loop_type);
@@ -157,7 +153,7 @@ void Thread::ThreadMain() {
// startup_data_ can't be touched anymore since the starting thread is now
// unlocked.
- Run(message_loop_);
+ message_loop.Run();
// Let the thread do extra cleanup.
CleanUp();
diff --git a/base/thread.h b/base/thread.h
index 36daa7f..d1aae0e 100644
--- a/base/thread.h
+++ b/base/thread.h
@@ -114,9 +114,6 @@ class Thread : PlatformThread::Delegate {
// Called just prior to starting the message loop
virtual void Init() {}
- // Called to start the message loop
- virtual void Run(MessageLoop* message_loop);
-
// Called just after the message loop ends
virtual void CleanUp() {}
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 965770f..8310c23 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -40,7 +40,6 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_database.h"
#include "chrome/browser/history/in_memory_history_backend.h"
-#include "chrome/browser/history/visit_log.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/visitedlink_master.h"
#include "chrome/common/chrome_constants.h"
@@ -54,26 +53,7 @@
using base::Time;
using history::HistoryBackend;
-namespace {
-
-class ChromeHistoryThread : public ChromeThread {
- public:
- ChromeHistoryThread() : ChromeThread(ChromeThread::HISTORY) {}
- virtual ~ChromeHistoryThread() {
- // We cannot rely on our base class to call Stop() in case we want our
- // CleanUp function to run.
- Stop();
- }
- protected:
- virtual void Run(MessageLoop* message_loop) {
- // Allocate VisitLog on local stack so it will be saved in crash dump.
- history::VisitLog visit_log;
- history::InitVisitLog(&visit_log);
- message_loop->Run();
- }
-};
-
-} // namespace
+static const char* kHistoryThreadName = "Chrome_HistoryThread";
// Sends messages from the backend to us on the main thread. This must be a
// separate class from the history service so that it can hold a reference to
@@ -120,7 +100,7 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
const history::StarID HistoryService::kBookmarkBarID = 1;
HistoryService::HistoryService()
- : thread_(new ChromeHistoryThread()),
+ : thread_(new base::Thread(kHistoryThreadName)),
profile_(NULL),
backend_loaded_(false) {
// Is NULL when running generate_profile.
@@ -131,7 +111,7 @@ HistoryService::HistoryService()
}
HistoryService::HistoryService(Profile* profile)
- : thread_(new ChromeHistoryThread()),
+ : thread_(new base::Thread(kHistoryThreadName)),
profile_(profile),
backend_loaded_(false) {
registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED,