summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 14:47:42 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 14:47:42 +0000
commitdd483706e56499020fc05f4eeb73bf339a39a13e (patch)
tree01e5a9ce4030c09e7cd62993ebdb9a98dcac5076 /chrome/browser/io_thread.cc
parentb6511fcde901e0f5a74fc1e30dafce78a4cc9d9d (diff)
downloadchromium_src-dd483706e56499020fc05f4eeb73bf339a39a13e.zip
chromium_src-dd483706e56499020fc05f4eeb73bf339a39a13e.tar.gz
chromium_src-dd483706e56499020fc05f4eeb73bf339a39a13e.tar.bz2
Remove IOThread::message_loop().
Instead introduce BrowserThread::UnsafeGetMessageLoop which is used in a couple of places. This will be removed in a follow-up change. I could have used UnsafeGetBrowserThread(id)->message_loop() but this is even easier to search for. Also, remove a couple of BrowserProcess accessors that aren't used by anybody, and that were using UnsafeGetBrowserThread. TBR=battre@chromium.org BUG=98716 Review URL: http://codereview.chromium.org/8775014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 12b0c50..130a932 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() {