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

Unified Diff: chrome/browser/io_thread.cc

Issue 8775014: Remove IOThread::message_loop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years 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/browser/io_thread.h ('k') | chrome/browser/net/proxy_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 12b0c5076508321656884bd0b1cba45ad90dc8e2..130a9324166ce411c1d6ad13f63f597fae3b383b 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -589,11 +589,6 @@ void IOThread::ClearHostCache() {
host_cache->clear();
}
-MessageLoop* IOThread::message_loop() const {
- return BrowserThread::UnsafeGetBrowserThread(
- BrowserThread::IO)->message_loop();
-}
-
net::SSLConfigService* IOThread::GetSSLConfigService() {
return ssl_config_service_manager_->Get();
}
@@ -602,7 +597,7 @@ void IOThread::InitSystemRequestContext() {
if (system_url_request_context_getter_)
return;
// If we're in unit_tests, IOThread may not be run.
- if (!message_loop())
+ if (!BrowserThread::IsMessageLoopValid(BrowserThread::IO))
return;
ChromeProxyConfigService* proxy_config_service =
ProxyServiceFactory::CreateProxyConfigService();
@@ -615,9 +610,11 @@ void IOThread::InitSystemRequestContext() {
new SystemURLRequestContextGetter(this);
// Safe to post an unretained this pointer, since IOThread is
// guaranteed to outlive the IO BrowserThread.
- message_loop()->PostTask(
- FROM_HERE, base::Bind(&IOThread::InitSystemRequestContextOnIOThread,
- base::Unretained(this)));
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&IOThread::InitSystemRequestContextOnIOThread,
+ base::Unretained(this)));
}
void IOThread::InitSystemRequestContextOnIOThread() {
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/net/proxy_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698