diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 07:24:18 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 07:24:18 +0000 |
commit | a346e5d85135c9c5261ad33a20293bf10ca74468 (patch) | |
tree | a91d386790b2812936b4b618165b4e411172f095 /chrome/browser/first_run.cc | |
parent | b9c3a91b0340151f21e3708b8187f295e6cf8cfd (diff) | |
download | chromium_src-a346e5d85135c9c5261ad33a20293bf10ca74468.zip chromium_src-a346e5d85135c9c5261ad33a20293bf10ca74468.tar.gz chromium_src-a346e5d85135c9c5261ad33a20293bf10ca74468.tar.bz2 |
rollback r498 and r500 to repair test bustage
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run.cc')
-rw-r--r-- | chrome/browser/first_run.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc index 51720ab..9824462 100644 --- a/chrome/browser/first_run.cc +++ b/chrome/browser/first_run.cc @@ -36,6 +36,7 @@ #include "base/file_util.h" #include "base/logging.h" +#include "base/object_watcher.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/string_util.h" @@ -197,7 +198,7 @@ namespace { // process has ended and what was the result of the operation as reported by // the process exit code. This class executes in the context of the main chrome // process. -class ImportProcessRunner : public MessageLoop::Watcher { +class ImportProcessRunner : public base::ObjectWatcher::Delegate { public: // The constructor takes the importer process to watch and then it does a // message loop blocking wait until the process ends. This object now owns @@ -205,7 +206,7 @@ class ImportProcessRunner : public MessageLoop::Watcher { explicit ImportProcessRunner(ProcessHandle import_process) : import_process_(import_process), exit_code_(ResultCodes::NORMAL_EXIT) { - MessageLoop::current()->WatchObject(import_process, this); + watcher_.StartWatching(import_process, this); MessageLoop::current()->Run(); } virtual ~ImportProcessRunner() { @@ -218,7 +219,6 @@ class ImportProcessRunner : public MessageLoop::Watcher { } // The child process has terminated. Find the exit code and quit the loop. virtual void OnObjectSignaled(HANDLE object) { - MessageLoop::current()->WatchObject(object, NULL); DCHECK(object == import_process_); if (!::GetExitCodeProcess(import_process_, &exit_code_)) { NOTREACHED(); @@ -227,6 +227,7 @@ class ImportProcessRunner : public MessageLoop::Watcher { } private: + base::ObjectWatcher watcher_; ProcessHandle import_process_; DWORD exit_code_; }; |