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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 8366020: Create a secondary file thread, FILE_USER_BLOCKING... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: chrome/browser/browser_process_impl.cc
===================================================================
--- chrome/browser/browser_process_impl.cc (revision 106339)
+++ chrome/browser/browser_process_impl.cc (working copy)
@@ -137,6 +137,7 @@
created_db_thread_(false),
created_process_launcher_thread_(false),
created_cache_thread_(false),
+ created_appcache_thread_(false),
created_watchdog_thread_(false),
#if defined(OS_CHROMEOS)
created_web_socket_proxy_thread_(false),
@@ -260,6 +261,9 @@
io_thread_.reset();
// The IO thread was the only user of this thread.
+ appcache_thread_.reset();
+
+ // The IO thread was the only user of this thread.
cache_thread_.reset();
// Stop the process launcher thread after the IO thread, in case the IO thread
@@ -438,6 +442,14 @@
return cache_thread_.get();
}
+base::Thread* BrowserProcessImpl::appcache_thread() {
+ DCHECK(CalledOnValidThread());
+ if (!created_appcache_thread_)
+ CreateAppCacheThread();
+ return appcache_thread_.get();
+}
+
+
WatchDogThread* BrowserProcessImpl::watchdog_thread() {
DCHECK(CalledOnValidThread());
if (!created_watchdog_thread_)
@@ -901,6 +913,17 @@
cache_thread_.swap(thread);
}
+void BrowserProcessImpl::CreateAppCacheThread() {
+ DCHECK(!created_appcache_thread_ && !appcache_thread_.get());
+ created_appcache_thread_ = true;
+
+ scoped_ptr<base::Thread> thread(
+ new BrowserThread(BrowserThread::APPCACHE));
rvargas (doing something else) 2011/10/21 19:46:17 Just double checking that you don't intend to use
michaeln 2011/10/21 19:52:12 definitely not right now, i don't anticipate doing
+ if (!thread->Start())
+ return;
+ appcache_thread_.swap(thread);
+}
+
void BrowserProcessImpl::CreateWatchdogThread() {
DCHECK(!created_watchdog_thread_ && watchdog_thread_.get() == NULL);
created_watchdog_thread_ = true;

Powered by Google App Engine
This is Rietveld 408576698