summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 05:25:11 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 05:25:11 +0000
commitd14c5b33046616ee8715181d70bc7fe33659be17 (patch)
tree490118db7e397d91dd45e4746060b20ab76c0d58
parenta10a5f8279a043789a5f6ae41b2675fc23799976 (diff)
downloadchromium_src-d14c5b33046616ee8715181d70bc7fe33659be17.zip
chromium_src-d14c5b33046616ee8715181d70bc7fe33659be17.tar.gz
chromium_src-d14c5b33046616ee8715181d70bc7fe33659be17.tar.bz2
components: Use base::MessageLoop.
BUG=236029 R=joi@chromium.org Review URL: https://chromiumcodereview.appspot.com/14021020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198374 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--components/autofill/browser/address_unittest.cc2
-rw-r--r--components/autofill/browser/autocheckout/whitelist_manager_unittest.cc2
-rw-r--r--components/autofill/browser/autofill_download_unittest.cc4
-rw-r--r--components/autofill/browser/personal_data_manager_unittest.cc89
-rw-r--r--components/autofill/browser/webdata/web_data_service_unittest.cc39
-rw-r--r--components/autofill/renderer/autofill_agent.cc9
-rw-r--r--components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc2
-rw-r--r--components/visitedlink/test/visitedlink_unittest.cc16
-rw-r--r--components/webdata/common/web_data_request_manager.cc12
-rw-r--r--components/webdata/common/web_data_service_test_util.h2
10 files changed, 90 insertions, 87 deletions
diff --git a/components/autofill/browser/address_unittest.cc b/components/autofill/browser/address_unittest.cc
index 2b74f40..be18ea2 100644
--- a/components/autofill/browser/address_unittest.cc
+++ b/components/autofill/browser/address_unittest.cc
@@ -23,7 +23,7 @@ class AddressTest : public testing::Test {
AddressTest() : ui_thread_(BrowserThread::UI, &message_loop_) {}
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
DISALLOW_COPY_AND_ASSIGN(AddressTest);
diff --git a/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc b/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
index 0aaedc8..ea7c920 100644
--- a/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
+++ b/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
@@ -146,7 +146,7 @@ class WhitelistManagerTest : public testing::Test {
scoped_ptr<TestWhitelistManager> whitelist_manager_;
private:
- MessageLoopForIO message_loop_;
+ base::MessageLoopForIO message_loop_;
// The profile's request context must be released on the IO thread.
content::TestBrowserThread io_thread_;
};
diff --git a/components/autofill/browser/autofill_download_unittest.cc b/components/autofill/browser/autofill_download_unittest.cc
index 2e9c405..86a0b71 100644
--- a/components/autofill/browser/autofill_download_unittest.cc
+++ b/components/autofill/browser/autofill_download_unittest.cc
@@ -138,7 +138,7 @@ class AutofillDownloadTest : public AutofillDownloadManager::Observer,
};
TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
- MessageLoopForUI message_loop;
+ base::MessageLoopForUI message_loop;
// Create and register factory.
net::TestURLFetcherFactory factory;
@@ -350,7 +350,7 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
}
TEST_F(AutofillDownloadTest, CacheQueryTest) {
- MessageLoopForUI message_loop;
+ base::MessageLoopForUI message_loop;
// Create and register factory.
net::TestURLFetcherFactory factory;
diff --git a/components/autofill/browser/personal_data_manager_unittest.cc b/components/autofill/browser/personal_data_manager_unittest.cc
index 6191e48..8e67dc0 100644
--- a/components/autofill/browser/personal_data_manager_unittest.cc
+++ b/components/autofill/browser/personal_data_manager_unittest.cc
@@ -37,7 +37,7 @@ namespace {
ACTION(QuitUIMessageLoop) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
class PersonalDataLoadedObserverMock : public PersonalDataManagerObserver {
@@ -87,8 +87,9 @@ class PersonalDataManagerTest : public testing::Test {
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
done.Wait();
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
db_thread_.Stop();
}
@@ -100,14 +101,14 @@ class PersonalDataManagerTest : public testing::Test {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void MakeProfileIncognito() {
profile_->set_incognito(true);
}
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread db_thread_;
scoped_ptr<TestingProfile> profile_;
@@ -194,7 +195,7 @@ TEST_F(PersonalDataManagerTest, AddUpdateRemoveProfiles) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results1 = personal_data_->GetProfiles();
ASSERT_EQ(2U, results1.size());
@@ -210,7 +211,7 @@ TEST_F(PersonalDataManagerTest, AddUpdateRemoveProfiles) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
ASSERT_EQ(2U, results2.size());
@@ -249,7 +250,7 @@ TEST_F(PersonalDataManagerTest, AddUpdateRemoveCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<CreditCard*>& results1 = personal_data_->GetCreditCards();
ASSERT_EQ(2U, results1.size());
@@ -265,7 +266,7 @@ TEST_F(PersonalDataManagerTest, AddUpdateRemoveCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards();
ASSERT_EQ(2U, results2.size());
@@ -396,7 +397,7 @@ TEST_F(PersonalDataManagerTest, AddProfilesAndCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results1 = personal_data_->GetProfiles();
ASSERT_EQ(2U, results1.size());
@@ -410,7 +411,7 @@ TEST_F(PersonalDataManagerTest, AddProfilesAndCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards();
ASSERT_EQ(2U, results2.size());
@@ -440,7 +441,7 @@ TEST_F(PersonalDataManagerTest, PopulateUniqueIDsOnLoad) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Verify that we've loaded the profiles from the web database.
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -456,7 +457,7 @@ TEST_F(PersonalDataManagerTest, PopulateUniqueIDsOnLoad) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Make sure the two profiles have different GUIDs, both valid.
const std::vector<AutofillProfile*>& results3 = personal_data_->GetProfiles();
@@ -531,7 +532,7 @@ TEST_F(PersonalDataManagerTest, Refresh) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results1 = personal_data_->GetProfiles();
ASSERT_EQ(2U, results1.size());
@@ -558,7 +559,7 @@ TEST_F(PersonalDataManagerTest, Refresh) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
ASSERT_EQ(3U, results2.size());
@@ -583,7 +584,7 @@ TEST_F(PersonalDataManagerTest, Refresh) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results3 = personal_data_->GetProfiles();
ASSERT_EQ(1U, results3.size());
@@ -621,7 +622,7 @@ TEST_F(PersonalDataManagerTest, ImportFormData) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -866,7 +867,7 @@ TEST_F(PersonalDataManagerTest, ImportPhoneNumberSplitAcrossMultipleFields) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -946,7 +947,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentProfiles) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -986,7 +987,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentProfiles) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -1031,7 +1032,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -1070,7 +1071,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -1124,7 +1125,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(
@@ -1174,7 +1175,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -1217,7 +1218,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInOld) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -1257,7 +1258,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInOld) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -1304,7 +1305,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInNew) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -1345,7 +1346,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInNew) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
@@ -1473,7 +1474,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected;
test::SetCreditCardInfo(&expected,
@@ -1506,7 +1507,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentCreditCards) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected2;
test::SetCreditCardInfo(&expected2,"", "5500000000000004", "02", "2012");
@@ -1544,7 +1545,7 @@ TEST_F(PersonalDataManagerTest, AggregateInvalidCreditCard) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected;
test::SetCreditCardInfo(&expected,
@@ -1609,7 +1610,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameCreditCardWithConflict) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected;
test::SetCreditCardInfo(&expected,
@@ -1641,7 +1642,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameCreditCardWithConflict) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Expect that the newer information is saved. In this case the year is
// updated to "2012".
@@ -1681,7 +1682,7 @@ TEST_F(PersonalDataManagerTest, AggregateEmptyCreditCardWithConflict) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected;
test::SetCreditCardInfo(&expected,
@@ -1747,7 +1748,7 @@ TEST_F(PersonalDataManagerTest, AggregateCreditCardWithMissingInfoInNew) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
CreditCard expected;
test::SetCreditCardInfo(&expected,
@@ -1826,7 +1827,7 @@ TEST_F(PersonalDataManagerTest, AggregateCreditCardWithMissingInfoInOld) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<CreditCard*>& results1 = personal_data_->GetCreditCards();
ASSERT_EQ(1U, results1.size());
@@ -1858,7 +1859,7 @@ TEST_F(PersonalDataManagerTest, AggregateCreditCardWithMissingInfoInOld) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Expect that the newer information is saved. In this case the year is
// added to the existing credit card.
@@ -1883,7 +1884,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameCreditCardWithSeparators) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<CreditCard*>& results1 = personal_data_->GetCreditCards();
ASSERT_EQ(1U, results1.size());
@@ -1975,7 +1976,7 @@ TEST_F(PersonalDataManagerTest,
// Wait for the refresh, which in this case is a no-op.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Expect that no new profile is saved.
const std::vector<AutofillProfile*>& results = personal_data_->GetProfiles();
@@ -2053,7 +2054,7 @@ TEST_F(PersonalDataManagerTest, GetNonEmptyTypes) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
personal_data_->GetNonEmptyTypes(&non_empty_types);
EXPECT_EQ(14U, non_empty_types.size());
@@ -2091,7 +2092,7 @@ TEST_F(PersonalDataManagerTest, GetNonEmptyTypes) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
personal_data_->GetNonEmptyTypes(&non_empty_types);
EXPECT_EQ(18U, non_empty_types.size());
@@ -2124,7 +2125,7 @@ TEST_F(PersonalDataManagerTest, GetNonEmptyTypes) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
personal_data_->GetNonEmptyTypes(&non_empty_types);
EXPECT_EQ(25U, non_empty_types.size());
@@ -2192,7 +2193,7 @@ TEST_F(PersonalDataManagerTest, CaseInsensitiveMultiValueAggregation) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
AutofillProfile expected;
test::SetProfileInfo(&expected, "George", NULL,
@@ -2235,7 +2236,7 @@ TEST_F(PersonalDataManagerTest, CaseInsensitiveMultiValueAggregation) {
// Verify that the web database has been updated and the notification sent.
EXPECT_CALL(personal_data_observer_,
OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles();
diff --git a/components/autofill/browser/webdata/web_data_service_unittest.cc b/components/autofill/browser/webdata/web_data_service_unittest.cc
index 362f828..98f0313 100644
--- a/components/autofill/browser/webdata/web_data_service_unittest.cc
+++ b/components/autofill/browser/webdata/web_data_service_unittest.cc
@@ -88,8 +88,9 @@ class WebDataServiceTest : public testing::Test {
wdbs_ = NULL;
WaitForDatabaseThread();
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
db_thread_.Stop();
}
@@ -102,7 +103,7 @@ class WebDataServiceTest : public testing::Test {
done.Wait();
}
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread db_thread_;
base::FilePath profile_dir_;
@@ -188,7 +189,7 @@ class KeywordsConsumer : public WebDataServiceConsumer {
}
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
// True if keywords data was loaded successfully.
@@ -224,7 +225,7 @@ TEST_F(WebDataServiceAutofillTest, FormFillAdd) {
name1_, base::string16(), limit, &consumer);
// The message loop will exit when the consumer is called.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(1U, consumer.result().size());
@@ -301,7 +302,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileAdd) {
// Check that it was added.
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> > consumer;
WebDataService::Handle handle = wds_->GetAutofillProfiles(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(1U, consumer.result().size());
EXPECT_EQ(profile, *consumer.result()[0]);
@@ -320,7 +321,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
// Check that it was added.
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> > consumer;
WebDataService::Handle handle = wds_->GetAutofillProfiles(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(1U, consumer.result().size());
EXPECT_EQ(profile, *consumer.result()[0]);
@@ -339,7 +340,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
// Check that it was removed.
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> > consumer2;
WebDataService::Handle handle2 = wds_->GetAutofillProfiles(&consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(0U, consumer2.result().size());
}
@@ -361,7 +362,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
// Check that they were added.
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> > consumer;
WebDataService::Handle handle = wds_->GetAutofillProfiles(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(2U, consumer.result().size());
EXPECT_EQ(profile1, *consumer.result()[0]);
@@ -383,7 +384,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
// Check that the updates were made.
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> > consumer2;
WebDataService::Handle handle2 = wds_->GetAutofillProfiles(&consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(2U, consumer2.result().size());
EXPECT_NE(profile1, *consumer2.result()[0]);
@@ -400,7 +401,7 @@ TEST_F(WebDataServiceAutofillTest, CreditAdd) {
// Check that it was added.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > consumer;
WebDataService::Handle handle = wds_->GetCreditCards(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(1U, consumer.result().size());
EXPECT_EQ(card, *consumer.result()[0]);
@@ -417,7 +418,7 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
// Check that it was added.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > consumer;
WebDataService::Handle handle = wds_->GetCreditCards(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(1U, consumer.result().size());
EXPECT_EQ(credit_card, *consumer.result()[0]);
@@ -430,7 +431,7 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
// Check that it was removed.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > consumer2;
WebDataService::Handle handle2 = wds_->GetCreditCards(&consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(0U, consumer2.result().size());
}
@@ -448,7 +449,7 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
// Check that they got added.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > consumer;
WebDataService::Handle handle = wds_->GetCreditCards(&consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(2U, consumer.result().size());
EXPECT_EQ(card1, *consumer.result()[0]);
@@ -464,7 +465,7 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
// Check that the updates were made.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > consumer2;
WebDataService::Handle handle2 = wds_->GetCreditCards(&consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(2U, consumer2.result().size());
EXPECT_NE(card1, *consumer2.result()[0]);
@@ -485,7 +486,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
AutofillWebDataServiceConsumer<std::vector<AutofillProfile*> >
profile_consumer;
WebDataService::Handle handle = wds_->GetAutofillProfiles(&profile_consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, profile_consumer.handle());
ASSERT_EQ(1U, profile_consumer.result().size());
EXPECT_EQ(profile, *profile_consumer.result()[0]);
@@ -499,7 +500,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
// Check that it was added.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer;
handle = wds_->GetCreditCards(&card_consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle, card_consumer.handle());
ASSERT_EQ(1U, card_consumer.result().size());
EXPECT_EQ(credit_card, *card_consumer.result()[0]);
@@ -521,14 +522,14 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
profile_consumer2;
WebDataService::Handle handle2 =
wds_->GetAutofillProfiles(&profile_consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, profile_consumer2.handle());
ASSERT_EQ(0U, profile_consumer2.result().size());
// Check that the credit card was removed.
AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2;
handle2 = wds_->GetCreditCards(&card_consumer2);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, card_consumer2.handle());
ASSERT_EQ(0U, card_consumer2.result().size());
}
diff --git a/components/autofill/renderer/autofill_agent.cc b/components/autofill/renderer/autofill_agent.cc
index fa2b8a8..27795c4 100644
--- a/components/autofill/renderer/autofill_agent.cc
+++ b/components/autofill/renderer/autofill_agent.cc
@@ -469,10 +469,11 @@ void AutofillAgent::textFieldDidChange(const WebInputElement& element) {
// properly at this point (http://bugs.webkit.org/show_bug.cgi?id=16976) and
// it is needed to trigger autofill.
weak_ptr_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&AutofillAgent::TextFieldDidChangeImpl,
- weak_ptr_factory_.GetWeakPtr(), element));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&AutofillAgent::TextFieldDidChangeImpl,
+ weak_ptr_factory_.GetWeakPtr(),
+ element));
}
void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) {
diff --git a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
index 6567fbd6..77ddb0d 100644
--- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
+++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
@@ -41,7 +41,7 @@ const char kUnsafeTestUrl[] = "about:crash";
void ContinueTestCase() {
content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
+ content::BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
}
// The MS C++ compiler complains about not being able to resolve which url()
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
index bc11ec3..8ed733cd 100644
--- a/components/visitedlink/test/visitedlink_unittest.cc
+++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -222,7 +222,7 @@ class VisitedLinkTest : public testing::Test {
base::ScopedTempDir temp_dir_;
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
@@ -438,8 +438,8 @@ TEST_F(VisitedLinkTest, Rebuild) {
// complete before we set the task because the rebuild completion message
// is posted to the message loop; until we Run() it, rebuild can not
// complete.
- master_->set_rebuild_complete_task(MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ master_->set_rebuild_complete_task(base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
// Test that all URLs were written to the database properly.
Reload();
@@ -458,8 +458,8 @@ TEST_F(VisitedLinkTest, BigImport) {
master_->AddURL(TestURL(i));
// Wait for the rebuild to complete.
- master_->set_rebuild_complete_task(MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ master_->set_rebuild_complete_task(base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
// Ensure that the right number of URLs are present
int used_count = master_->GetUsedCount();
@@ -614,11 +614,11 @@ class VisitedLinkEventsTest : public content::RenderViewHostTestHarness {
void WaitForCoalescense() {
// Let the timer fire.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(110));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
protected:
diff --git a/components/webdata/common/web_data_request_manager.cc b/components/webdata/common/web_data_request_manager.cc
index abba122..c6e15f9 100644
--- a/components/webdata/common/web_data_request_manager.cc
+++ b/components/webdata/common/web_data_request_manager.cc
@@ -21,7 +21,7 @@ WebDataRequest::WebDataRequest(WebDataServiceConsumer* consumer,
consumer_(consumer),
result_(NULL) {
handle_ = manager_->GetNextRequestHandle();
- message_loop_ = MessageLoop::current();
+ message_loop_ = base::MessageLoop::current();
manager_->RegisterRequest(this);
}
@@ -112,11 +112,11 @@ void WebDataRequestManager::CancelRequest(WebDataServiceBase::Handle h) {
void WebDataRequestManager::RequestCompleted(
scoped_ptr<WebDataRequest> request) {
- MessageLoop* loop = request->GetMessageLoop();
- loop->PostTask(FROM_HERE, base::Bind(
- &WebDataRequestManager::RequestCompletedOnThread,
- this,
- base::Passed(&request)));
+ base::MessageLoop* loop = request->GetMessageLoop();
+ loop->PostTask(FROM_HERE,
+ base::Bind(&WebDataRequestManager::RequestCompletedOnThread,
+ this,
+ base::Passed(&request)));
}
void WebDataRequestManager::RequestCompletedOnThread(
diff --git a/components/webdata/common/web_data_service_test_util.h b/components/webdata/common/web_data_service_test_util.h
index e3ee512..0b32c33 100644
--- a/components/webdata/common/web_data_service_test_util.h
+++ b/components/webdata/common/web_data_service_test_util.h
@@ -26,7 +26,7 @@ class AutofillWebDataServiceConsumer: public WebDataServiceConsumer {
static_cast<const WDResult<T>*>(result);
result_ = wrapped_result->GetValue();
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
WebDataService::Handle handle() { return handle_; }