Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2632)

Unified Diff: chrome/renderer/render_thread.cc

Issue 3151029: Add a file thread to the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_thread.cc
===================================================================
--- chrome/renderer/render_thread.cc (revision 56828)
+++ chrome/renderer/render_thread.cc (working copy)
@@ -307,6 +307,10 @@
db_message_filter_ = NULL;
RemoveFilter(devtools_agent_filter_.get());
+ // Shutdown the file thread if it's running.
+ if (file_thread_.get())
+ file_thread_->Stop();
+
if (webkit_client_.get())
WebKit::shutdown();
@@ -1100,3 +1104,13 @@
return std::string();
}
+
+scoped_refptr<base::MessageLoopProxy>
+RenderThread::GetFileThreadMessageLoopProxy() {
+ DCHECK(message_loop() == MessageLoop::current());
+ if (!file_thread_.get()) {
+ file_thread_.reset(new base::Thread("Renderer::FILE"));
+ file_thread_->Start();
+ }
+ return file_thread_->message_loop_proxy();
+}
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698