diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 20:33:46 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 20:33:46 +0000 |
commit | edd685f15dfd2841aaeddab567aea0623db1ae69 (patch) | |
tree | 9caa53e84eb2787471dd16009daf02fb85f8890e /net | |
parent | 5b79e5250785613d6dc7a42a27a45bb44b9cf7a0 (diff) | |
download | chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.zip chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.gz chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.bz2 |
Add MessageLoopProxy::current
Review URL: http://codereview.chromium.org/7583053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/directory_lister.cc | 2 | ||||
-rw-r--r-- | net/base/host_resolver_impl.cc | 4 | ||||
-rw-r--r-- | net/disk_cache/backend_unittest.cc | 4 | ||||
-rw-r--r-- | net/disk_cache/disk_cache_test_base.cc | 6 | ||||
-rw-r--r-- | net/disk_cache/disk_cache_test_util.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/in_flight_io.cc | 4 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc | 2 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_fetcher_win.cc | 2 | ||||
-rw-r--r-- | net/proxy/multi_threaded_proxy_resolver.cc | 2 | ||||
-rw-r--r-- | net/proxy/network_delegate_error_observer_unittest.cc | 4 | ||||
-rw-r--r-- | net/proxy/polling_proxy_config_service.cc | 2 | ||||
-rw-r--r-- | net/proxy/proxy_service.cc | 2 |
12 files changed, 18 insertions, 18 deletions
diff --git a/net/base/directory_lister.cc b/net/base/directory_lister.cc index ee1f138..a5f2a2a 100644 --- a/net/base/directory_lister.cc +++ b/net/base/directory_lister.cc @@ -171,7 +171,7 @@ DirectoryLister::Core::Core(const FilePath& dir, DirectoryLister::Core::~Core() {} bool DirectoryLister::Core::Start() { - origin_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); + origin_loop_ = base::MessageLoopProxy::current(); return base::WorkerPool::PostTask( FROM_HERE, NewRunnableMethod(this, &Core::StartInternal), true); diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 6697507..840d263 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -364,7 +364,7 @@ class HostResolverImpl::Job : id_(id), key_(key), resolver_(resolver), - origin_loop_(base::MessageLoopProxy::CreateForCurrentThread()), + origin_loop_(base::MessageLoopProxy::current()), resolver_proc_(resolver->effective_resolver_proc()), unresponsive_delay_(resolver->unresponsive_delay()), attempt_number_(0), @@ -825,7 +825,7 @@ class HostResolverImpl::IPv6ProbeJob public: explicit IPv6ProbeJob(HostResolverImpl* resolver) : resolver_(resolver), - origin_loop_(base::MessageLoopProxy::CreateForCurrentThread()) { + origin_loop_(base::MessageLoopProxy::current()) { DCHECK(resolver); } diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 3bf1aac..dd7bf89 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc @@ -266,7 +266,7 @@ TEST_F(DiskCacheTest, ShutdownWithPendingIO) { disk_cache::Backend* cache; int rv = disk_cache::BackendImpl::CreateBackend( path, false, 0, net::DISK_CACHE, disk_cache::kNoRandom, - base::MessageLoopProxy::CreateForCurrentThread(), NULL, + base::MessageLoopProxy::current(), NULL, &cache, &cb); ASSERT_EQ(net::OK, cb.GetResult(rv)); @@ -1818,7 +1818,7 @@ TEST_F(DiskCacheTest, Backend_UsageStats) { ASSERT_TRUE(DeleteCache(path)); scoped_ptr<disk_cache::BackendImpl> cache; cache.reset(new disk_cache::BackendImpl( - path, base::MessageLoopProxy::CreateForCurrentThread(), + path, base::MessageLoopProxy::current(), NULL)); ASSERT_TRUE(NULL != cache.get()); cache->SetUnitTestMode(); diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc index bbcb65d..b9e1d10 100644 --- a/net/disk_cache/disk_cache_test_base.cc +++ b/net/disk_cache/disk_cache_test_base.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -250,7 +250,7 @@ void DiskCacheTestWithCache::InitDiskCache() { return InitDiskCacheImpl(path); scoped_refptr<base::MessageLoopProxy> thread = - use_current_thread_ ? base::MessageLoopProxy::CreateForCurrentThread() : + use_current_thread_ ? base::MessageLoopProxy::current() : cache_thread_.message_loop_proxy(); TestCompletionCallback cb; @@ -262,7 +262,7 @@ void DiskCacheTestWithCache::InitDiskCache() { void DiskCacheTestWithCache::InitDiskCacheImpl(const FilePath& path) { scoped_refptr<base::MessageLoopProxy> thread = - use_current_thread_ ? base::MessageLoopProxy::CreateForCurrentThread() : + use_current_thread_ ? base::MessageLoopProxy::current() : cache_thread_.message_loop_proxy(); if (mask_) cache_impl_ = new disk_cache::BackendImpl(path, mask_, thread, NULL); diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc index 296636a..054a41e 100644 --- a/net/disk_cache/disk_cache_test_util.cc +++ b/net/disk_cache/disk_cache_test_util.cc @@ -94,7 +94,7 @@ bool CopyTestCache(const std::string& name) { bool CheckCacheIntegrity(const FilePath& path, bool new_eviction) { scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl( - path, base::MessageLoopProxy::CreateForCurrentThread(), NULL)); + path, base::MessageLoopProxy::current(), NULL)); if (!cache.get()) return false; if (new_eviction) diff --git a/net/disk_cache/in_flight_io.cc b/net/disk_cache/in_flight_io.cc index f10b4a6..6f4b37c 100644 --- a/net/disk_cache/in_flight_io.cc +++ b/net/disk_cache/in_flight_io.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,7 +33,7 @@ void BackgroundIO::NotifyController() { // --------------------------------------------------------------------------- InFlightIO::InFlightIO() - : callback_thread_(base::MessageLoopProxy::CreateForCurrentThread()), + : callback_thread_(base::MessageLoopProxy::current()), running_(false), single_thread_(false) { } diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc index 017f246..6b7283d 100644 --- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc +++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc @@ -112,7 +112,7 @@ GURL DhcpProxyScriptAdapterFetcher::GetPacURL() const { DhcpProxyScriptAdapterFetcher::WorkerThread::WorkerThread( const base::WeakPtr<DhcpProxyScriptAdapterFetcher>& owner) : owner_(owner), - origin_loop_(base::MessageLoopProxy::CreateForCurrentThread()) { + origin_loop_(base::MessageLoopProxy::current()) { } DhcpProxyScriptAdapterFetcher::WorkerThread::~WorkerThread() { diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc index 2c7fd23..5453284 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_win.cc +++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc @@ -371,7 +371,7 @@ DhcpProxyScriptFetcherWin::WorkerThread::WorkerThread() { void DhcpProxyScriptFetcherWin::WorkerThread::Init( const base::WeakPtr<DhcpProxyScriptFetcherWin>& owner) { owner_ = owner; - origin_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); + origin_loop_ = base::MessageLoopProxy::current(); } bool DhcpProxyScriptFetcherWin::WorkerThread::ImplGetCandidateAdapterNames( diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc index 9db392b..99647e3 100644 --- a/net/proxy/multi_threaded_proxy_resolver.cc +++ b/net/proxy/multi_threaded_proxy_resolver.cc @@ -321,7 +321,7 @@ void MultiThreadedProxyResolver::Executor::StartJob(Job* job) { thread_->message_loop()->PostTask( FROM_HERE, NewRunnableMethod(job, &Job::Run, - base::MessageLoopProxy::CreateForCurrentThread())); + base::MessageLoopProxy::current())); } void MultiThreadedProxyResolver::Executor::OnJobCompleted(Job* job) { diff --git a/net/proxy/network_delegate_error_observer_unittest.cc b/net/proxy/network_delegate_error_observer_unittest.cc index 4eec44d..551c006 100644 --- a/net/proxy/network_delegate_error_observer_unittest.cc +++ b/net/proxy/network_delegate_error_observer_unittest.cc @@ -65,7 +65,7 @@ TEST(NetworkDelegateErrorObserverTest, CallOnThread) { TestNetworkDelegate network_delegate; NetworkDelegateErrorObserver observer(&network_delegate, - base::MessageLoopProxy::CreateForCurrentThread()); + base::MessageLoopProxy::current()); thread.message_loop()->PostTask( FROM_HERE, NewRunnableMethod(&observer, @@ -81,7 +81,7 @@ TEST(NetworkDelegateErrorObserverTest, NoDelegate) { base::Thread thread("test_thread"); thread.Start(); NetworkDelegateErrorObserver - observer(NULL, base::MessageLoopProxy::CreateForCurrentThread()); + observer(NULL, base::MessageLoopProxy::current()); thread.message_loop()->PostTask( FROM_HERE, NewRunnableMethod(&observer, diff --git a/net/proxy/polling_proxy_config_service.cc b/net/proxy/polling_proxy_config_service.cc index b347bc5..339fda6 100644 --- a/net/proxy/polling_proxy_config_service.cc +++ b/net/proxy/polling_proxy_config_service.cc @@ -136,7 +136,7 @@ class PollingProxyConfigService::Core // UI thread so we can't cache the IO thread for the purpose // of DCHECKs until the first call is made. if (!have_initialized_origin_loop_) { - origin_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread(); + origin_loop_proxy_ = base::MessageLoopProxy::current(); have_initialized_origin_loop_ = true; } } diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index d9173fb..66bf929 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -428,7 +428,7 @@ ProxyService* ProxyService::CreateUsingV8ProxyResolver( new ProxyResolverFactoryForV8( host_resolver, MessageLoop::current(), - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), net_log, network_delegate); |