diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-21 08:05:28 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-21 08:05:28 +0000 |
commit | 8930d471c128ed74b11beaa78ea1b171c1ac7157 (patch) | |
tree | 5a20cb03c8e5019385709bc069e67f03488c41a1 /chrome/browser/renderer_host | |
parent | a41fae8db8109bfeed047015b77b0d9227118540 (diff) | |
download | chromium_src-8930d471c128ed74b11beaa78ea1b171c1ac7157.zip chromium_src-8930d471c128ed74b11beaa78ea1b171c1ac7157.tar.gz chromium_src-8930d471c128ed74b11beaa78ea1b171c1ac7157.tar.bz2 |
Refactor code from RenderThread and PluginThread and move it to ChildThread. ChildProcess now owns the ChildThread, which removes duplicate code and simplifies things.
Clean up ChildProcess, there really was no need for all the templates and statics in it and its subclasses.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10080
Review URL: http://codereview.chromium.org/21502
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 45e8b2a..ea98413 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -18,6 +18,7 @@ #include "base/path_service.h" #include "base/process_util.h" #include "base/rand_util.h" +#include "base/scoped_ptr.h" #include "base/shared_memory.h" #include "base/singleton.h" #include "base/string_util.h" @@ -83,8 +84,7 @@ class RendererMainThread : public base::Thread { CoInitialize(NULL); #endif - bool rv = RenderProcess::GlobalInit(channel_id_); - DCHECK(rv); + render_process_.reset(new RenderProcess(channel_id_)); // It's a little lame to manually set this flag. But the single process // RendererThread will receive the WM_QUIT. We don't need to assert on // this thread, so just force the flag manually. @@ -94,7 +94,7 @@ class RendererMainThread : public base::Thread { } virtual void CleanUp() { - RenderProcess::GlobalCleanup(); + render_process_.reset(); #if defined(OS_WIN) CoUninitialize(); @@ -103,6 +103,7 @@ class RendererMainThread : public base::Thread { private: std::wstring channel_id_; + scoped_ptr<RenderProcess> render_process_; }; // Used for a View_ID where the renderer has not been attached yet |