diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 22:24:33 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 22:24:33 +0000 |
commit | 1ef9001ca9c05ce22d2140c46856bbe52e61a6c5 (patch) | |
tree | 9a89a909d7815a001cae2b7e7f7e79b494e507a9 | |
parent | 880a57f7ad4f7812e65006cdf6e872f3bce01db6 (diff) | |
download | chromium_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
58 files changed, 122 insertions, 151 deletions
diff --git a/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc b/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc index 651726b..f09b5c5 100644 --- a/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc +++ b/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc @@ -147,7 +147,7 @@ class TestStreamReaderJob : public AndroidStreamReaderURLRequestJob { class AndroidStreamReaderURLRequestJobTest : public Test { public: - AndroidStreamReaderURLRequestJobTest() : loop_(base::MessageLoop::TYPE_IO) {} + AndroidStreamReaderURLRequestJobTest() {} protected: virtual void SetUp() { @@ -195,7 +195,7 @@ class AndroidStreamReaderURLRequestJobTest : public Test { DCHECK(set_protocol); } - base::MessageLoop loop_; + base::MessageLoopForIO loop_; TestURLRequestContext context_; android_webview::AwURLRequestJobFactory factory_; TestDelegate url_request_delegate_; 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)); diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc index bd80739..825bbe0 100644 --- a/chrome/browser/chromeos/login/login_utils_browsertest.cc +++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc @@ -148,7 +148,6 @@ class LoginUtilsTest : public testing::Test, LoginUtilsTest() : fake_io_thread_completion_(false, false), fake_io_thread_("fake_io_thread"), - loop_(base::MessageLoop::TYPE_IO), browser_process_(TestingBrowserProcess::GetGlobal()), local_state_(browser_process_), ui_thread_(BrowserThread::UI, &loop_), @@ -455,7 +454,7 @@ class LoginUtilsTest : public testing::Test, base::WaitableEvent fake_io_thread_completion_; base::Thread fake_io_thread_; - base::MessageLoop loop_; + base::MessageLoopForIO loop_; TestingBrowserProcess* browser_process_; ScopedTestingLocalState local_state_; diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index f3e9941..d0bc463 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc @@ -282,7 +282,7 @@ class QueryProtocolHandlerOnChange // our type based on the current thread. GO DEPENDENCY INJECTION! class TestMessageLoop : public base::MessageLoop { public: - TestMessageLoop() : base::MessageLoop(base::MessageLoop::TYPE_DEFAULT) {} + TestMessageLoop() {} virtual ~TestMessageLoop() {} virtual bool IsType(base::MessageLoop::Type type) const OVERRIDE { switch (type) { diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc index b350afc..05c9d62 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc @@ -32,7 +32,7 @@ namespace keys = declarative_webrequest_constants; TEST(WebRequestConditionAttributeTest, CreateConditionAttribute) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; std::string error; scoped_refptr<const WebRequestConditionAttribute> result; @@ -73,7 +73,7 @@ TEST(WebRequestConditionAttributeTest, CreateConditionAttribute) { TEST(WebRequestConditionAttributeTest, ResourceType) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; std::string error; base::ListValue resource_types; @@ -106,7 +106,7 @@ TEST(WebRequestConditionAttributeTest, ResourceType) { TEST(WebRequestConditionAttributeTest, ContentType) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; std::string error; scoped_refptr<const WebRequestConditionAttribute> result; @@ -177,7 +177,7 @@ TEST(WebRequestConditionAttributeTest, ContentType) { // Testing WebRequestConditionAttributeThirdParty. TEST(WebRequestConditionAttributeTest, ThirdParty) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; std::string error; const FundamentalValue value_true(true); @@ -239,7 +239,7 @@ TEST(WebRequestConditionAttributeTest, ThirdParty) { // applicable in all stages. TEST(WebRequestConditionAttributeTest, Stages) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; typedef std::pair<RequestStage, const char*> StageNamePair; static const StageNamePair active_stages[] = { @@ -418,7 +418,7 @@ void MatchAndCheck(const std::vector< std::vector<const std::string*> >& tests, // by both types of condition attributes, so it is enough to test it once. TEST(WebRequestConditionAttributeTest, RequestHeaders) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; net::TestURLRequestContext context; net::TestDelegate delegate; @@ -498,7 +498,7 @@ TEST(WebRequestConditionAttributeTest, RequestHeaders) { // 3. Negating the match in case of 'doesNotContainHeaders'. TEST(WebRequestConditionAttributeTest, ResponseHeaders) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; net::SpawnedTestServer test_server( net::SpawnedTestServer::TYPE_HTTP, diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc index d49a32d..63c9e1b 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc @@ -23,7 +23,7 @@ namespace extensions { TEST(WebRequestConditionTest, CreateCondition) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; std::string error; @@ -101,7 +101,7 @@ TEST(WebRequestConditionTest, CreateCondition) { TEST(WebRequestConditionTest, CreateConditionFirstPartyForCookies) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; std::string error; @@ -147,7 +147,7 @@ TEST(WebRequestConditionTest, CreateConditionFirstPartyForCookies) { // always fulfilled. TEST(WebRequestConditionTest, NoUrlAttributes) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; std::string error; @@ -220,7 +220,7 @@ TEST(WebRequestConditionTest, NoUrlAttributes) { TEST(WebRequestConditionTest, CreateConditionSet) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; WebRequestConditionSet::AnyVector conditions; @@ -289,7 +289,7 @@ TEST(WebRequestConditionTest, CreateConditionSet) { TEST(WebRequestConditionTest, TestPortFilter) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; WebRequestConditionSet::AnyVector conditions; @@ -349,7 +349,7 @@ TEST(WebRequestConditionTest, TestPortFilter) { // impossible that both conditions are fulfilled at the same time. TEST(WebRequestConditionTest, ConditionsWithConflictingStages) { // Necessary for TestURLRequest. - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; URLMatcher matcher; std::string error; diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc index 41a143a..7ef5524 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc @@ -81,8 +81,7 @@ class TestWebRequestRulesRegistry : public WebRequestRulesRegistry { class WebRequestRulesRegistryTest : public testing::Test { public: WebRequestRulesRegistryTest() - : message_loop_(base::MessageLoop::TYPE_IO), - ui_(content::BrowserThread::UI, &message_loop_), + : ui_(content::BrowserThread::UI, &message_loop_), io_(content::BrowserThread::IO, &message_loop_) {} virtual ~WebRequestRulesRegistryTest() {} @@ -223,7 +222,7 @@ class WebRequestRulesRegistryTest : public testing::Test { } protected: - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; content::TestBrowserThread ui_; content::TestBrowserThread io_; // Two extensions with host permissions for all URLs and the DWR permission. diff --git a/chrome/browser/extensions/api/dial/dial_service_unittest.cc b/chrome/browser/extensions/api/dial/dial_service_unittest.cc index 02d5e09..e282a57 100644 --- a/chrome/browser/extensions/api/dial/dial_service_unittest.cc +++ b/chrome/browser/extensions/api/dial/dial_service_unittest.cc @@ -57,7 +57,7 @@ class DialServiceTest : public testing::Test { }; TEST_F(DialServiceTest, TestSendMultipleRequests) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; // Setting the finish delay to zero disables the timer that invokes // FinishDiscovery(). dial_service_.finish_delay_ = TimeDelta::FromSeconds(0); @@ -74,7 +74,7 @@ TEST_F(DialServiceTest, TestSendMultipleRequests) { } TEST_F(DialServiceTest, TestMultipleNetworkInterfaces) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; // Setting the finish delay to zero disables the timer that invokes // FinishDiscovery(). dial_service_.finish_delay_ = TimeDelta::FromSeconds(0); diff --git a/chrome/browser/extensions/default_apps_unittest.cc b/chrome/browser/extensions/default_apps_unittest.cc index 1032d37..d86e08f 100644 --- a/chrome/browser/extensions/default_apps_unittest.cc +++ b/chrome/browser/extensions/default_apps_unittest.cc @@ -29,11 +29,10 @@ class MockExternalLoader : public ExternalLoader { class DefaultAppsTest : public testing::Test { public: - DefaultAppsTest() : loop_(base::MessageLoop::TYPE_IO), - ui_thread_(content::BrowserThread::UI, &loop_) {} + DefaultAppsTest() : ui_thread_(content::BrowserThread::UI, &loop_) {} virtual ~DefaultAppsTest() {} private: - base::MessageLoop loop_; + base::MessageLoopForIO loop_; content::TestBrowserThread ui_thread_; }; diff --git a/chrome/browser/extensions/external_policy_loader_unittest.cc b/chrome/browser/extensions/external_policy_loader_unittest.cc index 8f70dba..de36941 100644 --- a/chrome/browser/extensions/external_policy_loader_unittest.cc +++ b/chrome/browser/extensions/external_policy_loader_unittest.cc @@ -26,9 +26,7 @@ namespace extensions { class ExternalPolicyLoaderTest : public testing::Test { public: - ExternalPolicyLoaderTest() - : loop_(base::MessageLoop::TYPE_IO), - ui_thread_(BrowserThread::UI, &loop_) { + ExternalPolicyLoaderTest() : ui_thread_(BrowserThread::UI, &loop_) { } virtual ~ExternalPolicyLoaderTest() {} @@ -36,7 +34,7 @@ class ExternalPolicyLoaderTest : public testing::Test { private: // We need these to satisfy BrowserThread::CurrentlyOn(BrowserThread::UI) // checks in ExternalProviderImpl. - base::MessageLoop loop_; + base::MessageLoopForIO loop_; content::TestBrowserThread ui_thread_; }; diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc index 8e77ac1..8b447a7 100644 --- a/chrome/browser/importer/profile_writer_unittest.cc +++ b/chrome/browser/importer/profile_writer_unittest.cc @@ -34,8 +34,7 @@ class TestProfileWriter : public ProfileWriter { class ProfileWriterTest : public testing::Test { public: ProfileWriterTest() - : loop_(base::MessageLoop::TYPE_DEFAULT), - ui_thread_(BrowserThread::UI, &loop_), + : ui_thread_(BrowserThread::UI, &loop_), file_thread_(BrowserThread::FILE, &loop_) { } virtual ~ProfileWriterTest() {} diff --git a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc index 04e924b..f0de8dc 100644 --- a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc +++ b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc @@ -185,21 +185,21 @@ TEST(ChromeFraudulentCertificateReporterTest, GoodBadInfo) { } TEST(ChromeFraudulentCertificateReporterTest, ReportIsSent) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; content::TestBrowserThread io_thread(BrowserThread::IO, &loop); loop.PostTask(FROM_HERE, base::Bind(&DoReportIsSent)); loop.RunUntilIdle(); } TEST(ChromeFraudulentCertificateReporterTest, MockReportIsSent) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; content::TestBrowserThread io_thread(BrowserThread::IO, &loop); loop.PostTask(FROM_HERE, base::Bind(&DoMockReportIsSent)); loop.RunUntilIdle(); } TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; content::TestBrowserThread io_thread(BrowserThread::IO, &loop); loop.PostTask(FROM_HERE, base::Bind(&DoReportIsNotSent)); loop.RunUntilIdle(); diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc index 812c692..6239c2b 100644 --- a/chrome/browser/net/connection_tester_unittest.cc +++ b/chrome/browser/net/connection_tester_unittest.cc @@ -89,8 +89,7 @@ class ConnectionTesterDelegate : public ConnectionTester::Delegate { class ConnectionTesterTest : public PlatformTest { public: ConnectionTesterTest() - : message_loop_(base::MessageLoop::TYPE_IO), - io_thread_(BrowserThread::IO, &message_loop_), + : io_thread_(BrowserThread::IO, &message_loop_), test_server_(net::SpawnedTestServer::TYPE_HTTP, net::SpawnedTestServer::kLocalhost, // Nothing is read in this directory. @@ -105,7 +104,7 @@ class ConnectionTesterTest : public PlatformTest { // SSLClientAuthCache calls RemoveObserver when destroyed, but if the // MessageLoop is already destroyed, then the RemoveObserver will be a // no-op, and the ObserverList will contain invalid entries. - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; content::TestBrowserThread io_thread_; net::SpawnedTestServer test_server_; ConnectionTesterDelegate test_delegate_; diff --git a/chrome/browser/policy/url_blacklist_manager_unittest.cc b/chrome/browser/policy/url_blacklist_manager_unittest.cc index 4329cbd..cc66528 100644 --- a/chrome/browser/policy/url_blacklist_manager_unittest.cc +++ b/chrome/browser/policy/url_blacklist_manager_unittest.cc @@ -84,7 +84,7 @@ class TestingURLBlacklistManager : public URLBlacklistManager { class URLBlacklistManagerTest : public testing::Test { protected: - URLBlacklistManagerTest() : loop_(base::MessageLoop::TYPE_IO) {} + URLBlacklistManagerTest() {} virtual void SetUp() OVERRIDE { pref_service_.registry()->RegisterListPref(policy_prefs::kUrlBlacklist); @@ -102,7 +102,7 @@ class URLBlacklistManagerTest : public testing::Test { blacklist_manager_.reset(); } - base::MessageLoop loop_; + base::MessageLoopForIO loop_; TestingPrefServiceSimple pref_service_; scoped_ptr<TestingURLBlacklistManager> blacklist_manager_; }; diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc index fe75dd1..4cc47bd 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc +++ b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc @@ -71,8 +71,7 @@ class AutocompleteActionPredictorTableReopenTest }; AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest() - : loop_(base::MessageLoop::TYPE_DEFAULT), - db_thread_(BrowserThread::DB, &loop_) { + : db_thread_(BrowserThread::DB, &loop_) { } AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() { diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc index 13d681c..1fbe21d 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc +++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc @@ -83,8 +83,7 @@ namespace predictors { class AutocompleteActionPredictorTest : public testing::Test { public: AutocompleteActionPredictorTest() - : loop_(base::MessageLoop::TYPE_DEFAULT), - ui_thread_(BrowserThread::UI, &loop_), + : ui_thread_(BrowserThread::UI, &loop_), db_thread_(BrowserThread::DB, &loop_), file_thread_(BrowserThread::FILE, &loop_), profile_(new TestingProfile()), diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc index 08f204a..91312aa 100644 --- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc +++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc @@ -181,7 +181,7 @@ class ConfigParserTest : public testing::Test { MOCK_METHOD0(Callback, void(void)); - base::MessageLoop loop_; + base::MessageLoopForIO loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread io_thread_; URLFetcherRequestListener request_listener_; @@ -189,8 +189,7 @@ class ConfigParserTest : public testing::Test { }; ConfigParserTest::ConfigParserTest() - : loop_(base::MessageLoop::TYPE_IO), - ui_thread_(content::BrowserThread::UI, &loop_), + : ui_thread_(content::BrowserThread::UI, &loop_), io_thread_(content::BrowserThread::IO, &loop_), factory_(NULL, base::Bind(&ConfigParserTest::CreateFakeURLFetcher, base::Unretained(this))) { diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index a99fde6..5eb5b0c 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -395,7 +395,7 @@ TEST_F(SafeBrowsingDatabaseTest, ListNameForBrowse) { TEST_F(SafeBrowsingDatabaseTest, ListNameForBrowseAndDownload) { database_.reset(); - base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop; SafeBrowsingStoreFile* browse_store = new SafeBrowsingStoreFile(); SafeBrowsingStoreFile* download_store = new SafeBrowsingStoreFile(); SafeBrowsingStoreFile* csd_whitelist_store = new SafeBrowsingStoreFile(); @@ -1123,7 +1123,7 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) { // influence task-posting. Database specifically needs to the // file-backed. database_.reset(); - base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop; SafeBrowsingStoreFile* store = new SafeBrowsingStoreFile(); database_.reset(new SafeBrowsingDatabaseNew(store, NULL, NULL, NULL, NULL, NULL, NULL)); @@ -1192,7 +1192,7 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) { // Checks database reading and writing. TEST_F(SafeBrowsingDatabaseTest, ContainsDownloadUrl) { database_.reset(); - base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop; SafeBrowsingStoreFile* browse_store = new SafeBrowsingStoreFile(); SafeBrowsingStoreFile* download_store = new SafeBrowsingStoreFile(); SafeBrowsingStoreFile* csd_whitelist_store = new SafeBrowsingStoreFile(); diff --git a/chrome/browser/spellchecker/spellcheck_host_metrics_unittest.cc b/chrome/browser/spellchecker/spellcheck_host_metrics_unittest.cc index bd434e5..2a00597 100644 --- a/chrome/browser/spellchecker/spellcheck_host_metrics_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_host_metrics_unittest.cc @@ -20,7 +20,7 @@ class SpellcheckHostMetricsTest : public testing::Test { public: - SpellcheckHostMetricsTest() : loop_(base::MessageLoop::TYPE_DEFAULT) { + SpellcheckHostMetricsTest() { } static void SetUpTestCase() { diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc index b7fe420..2171858 100644 --- a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc +++ b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc @@ -34,8 +34,7 @@ namespace sync_file_system { class LocalFileChangeTrackerTest : public testing::Test { public: LocalFileChangeTrackerTest() - : message_loop_(base::MessageLoop::TYPE_IO), - file_system_(GURL("http://example.com"), + : file_system_(GURL("http://example.com"), base::MessageLoopProxy::current().get(), base::MessageLoopProxy::current().get()) {} @@ -106,7 +105,7 @@ class LocalFileChangeTrackerTest : public testing::Test { } ScopedEnableSyncFSDirectoryOperation enable_directory_operation_; - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; CannedSyncableFileSystem file_system_; private: diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index c1af3fb..42f6974 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -168,8 +168,7 @@ scoped_refptr<extensions::Extension> MakeThemeExtension( class ThemeSyncableServiceTest : public testing::Test { protected: ThemeSyncableServiceTest() - : loop_(base::MessageLoop::TYPE_DEFAULT), - ui_thread_(content::BrowserThread::UI, &loop_), + : ui_thread_(content::BrowserThread::UI, &loop_), file_thread_(content::BrowserThread::FILE, &loop_), fake_theme_service_(NULL) {} diff --git a/chrome/renderer/media/chrome_webrtc_log_message_delegate_unittest.cc b/chrome/renderer/media/chrome_webrtc_log_message_delegate_unittest.cc index 9955011..3df3362 100644 --- a/chrome/renderer/media/chrome_webrtc_log_message_delegate_unittest.cc +++ b/chrome/renderer/media/chrome_webrtc_log_message_delegate_unittest.cc @@ -13,7 +13,7 @@ TEST(ChromeWebRtcLogMessageDelegateTest, Basic) { const char kTestString[] = "abcdefghijklmnopqrstuvwxyz"; - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; scoped_refptr<MockWebRtcLoggingMessageFilter> log_message_filter( new MockWebRtcLoggingMessageFilter(message_loop.message_loop_proxy())); diff --git a/cloud_print/gcp20/prototype/gcp20_device.cc b/cloud_print/gcp20/prototype/gcp20_device.cc index 57972a3..74040bd0 100644 --- a/cloud_print/gcp20/prototype/gcp20_device.cc +++ b/cloud_print/gcp20/prototype/gcp20_device.cc @@ -90,7 +90,7 @@ int main(int argc, char* argv[]) { signal(SIGINT, OnAbort); // Handle Ctrl+C signal. - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; g_message_loop = &loop; g_message_loop->PostTask(FROM_HERE, base::Bind(&StartPrinter, &printer)); base::RunLoop runner; diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc index 01d315b..0894e20 100644 --- a/cloud_print/service/service_state.cc +++ b/cloud_print/service/service_state.cc @@ -160,7 +160,7 @@ std::string ServiceState::ToString() { std::string ServiceState::LoginToGoogle(const std::string& service, const std::string& email, const std::string& password) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; net::URLRequestContextBuilder builder; scoped_ptr<net::URLRequestContext> context(builder.Build()); diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc index a4e895c..36d70c7 100644 --- a/content/browser/appcache/chrome_appcache_service_unittest.cc +++ b/content/browser/appcache/chrome_appcache_service_unittest.cc @@ -63,8 +63,7 @@ class MockURLRequestContextGetter : public net::URLRequestContextGetter { class ChromeAppCacheServiceTest : public testing::Test { public: ChromeAppCacheServiceTest() - : message_loop_(base::MessageLoop::TYPE_IO), - kProtectedManifestURL(kProtectedManifest), + : kProtectedManifestURL(kProtectedManifest), kNormalManifestURL(kNormalManifest), kSessionOnlyManifestURL(kSessionOnlyManifest), file_thread_(BrowserThread::FILE, &message_loop_), @@ -79,7 +78,7 @@ class ChromeAppCacheServiceTest : public testing::Test { bool init_storage); void InsertDataIntoAppCache(ChromeAppCacheService* appcache_service); - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; base::ScopedTempDir temp_dir_; const GURL kProtectedManifestURL; const GURL kNormalManifestURL; diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc index a028bba..c3704b8 100644 --- a/content/browser/indexed_db/indexed_db_unittest.cc +++ b/content/browser/indexed_db/indexed_db_unittest.cc @@ -30,7 +30,6 @@ class IndexedDBTest : public testing::Test { IndexedDBTest() : kNormalOrigin("http://normal/"), kSessionOnlyOrigin("http://session-only/"), - message_loop_(base::MessageLoop::TYPE_IO), task_runner_(new base::TestSimpleTaskRunner), special_storage_policy_(new quota::MockSpecialStoragePolicy), file_thread_(BrowserThread::FILE_USER_BLOCKING, &message_loop_), @@ -41,7 +40,7 @@ class IndexedDBTest : public testing::Test { protected: void FlushIndexedDBTaskRunner() { task_runner_->RunUntilIdle(); } - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; scoped_refptr<base::TestSimpleTaskRunner> task_runner_; scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy_; diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc index 5f9c693..c0a58c0 100644 --- a/content/browser/loader/resource_scheduler_unittest.cc +++ b/content/browser/loader/resource_scheduler_unittest.cc @@ -125,7 +125,6 @@ class ResourceSchedulerTest : public testing::Test { protected: ResourceSchedulerTest() : next_request_id_(0), - message_loop_(base::MessageLoop::TYPE_IO), ui_thread_(BrowserThread::UI, &message_loop_), io_thread_(BrowserThread::IO, &message_loop_) { scheduler_.OnClientCreated(kChildId, kRouteId); @@ -203,7 +202,7 @@ class ResourceSchedulerTest : public testing::Test { } int next_request_id_; - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; BrowserThreadImpl ui_thread_; BrowserThreadImpl io_thread_; ResourceDispatcherHostImpl rdh_; diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc index 76cb179..99e24e7 100644 --- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc +++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc @@ -52,7 +52,7 @@ class AudioInputDeviceManagerTest : public testing::Test { protected: virtual void SetUp() OVERRIDE { // The test must run on Browser::IO. - message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + message_loop_.reset(new base::MessageLoopForIO); io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, message_loop_.get())); audio_manager_.reset(media::AudioManager::CreateForTesting()); diff --git a/content/browser/renderer_host/media/audio_mirroring_manager_unittest.cc b/content/browser/renderer_host/media/audio_mirroring_manager_unittest.cc index 2468b2c..2ffd8974 100644 --- a/content/browser/renderer_host/media/audio_mirroring_manager_unittest.cc +++ b/content/browser/renderer_host/media/audio_mirroring_manager_unittest.cc @@ -46,8 +46,7 @@ class MockMirroringDestination class AudioMirroringManagerTest : public testing::Test { public: AudioMirroringManagerTest() - : message_loop_(base::MessageLoop::TYPE_IO), - io_thread_(BrowserThread::IO, &message_loop_), + : io_thread_(BrowserThread::IO, &message_loop_), params_(AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, AudioParameters::kAudioCDSampleRate, 16, AudioParameters::kAudioCDSampleRate / 10) {} @@ -102,7 +101,7 @@ class AudioMirroringManagerTest : public testing::Test { } private: - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; BrowserThreadImpl io_thread_; AudioParameters params_; AudioMirroringManager mirroring_manager_; diff --git a/content/browser/renderer_host/media/device_request_message_filter_unittest.cc b/content/browser/renderer_host/media/device_request_message_filter_unittest.cc index 3a9382b..3628885 100644 --- a/content/browser/renderer_host/media/device_request_message_filter_unittest.cc +++ b/content/browser/renderer_host/media/device_request_message_filter_unittest.cc @@ -134,7 +134,7 @@ class DeviceRequestMessageFilterTest : public testing::Test { virtual ~DeviceRequestMessageFilterTest() {} virtual void SetUp() OVERRIDE { - message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + message_loop_.reset(new base::MessageLoopForIO); io_thread_.reset( new TestBrowserThread(BrowserThread::IO, message_loop_.get())); diff --git a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc index f65936e..048b078 100644 --- a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc @@ -43,7 +43,7 @@ class MediaStreamDeviceUIControllerTest protected: virtual void SetUp() { - message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + message_loop_.reset(new base::MessageLoopForIO); ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI, message_loop_.get())); io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc index 037498b..86d9e77 100644 --- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc +++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc @@ -72,7 +72,7 @@ class VideoCaptureManagerTest : public testing::Test { protected: virtual void SetUp() OVERRIDE { listener_.reset(new MockMediaStreamProviderListener()); - message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + message_loop_.reset(new base::MessageLoopForIO); io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, message_loop_.get())); vcm_ = new VideoCaptureManager(); diff --git a/content/browser/resolve_proxy_msg_helper_unittest.cc b/content/browser/resolve_proxy_msg_helper_unittest.cc index 91f0243..023fe43 100644 --- a/content/browser/resolve_proxy_msg_helper_unittest.cc +++ b/content/browser/resolve_proxy_msg_helper_unittest.cc @@ -63,7 +63,6 @@ class ResolveProxyMsgHelperTest : public testing::Test, public IPC::Listener { service_( new net::ProxyService(new MockProxyConfigService, resolver_, NULL)), helper_(new TestResolveProxyMsgHelper(service_.get(), this)), - message_loop_(base::MessageLoop::TYPE_IO), io_thread_(BrowserThread::IO, &message_loop_) { test_sink_.AddFilter(this); } @@ -97,7 +96,7 @@ class ResolveProxyMsgHelperTest : public testing::Test, public IPC::Listener { return true; } - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; BrowserThreadImpl io_thread_; IPC::TestSink test_sink_; }; diff --git a/content/browser/streams/stream_url_request_job_unittest.cc b/content/browser/streams/stream_url_request_job_unittest.cc index d337803..9caf684 100644 --- a/content/browser/streams/stream_url_request_job_unittest.cc +++ b/content/browser/streams/stream_url_request_job_unittest.cc @@ -51,7 +51,7 @@ class StreamURLRequestJobTest : public testing::Test { StreamRegistry* registry_; }; - StreamURLRequestJobTest() : message_loop_(base::MessageLoop::TYPE_IO) {} + StreamURLRequestJobTest() {} virtual void SetUp() { registry_.reset(new StreamRegistry()); @@ -93,7 +93,7 @@ class StreamURLRequestJobTest : public testing::Test { } protected: - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; scoped_ptr<StreamRegistry> registry_; net::URLRequestContext url_request_context_; diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc index 349ce8c..aef0a97 100644 --- a/content/child/resource_dispatcher_unittest.cc +++ b/content/child/resource_dispatcher_unittest.cc @@ -328,7 +328,7 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest, }; TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; ResourceLoaderBridge* bridge = CreateBridge(); diff --git a/content/ppapi_plugin/ppapi_broker_main.cc b/content/ppapi_plugin/ppapi_broker_main.cc index b300c0f..78d0f1d 100644 --- a/content/ppapi_plugin/ppapi_broker_main.cc +++ b/content/ppapi_plugin/ppapi_broker_main.cc @@ -20,7 +20,7 @@ int PpapiBrokerMain(const MainFunctionParams& parameters) { ChildProcess::WaitForDebugger("PpapiBroker"); } - base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop main_message_loop; base::PlatformThread::SetName("CrPPAPIBrokerMain"); base::debug::TraceLog::GetInstance()->SetProcessName("PPAPI Broker Process"); base::debug::TraceLog::GetInstance()->SetProcessSortIndex( diff --git a/content/renderer/media/audio_message_filter_unittest.cc b/content/renderer/media/audio_message_filter_unittest.cc index 46460dc..42bb9b3 100644 --- a/content/renderer/media/audio_message_filter_unittest.cc +++ b/content/renderer/media/audio_message_filter_unittest.cc @@ -71,7 +71,7 @@ class MockAudioDelegate : public media::AudioOutputIPCDelegate { } // namespace TEST(AudioMessageFilterTest, Basic) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; scoped_refptr<AudioMessageFilter> filter(new AudioMessageFilter( message_loop.message_loop_proxy())); @@ -118,7 +118,7 @@ TEST(AudioMessageFilterTest, Basic) { } TEST(AudioMessageFilterTest, Delegates) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; scoped_refptr<AudioMessageFilter> filter(new AudioMessageFilter( message_loop.message_loop_proxy())); diff --git a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc index b17dfa7..e143aa7 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc @@ -30,9 +30,7 @@ class PepperGraphics2DHostTest : public testing::Test { return PepperGraphics2DHost::ConvertToLogicalPixels(scale, op_rect, delta); } - PepperGraphics2DHostTest() - : message_loop_(base::MessageLoop::TYPE_DEFAULT), - renderer_ppapi_host_(NULL, 12345) {} + PepperGraphics2DHostTest() : renderer_ppapi_host_(NULL, 12345) {} virtual ~PepperGraphics2DHostTest() { ppapi::ProxyAutoLock proxy_lock; diff --git a/device/bluetooth/bluetooth_chromeos_unittest.cc b/device/bluetooth/bluetooth_chromeos_unittest.cc index efc0b36..c49cee4 100644 --- a/device/bluetooth/bluetooth_chromeos_unittest.cc +++ b/device/bluetooth/bluetooth_chromeos_unittest.cc @@ -264,7 +264,7 @@ class BluetoothChromeOSTest : public testing::Test { ASSERT_TRUE(adapter_.get() != NULL); if (base::MessageLoop::current() == NULL) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; DiscoverDevices(); return; } @@ -508,7 +508,7 @@ TEST_F(BluetoothChromeOSTest, BecomeNotPowered) { } TEST_F(BluetoothChromeOSTest, StopDiscovery) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; GetAdapter(); @@ -551,7 +551,7 @@ TEST_F(BluetoothChromeOSTest, StopDiscovery) { } TEST_F(BluetoothChromeOSTest, StopDiscoveryAfterTwoStarts) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; GetAdapter(); @@ -623,7 +623,7 @@ TEST_F(BluetoothChromeOSTest, StopDiscoveryAfterTwoStarts) { TEST_F(BluetoothChromeOSTest, Discovery) { // Test a simulated discovery session. - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -670,7 +670,7 @@ TEST_F(BluetoothChromeOSTest, Discovery) { } TEST_F(BluetoothChromeOSTest, PoweredAndDiscovering) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; GetAdapter(); adapter_->SetPowered( @@ -1169,7 +1169,7 @@ TEST_F(BluetoothChromeOSTest, DisconnectUnconnectedDevice) { } TEST_F(BluetoothChromeOSTest, PairAppleMouse) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1230,7 +1230,7 @@ TEST_F(BluetoothChromeOSTest, PairAppleMouse) { } TEST_F(BluetoothChromeOSTest, PairAppleKeyboard) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1292,7 +1292,7 @@ TEST_F(BluetoothChromeOSTest, PairAppleKeyboard) { } TEST_F(BluetoothChromeOSTest, PairMotorolaKeyboard) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1375,7 +1375,7 @@ TEST_F(BluetoothChromeOSTest, PairMotorolaKeyboard) { } TEST_F(BluetoothChromeOSTest, PairSonyHeadphones) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1438,7 +1438,7 @@ TEST_F(BluetoothChromeOSTest, PairSonyHeadphones) { } TEST_F(BluetoothChromeOSTest, PairPhone) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1498,7 +1498,7 @@ TEST_F(BluetoothChromeOSTest, PairPhone) { } TEST_F(BluetoothChromeOSTest, PairWeirdDevice) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1559,7 +1559,7 @@ TEST_F(BluetoothChromeOSTest, PairWeirdDevice) { } TEST_F(BluetoothChromeOSTest, PairUnpairableDeviceFails) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1602,7 +1602,7 @@ TEST_F(BluetoothChromeOSTest, PairUnpairableDeviceFails) { } TEST_F(BluetoothChromeOSTest, PairingFails) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1646,7 +1646,7 @@ TEST_F(BluetoothChromeOSTest, PairingFails) { } TEST_F(BluetoothChromeOSTest, PairingFailsAtConnection) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1703,7 +1703,7 @@ TEST_F(BluetoothChromeOSTest, PairingFailsAtConnection) { } TEST_F(BluetoothChromeOSTest, PairingRejectedAtPinCode) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1750,7 +1750,7 @@ TEST_F(BluetoothChromeOSTest, PairingRejectedAtPinCode) { } TEST_F(BluetoothChromeOSTest, PairingCancelledAtPinCode) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1797,7 +1797,7 @@ TEST_F(BluetoothChromeOSTest, PairingCancelledAtPinCode) { } TEST_F(BluetoothChromeOSTest, PairingRejectedAtPasskey) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1844,7 +1844,7 @@ TEST_F(BluetoothChromeOSTest, PairingRejectedAtPasskey) { } TEST_F(BluetoothChromeOSTest, PairingCancelledAtPasskey) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1891,7 +1891,7 @@ TEST_F(BluetoothChromeOSTest, PairingCancelledAtPasskey) { } TEST_F(BluetoothChromeOSTest, PairingRejectedAtConfirmation) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1938,7 +1938,7 @@ TEST_F(BluetoothChromeOSTest, PairingRejectedAtConfirmation) { } TEST_F(BluetoothChromeOSTest, PairingCancelledAtConfirmation) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); @@ -1985,7 +1985,7 @@ TEST_F(BluetoothChromeOSTest, PairingCancelledAtConfirmation) { } TEST_F(BluetoothChromeOSTest, PairingCancelledInFlight) { - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; fake_bluetooth_device_client_->SetSimulationIntervalMs(10); GetAdapter(); diff --git a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc index 1792cda..dd7c945 100644 --- a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc +++ b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc @@ -31,8 +31,7 @@ namespace chromeos { class BluetoothProfileChromeOSTest : public testing::Test { public: BluetoothProfileChromeOSTest() - : message_loop_(base::MessageLoop::TYPE_IO), - callback_count_(0), + : callback_count_(0), error_callback_count_(0), profile_callback_count_(0), connection_callback_count_(0), @@ -102,7 +101,7 @@ class BluetoothProfileChromeOSTest : public testing::Test { } protected: - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client_; scoped_refptr<BluetoothAdapter> adapter_; diff --git a/gin/modules/timer_unittest.cc b/gin/modules/timer_unittest.cc index aaffbde..98267475 100644 --- a/gin/modules/timer_unittest.cc +++ b/gin/modules/timer_unittest.cc @@ -57,8 +57,7 @@ struct TestHelper { : runner(new Runner(&delegate, isolate)), scope(runner.get()), timer_module(TimerModule::Create(isolate)), - result(Result::Create(isolate)), - loop(base::MessageLoop::TYPE_DEFAULT) { + result(Result::Create(isolate)) { EXPECT_FALSE(runner->global().IsEmpty()); runner->global()->Set(StringToV8(isolate, "timer"), timer_module->GetWrapper(isolate)); diff --git a/media/audio/audio_input_unittest.cc b/media/audio/audio_input_unittest.cc index eb15b34..260598b 100644 --- a/media/audio/audio_input_unittest.cc +++ b/media/audio/audio_input_unittest.cc @@ -161,7 +161,7 @@ TEST(AudioInputTest, MAYBE_Record) { scoped_ptr<AudioManager> audio_man(AudioManager::CreateForTesting()); if (!CanRunAudioTests(audio_man.get())) return; - base::MessageLoop message_loop(base::MessageLoop::TYPE_DEFAULT); + base::MessageLoop message_loop; AudioInputStream* ais = CreateTestAudioInputStream(audio_man.get()); EXPECT_TRUE(ais->Open()); diff --git a/media/base/user_input_monitor_unittest.cc b/media/base/user_input_monitor_unittest.cc index 1afde601..55e6cca 100644 --- a/media/base/user_input_monitor_unittest.cc +++ b/media/base/user_input_monitor_unittest.cc @@ -47,7 +47,7 @@ TEST(UserInputMonitorTest, KeyPressCounter) { TEST(UserInputMonitorTest, CreatePlatformSpecific) { #if defined(OS_LINUX) - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; #else base::MessageLoopForUI message_loop; #endif // defined(OS_LINUX) diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc index 9c3c5a6..3b91c3b 100644 --- a/net/disk_cache/stress_cache.cc +++ b/net/disk_cache/stress_cache.cc @@ -279,7 +279,7 @@ int main(int argc, const char* argv[]) { // Some time for the memory manager to flush stuff. base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(3)); - base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO message_loop; char* end; long int iteration = strtol(argv[1], &end, 0); diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc index a9c2efb..9823947 100644 --- a/net/test/embedded_test_server/embedded_test_server_unittest.cc +++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc @@ -270,7 +270,7 @@ class EmbeddedTestServerThreadingTestDelegate scoped_ptr<base::MessageLoop> loop; if (message_loop_present_on_initialize_) - loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + loop.reset(new base::MessageLoopForIO); // Create the test server instance. EmbeddedTestServer server; @@ -280,7 +280,7 @@ class EmbeddedTestServerThreadingTestDelegate // Make a request and wait for the reply. if (!loop) - loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); + loop.reset(new base::MessageLoopForIO); scoped_ptr<URLFetcher> fetcher(URLFetcher::Create( server.GetURL("/test?q=foo"), URLFetcher::GET, this)); diff --git a/net/tools/dump_cache/dump_files.cc b/net/tools/dump_cache/dump_files.cc index 7f4fb58..78b5d34 100644 --- a/net/tools/dump_cache/dump_files.cc +++ b/net/tools/dump_cache/dump_files.cc @@ -57,7 +57,7 @@ int GetMajorVersionFromFile(const base::FilePath& name) { // Dumps the contents of the Stats record. void DumpStats(const base::FilePath& path, disk_cache::CacheAddr addr) { // We need a message loop, although we really don't run any task. - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; disk_cache::BlockFiles block_files(path); if (!block_files.Init(false)) { @@ -355,7 +355,7 @@ int DumpContents(const base::FilePath& input_path) { DumpHeaders(input_path); // We need a message loop, although we really don't run any task. - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; CacheDumper dumper(input_path); if (!dumper.Init()) return -1; diff --git a/net/tools/dump_cache/upgrade_win.cc b/net/tools/dump_cache/upgrade_win.cc index 5135592..68744d3 100644 --- a/net/tools/dump_cache/upgrade_win.cc +++ b/net/tools/dump_cache/upgrade_win.cc @@ -893,7 +893,7 @@ HANDLE CreateServer(base::string16* pipe_number) { // This is the controller process for an upgrade operation. int UpgradeCache(const base::FilePath& output_path, HANDLE pipe) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; MasterSM master(output_path, pipe); if (!master.DoInit()) { @@ -908,7 +908,7 @@ int UpgradeCache(const base::FilePath& output_path, HANDLE pipe) { // This process will only execute commands from the controller. int RunSlave(const base::FilePath& input_path, const base::string16& pipe_number) { - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; base::win::ScopedHandle pipe(OpenServer(pipe_number)); if (!pipe.IsValid()) { diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc index 8d4f5de..17d3b50 100644 --- a/net/tools/fetch/fetch_client.cc +++ b/net/tools/fetch/fetch_client.cc @@ -141,7 +141,7 @@ int main(int argc, char** argv) { bool use_cache = parsed_command_line.HasSwitch("use-cache"); // Do work here. - base::MessageLoop loop(base::MessageLoop::TYPE_IO); + base::MessageLoopForIO loop; net::HttpStreamFactory::EnableNpnHttp2Draft04(); diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc index 582ddcb..2bc9694 100644 --- a/ppapi/proxy/ppb_message_loop_proxy.cc +++ b/ppapi/proxy/ppb_message_loop_proxy.cc @@ -86,7 +86,7 @@ int32_t MessageLoopResource::AttachToCurrentThread() { AddRef(); slot->Set(this); - loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_DEFAULT)); + loop_.reset(new base::MessageLoop); loop_proxy_ = base::MessageLoopProxy::current(); // Post all pending work to the message loop. diff --git a/ppapi/shared_impl/tracked_callback_unittest.cc b/ppapi/shared_impl/tracked_callback_unittest.cc index 55db0aa..6a7376b 100644 --- a/ppapi/shared_impl/tracked_callback_unittest.cc +++ b/ppapi/shared_impl/tracked_callback_unittest.cc @@ -21,8 +21,7 @@ namespace { class TrackedCallbackTest : public testing::Test { public: - TrackedCallbackTest() - : message_loop_(base::MessageLoop::TYPE_DEFAULT), pp_instance_(1234) {} + TrackedCallbackTest() : pp_instance_(1234) {} PP_Instance pp_instance() const { return pp_instance_; } diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc index 928b5b2..c0a9140 100644 --- a/remoting/host/daemon_process_unittest.cc +++ b/remoting/host/daemon_process_unittest.cc @@ -145,14 +145,13 @@ class DaemonProcessTest : public testing::Test { } protected: - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; scoped_ptr<MockDaemonProcess> daemon_process_; int terminal_id_; }; -DaemonProcessTest::DaemonProcessTest() - : message_loop_(base::MessageLoop::TYPE_IO), terminal_id_(0) { +DaemonProcessTest::DaemonProcessTest() : terminal_id_(0) { } DaemonProcessTest::~DaemonProcessTest() { diff --git a/remoting/host/native_messaging/native_messaging_reader_unittest.cc b/remoting/host/native_messaging/native_messaging_reader_unittest.cc index 26ed78d..35af8a2 100644 --- a/remoting/host/native_messaging/native_messaging_reader_unittest.cc +++ b/remoting/host/native_messaging/native_messaging_reader_unittest.cc @@ -46,12 +46,11 @@ class NativeMessagingReaderTest : public testing::Test { private: // MessageLoop declared here, since the NativeMessageReader ctor requires a // MessageLoop to have been created. - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; base::RunLoop run_loop_; }; -NativeMessagingReaderTest::NativeMessagingReaderTest() - : message_loop_(base::MessageLoop::TYPE_IO) { +NativeMessagingReaderTest::NativeMessagingReaderTest() { } NativeMessagingReaderTest::~NativeMessagingReaderTest() {} diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc index cd92b11..5503ab9 100644 --- a/remoting/host/win/worker_process_launcher_unittest.cc +++ b/remoting/host/win/worker_process_launcher_unittest.cc @@ -152,7 +152,7 @@ class WorkerProcessLauncherTest protected: void DoLaunchProcess(); - base::MessageLoop message_loop_; + base::MessageLoopForIO message_loop_; scoped_refptr<AutoThreadTaskRunner> task_runner_; // Receives messages sent to the worker process. @@ -180,9 +180,7 @@ class WorkerProcessLauncherTest ScopedHandle worker_process_; }; -WorkerProcessLauncherTest::WorkerProcessLauncherTest() - : message_loop_(base::MessageLoop::TYPE_IO), - event_handler_(NULL) { +WorkerProcessLauncherTest::WorkerProcessLauncherTest() : event_handler_(NULL) { } WorkerProcessLauncherTest::~WorkerProcessLauncherTest() { diff --git a/tools/ipc_fuzzer/replay/replay_process.cc b/tools/ipc_fuzzer/replay/replay_process.cc index cf969ad..b141cd0 100644 --- a/tools/ipc_fuzzer/replay/replay_process.cc +++ b/tools/ipc_fuzzer/replay/replay_process.cc @@ -18,8 +18,7 @@ namespace ipc_fuzzer { ReplayProcess::ReplayProcess() - : main_loop_(base::MessageLoop::TYPE_DEFAULT), - io_thread_("Chrome_ChildIOThread"), + : io_thread_("Chrome_ChildIOThread"), shutdown_event_(true, false), message_index_(0) { } diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc index e97c6f8..1e8ab41 100644 --- a/ui/message_center/message_center_impl_unittest.cc +++ b/ui/message_center/message_center_impl_unittest.cc @@ -29,7 +29,7 @@ class MessageCenterImplTest : public testing::Test, virtual void SetUp() OVERRIDE { MessageCenter::Initialize(); message_center_ = MessageCenter::Get(); - loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_DEFAULT)); + loop_.reset(new base::MessageLoop); run_loop_.reset(new base::RunLoop()); closure_ = run_loop_->QuitClosure(); } |