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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 RenderThread::~RenderThread() { 300 RenderThread::~RenderThread() {
301 // Wait for all databases to be closed. 301 // Wait for all databases to be closed.
302 if (web_database_observer_impl_.get()) 302 if (web_database_observer_impl_.get())
303 web_database_observer_impl_->WaitForAllDatabasesToClose(); 303 web_database_observer_impl_->WaitForAllDatabasesToClose();
304 304
305 // Shutdown in reverse of the initialization order. 305 // Shutdown in reverse of the initialization order.
306 RemoveFilter(db_message_filter_.get()); 306 RemoveFilter(db_message_filter_.get());
307 db_message_filter_ = NULL; 307 db_message_filter_ = NULL;
308 RemoveFilter(devtools_agent_filter_.get()); 308 RemoveFilter(devtools_agent_filter_.get());
309 309
310 // Shutdown the file thread if it's running.
311 if (file_thread_.get())
312 file_thread_->Stop();
313
310 if (webkit_client_.get()) 314 if (webkit_client_.get())
311 WebKit::shutdown(); 315 WebKit::shutdown();
312 316
313 lazy_tls.Pointer()->Set(NULL); 317 lazy_tls.Pointer()->Set(NULL);
314 318
315 // TODO(port) 319 // TODO(port)
316 #if defined(OS_WIN) 320 #if defined(OS_WIN)
317 // Clean up plugin channels before this thread goes away. 321 // Clean up plugin channels before this thread goes away.
318 PluginChannelBase::CleanupChannels(); 322 PluginChannelBase::CleanupChannels();
319 // Don't call COM if the renderer is in the sandbox. 323 // Don't call COM if the renderer is in the sandbox.
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 } 1097 }
1094 1098
1095 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) { 1099 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) {
1096 for (size_t i = 0; i < extension_extents_.size(); ++i) { 1100 for (size_t i = 0; i < extension_extents_.size(); ++i) {
1097 if (extension_extents_[i].browse_extent.ContainsURL(url)) 1101 if (extension_extents_[i].browse_extent.ContainsURL(url))
1098 return extension_extents_[i].extension_id; 1102 return extension_extents_[i].extension_id;
1099 } 1103 }
1100 1104
1101 return std::string(); 1105 return std::string();
1102 } 1106 }
1107
1108 scoped_refptr<base::MessageLoopProxy>
1109 RenderThread::GetFileThreadMessageLoopProxy() {
1110 DCHECK(message_loop() == MessageLoop::current());
1111 if (!file_thread_.get()) {
1112 file_thread_.reset(new base::Thread("Renderer::FILE"));
1113 file_thread_->Start();
1114 }
1115 return file_thread_->message_loop_proxy();
1116 }
OLDNEW
« 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