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/renderer/net | |
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/renderer/net')
-rw-r--r-- | chrome/renderer/net/render_dns_master.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/renderer/net/render_dns_master.cc b/chrome/renderer/net/render_dns_master.cc index beacec6..b62b6ca 100644 --- a/chrome/renderer/net/render_dns_master.cc +++ b/chrome/renderer/net/render_dns_master.cc @@ -19,7 +19,7 @@ // This API is used in the render process by renderer_glue.cc. // IF you are in the render process, you MUST be on the renderer thread to call. void DnsPrefetchCString(const char* hostname, size_t length) { - g_render_thread->Resolve(hostname, length); + RenderThread::current()->Resolve(hostname, length); } // The number of hostnames submitted to Browser DNS resolver per call to @@ -55,7 +55,7 @@ void RenderDnsMaster::Resolve(const char* name, size_t length) { if (0 != old_size) return; // Overkill safety net: Don't send too many InvokeLater's. render_dns_factory_.RevokeAll(); - g_render_thread->message_loop()->PostDelayedTask(FROM_HERE, + RenderThread::current()->message_loop()->PostDelayedTask(FROM_HERE, render_dns_factory_.NewRunnableMethod( &RenderDnsMaster::SubmitHostnames), 10); } @@ -89,7 +89,7 @@ void RenderDnsMaster::SubmitHostnames() { DnsPrefetchNames(kMAX_SUBMISSION_PER_TASK); if (new_name_count_ > 0 || 0 < c_string_queue_.Size()) { render_dns_factory_.RevokeAll(); - g_render_thread->message_loop()->PostDelayedTask(FROM_HERE, + RenderThread::current()->message_loop()->PostDelayedTask(FROM_HERE, render_dns_factory_.NewRunnableMethod( &RenderDnsMaster::SubmitHostnames), 10); } else { @@ -145,7 +145,7 @@ void RenderDnsMaster::DnsPrefetchNames(size_t max_count) { new_name_count_ -= names.size(); DCHECK(new_name_count_ >= 0); - g_render_thread->Send(new ViewHostMsg_DnsPrefetch(names)); + RenderThread::current()->Send(new ViewHostMsg_DnsPrefetch(names)); } // is_numeric_ip() checks to see if all characters in name are either numeric, |