summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-15 22:24:33 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-15 22:24:33 +0000
commit1ef9001ca9c05ce22d2140c46856bbe52e61a6c5 (patch)
tree9a89a909d7815a001cae2b7e7f7e79b494e507a9 /base
parent880a57f7ad4f7812e65006cdf6e872f3bce01db6 (diff)
downloadchromium_src-1ef9001ca9c05ce22d2140c46856bbe52e61a6c5.zip
chromium_src-1ef9001ca9c05ce22d2140c46856bbe52e61a6c5.tar.gz
chromium_src-1ef9001ca9c05ce22d2140c46856bbe52e61a6c5.tar.bz2
Removes MessageLoop::TYPE_XXX where possible
This is part of attempting to get rid of MessageLoop::Type enum. BUG=none TEST=none R=darin@chromium.org Review URL: https://codereview.chromium.org/136683004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/cancelable_callback_unittest.cc2
-rw-r--r--base/files/file_util_proxy_unittest.cc5
-rw-r--r--base/memory/discardable_memory_provider_unittest.cc5
-rw-r--r--base/timer/timer_unittest.cc16
4 files changed, 13 insertions, 15 deletions
diff --git a/base/cancelable_callback_unittest.cc b/base/cancelable_callback_unittest.cc
index 89c603c..fcbe23c 100644
--- a/base/cancelable_callback_unittest.cc
+++ b/base/cancelable_callback_unittest.cc
@@ -159,7 +159,7 @@ TEST(CancelableCallbackTest, IsNull) {
// CancelableCallback posted to a MessageLoop with PostTask.
// - Callbacks posted to a MessageLoop can be cancelled.
TEST(CancelableCallbackTest, PostTask) {
- MessageLoop loop(MessageLoop::TYPE_DEFAULT);
+ MessageLoop loop;
int count = 0;
CancelableClosure cancelable(base::Bind(&Increment,
diff --git a/base/files/file_util_proxy_unittest.cc b/base/files/file_util_proxy_unittest.cc
index 762d92b0..d01d56d 100644
--- a/base/files/file_util_proxy_unittest.cc
+++ b/base/files/file_util_proxy_unittest.cc
@@ -21,8 +21,7 @@ namespace base {
class FileUtilProxyTest : public testing::Test {
public:
FileUtilProxyTest()
- : message_loop_(MessageLoop::TYPE_IO),
- file_thread_("FileUtilProxyTestFileThread"),
+ : file_thread_("FileUtilProxyTestFileThread"),
error_(PLATFORM_FILE_OK),
created_(false),
file_(kInvalidPlatformFileValue),
@@ -103,7 +102,7 @@ class FileUtilProxyTest : public testing::Test {
const FilePath& test_dir_path() const { return dir_.path(); }
const FilePath test_path() const { return dir_.path().AppendASCII("test"); }
- MessageLoop message_loop_;
+ MessageLoopForIO message_loop_;
Thread file_thread_;
ScopedTempDir dir_;
diff --git a/base/memory/discardable_memory_provider_unittest.cc b/base/memory/discardable_memory_provider_unittest.cc
index 7e84dc4..2050700 100644
--- a/base/memory/discardable_memory_provider_unittest.cc
+++ b/base/memory/discardable_memory_provider_unittest.cc
@@ -62,8 +62,7 @@ class DiscardableMemoryProviderTestBase {
};
DiscardableMemoryProviderTestBase()
- : message_loop_(MessageLoop::TYPE_IO),
- provider_(new internal::DiscardableMemoryProvider) {
+ : provider_(new internal::DiscardableMemoryProvider) {
provider_->RegisterMemoryPressureListener();
}
@@ -101,7 +100,7 @@ class DiscardableMemoryProviderTestBase {
}
private:
- MessageLoop message_loop_;
+ MessageLoopForIO message_loop_;
scoped_ptr<internal::DiscardableMemoryProvider> provider_;
};
diff --git a/base/timer/timer_unittest.cc b/base/timer/timer_unittest.cc
index 728e861..0fb2b45 100644
--- a/base/timer/timer_unittest.cc
+++ b/base/timer/timer_unittest.cc
@@ -375,7 +375,7 @@ TEST(TimerTest, MessageLoopShutdown) {
OneShotTimerTester c(&did_run);
OneShotTimerTester d(&did_run);
{
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
a.Start();
b.Start();
} // MessageLoop destructs by falling out of scope.
@@ -389,7 +389,7 @@ void TimerTestCallback() {
TEST(TimerTest, NonRepeatIsRunning) {
{
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
base::Timer timer(false, false);
EXPECT_FALSE(timer.IsRunning());
timer.Start(FROM_HERE, TimeDelta::FromDays(1),
@@ -402,7 +402,7 @@ TEST(TimerTest, NonRepeatIsRunning) {
{
base::Timer timer(true, false);
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
EXPECT_FALSE(timer.IsRunning());
timer.Start(FROM_HERE, TimeDelta::FromDays(1),
base::Bind(&TimerTestCallback));
@@ -418,7 +418,7 @@ TEST(TimerTest, NonRepeatIsRunning) {
TEST(TimerTest, NonRepeatMessageLoopDeath) {
base::Timer timer(false, false);
{
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
EXPECT_FALSE(timer.IsRunning());
timer.Start(FROM_HERE, TimeDelta::FromDays(1),
base::Bind(&TimerTestCallback));
@@ -429,7 +429,7 @@ TEST(TimerTest, NonRepeatMessageLoopDeath) {
}
TEST(TimerTest, RetainRepeatIsRunning) {
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
base::Timer timer(FROM_HERE, TimeDelta::FromDays(1),
base::Bind(&TimerTestCallback), true);
EXPECT_FALSE(timer.IsRunning());
@@ -442,7 +442,7 @@ TEST(TimerTest, RetainRepeatIsRunning) {
}
TEST(TimerTest, RetainNonRepeatIsRunning) {
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
base::Timer timer(FROM_HERE, TimeDelta::FromDays(1),
base::Bind(&TimerTestCallback), false);
EXPECT_FALSE(timer.IsRunning());
@@ -477,7 +477,7 @@ void SetCallbackHappened2() {
TEST(TimerTest, ContinuationStopStart) {
{
ClearAllCallbackHappened();
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
base::Timer timer(false, false);
timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
base::Bind(&SetCallbackHappened1));
@@ -493,7 +493,7 @@ TEST(TimerTest, ContinuationStopStart) {
TEST(TimerTest, ContinuationReset) {
{
ClearAllCallbackHappened();
- base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT);
+ base::MessageLoop loop;
base::Timer timer(false, false);
timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
base::Bind(&SetCallbackHappened1));