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

Unified Diff: chrome/common/important_file_writer_unittest.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 months 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/sync/weak_handle.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/important_file_writer_unittest.cc
diff --git a/chrome/common/important_file_writer_unittest.cc b/chrome/common/important_file_writer_unittest.cc
index 78a7894a8bd2dfa5fb0526524eadabc9a24fc2ef..37012d7ed70f22833a012efb632801dce8e54739 100644
--- a/chrome/common/important_file_writer_unittest.cc
+++ b/chrome/common/important_file_writer_unittest.cc
@@ -58,7 +58,7 @@ class ImportantFileWriterTest : public testing::Test {
TEST_F(ImportantFileWriterTest, Basic) {
ImportantFileWriter writer(file_,
- base::MessageLoopProxy::CreateForCurrentThread());
+ base::MessageLoopProxy::current());
EXPECT_FALSE(file_util::PathExists(writer.path()));
writer.WriteNow("foo");
loop_.RunAllPending();
@@ -69,7 +69,7 @@ TEST_F(ImportantFileWriterTest, Basic) {
TEST_F(ImportantFileWriterTest, ScheduleWrite) {
ImportantFileWriter writer(file_,
- base::MessageLoopProxy::CreateForCurrentThread());
+ base::MessageLoopProxy::current());
writer.set_commit_interval(base::TimeDelta::FromMilliseconds(25));
EXPECT_FALSE(writer.HasPendingWrite());
DataSerializer serializer("foo");
@@ -85,7 +85,7 @@ TEST_F(ImportantFileWriterTest, ScheduleWrite) {
TEST_F(ImportantFileWriterTest, DoScheduledWrite) {
ImportantFileWriter writer(file_,
- base::MessageLoopProxy::CreateForCurrentThread());
+ base::MessageLoopProxy::current());
EXPECT_FALSE(writer.HasPendingWrite());
DataSerializer serializer("foo");
writer.ScheduleWrite(&serializer);
@@ -101,7 +101,7 @@ TEST_F(ImportantFileWriterTest, DoScheduledWrite) {
TEST_F(ImportantFileWriterTest, BatchingWrites) {
ImportantFileWriter writer(file_,
- base::MessageLoopProxy::CreateForCurrentThread());
+ base::MessageLoopProxy::current());
writer.set_commit_interval(base::TimeDelta::FromMilliseconds(25));
DataSerializer foo("foo"), bar("bar"), baz("baz");
writer.ScheduleWrite(&foo);
« no previous file with comments | « chrome/browser/sync/weak_handle.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698