summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
commitedd685f15dfd2841aaeddab567aea0623db1ae69 (patch)
tree9caa53e84eb2787471dd16009daf02fb85f8890e /net/disk_cache
parent5b79e5250785613d6dc7a42a27a45bb44b9cf7a0 (diff)
downloadchromium_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/disk_cache')
-rw-r--r--net/disk_cache/backend_unittest.cc4
-rw-r--r--net/disk_cache/disk_cache_test_base.cc6
-rw-r--r--net/disk_cache/disk_cache_test_util.cc2
-rw-r--r--net/disk_cache/in_flight_io.cc4
4 files changed, 8 insertions, 8 deletions
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) {
}