summaryrefslogtreecommitdiffstats
path: root/chrome/utility
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 18:17:55 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 18:17:55 +0000
commit42f1d782153f79b0b43bcb17db7dc4979bc08814 (patch)
treea5f08a5eda55157626abccd96b0b1ff177882370 /chrome/utility
parentafc9075980bba8f1427b788692f45921ecf14b67 (diff)
downloadchromium_src-42f1d782153f79b0b43bcb17db7dc4979bc08814.zip
chromium_src-42f1d782153f79b0b43bcb17db7dc4979bc08814.tar.gz
chromium_src-42f1d782153f79b0b43bcb17db7dc4979bc08814.tar.bz2
Unrevert 21355 because the revert might be causing the
worker tests failures. Review URL: http://codereview.chromium.org/159276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r--chrome/utility/utility_main.cc7
-rw-r--r--chrome/utility/utility_thread.cc13
-rw-r--r--chrome/utility/utility_thread.h5
3 files changed, 6 insertions, 19 deletions
diff --git a/chrome/utility/utility_main.cc b/chrome/utility/utility_main.cc
index ad66043c..bb669a7 100644
--- a/chrome/utility/utility_main.cc
+++ b/chrome/utility/utility_main.cc
@@ -20,15 +20,16 @@
// Mainline routine for running as the utility process.
int UtilityMain(const MainFunctionParams& parameters) {
- // The main thread of the render process.
- MessageLoopForIO main_message_loop;
+ // The main message loop of the utility process.
+ MessageLoop main_message_loop;
std::wstring app_name = chrome::kBrowserAppName;
PlatformThread::SetName(WideToASCII(app_name + L"_UtilityMain").c_str());
// Initialize the SystemMonitor
base::SystemMonitor::Start();
- ChildProcess utility_process(new UtilityThread());
+ ChildProcess utility_process;
+ utility_process.set_main_thread(new UtilityThread());
#if defined(OS_WIN)
sandbox::TargetServices* target_services =
parameters.sandbox_info_.TargetServices();
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc
index 46815b1..dc9f965 100644
--- a/chrome/utility/utility_thread.cc
+++ b/chrome/utility/utility_thread.cc
@@ -11,20 +11,11 @@
#include "chrome/common/extensions/extension_unpacker.h"
#include "chrome/common/render_messages.h"
-UtilityThread::UtilityThread() : ChildThread(base::Thread::Options()) {
-}
-
-UtilityThread::~UtilityThread() {
-}
-
-void UtilityThread::Init() {
- ChildThread::Init();
+UtilityThread::UtilityThread() {
ChildProcess::current()->AddRefProcess();
}
-void UtilityThread::CleanUp() {
- // Shutdown in reverse of the initialization order.
- ChildThread::CleanUp();
+UtilityThread::~UtilityThread() {
}
void UtilityThread::OnControlMessageReceived(const IPC::Message& msg) {
diff --git a/chrome/utility/utility_thread.h b/chrome/utility/utility_thread.h
index 1c128ad..4fad53e 100644
--- a/chrome/utility/utility_thread.h
+++ b/chrome/utility/utility_thread.h
@@ -7,7 +7,6 @@
#include <string>
-#include "base/thread.h"
#include "chrome/common/child_thread.h"
class GURL;
@@ -31,10 +30,6 @@ class UtilityThread : public ChildThread {
// IPC messages for web resource service.
void OnUnpackWebResource(const std::string& resource_data);
- // Called by the thread base class
- virtual void Init();
- virtual void CleanUp();
-
DISALLOW_COPY_AND_ASSIGN(UtilityThread);
};