diff options
Diffstat (limited to 'chrome')
39 files changed, 124 insertions, 99 deletions
diff --git a/chrome/browser/browser_main_posix.cc b/chrome/browser/browser_main_posix.cc index 9736c66..02319c7 100644 --- a/chrome/browser/browser_main_posix.cc +++ b/chrome/browser/browser_main_posix.cc @@ -12,6 +12,7 @@ #include "base/eintr_wrapper.h" #include "base/logging.h" #include "base/string_number_conversions.h" +#include "base/threading/platform_thread.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_thread.h" #include "chrome/common/chrome_switches.h" @@ -70,7 +71,7 @@ void SIGTERMHandler(int signal) { GracefulShutdownHandler(signal); } -class ShutdownDetector : public PlatformThread::Delegate { +class ShutdownDetector : public base::PlatformThread::Delegate { public: explicit ShutdownDetector(int shutdown_fd); @@ -88,7 +89,7 @@ ShutdownDetector::ShutdownDetector(int shutdown_fd) } void ShutdownDetector::ThreadMain() { - PlatformThread::SetName("CrShutdownDetector"); + base::PlatformThread::SetName("CrShutdownDetector"); int signal; size_t bytes_read = 0; @@ -211,9 +212,9 @@ void BrowserMainPartsPosix::PostMainMessageLoopStart() { const size_t kShutdownDetectorThreadStackSize = 4096; // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so // if you change this, you'll probably need to change the suppression. - if (!PlatformThread::CreateNonJoinable( - kShutdownDetectorThreadStackSize, - new ShutdownDetector(g_shutdown_pipe_read_fd))) { + if (!base::PlatformThread::CreateNonJoinable( + kShutdownDetectorThreadStackSize, + new ShutdownDetector(g_shutdown_pipe_read_fd))) { LOG(DFATAL) << "Failed to create shutdown detector task."; } } diff --git a/chrome/browser/debugger/devtools_remote_listen_socket.cc b/chrome/browser/debugger/devtools_remote_listen_socket.cc index 3ac15ae..c5804d5 100644 --- a/chrome/browser/debugger/devtools_remote_listen_socket.cc +++ b/chrome/browser/debugger/devtools_remote_listen_socket.cc @@ -22,8 +22,8 @@ #include "base/compiler_specific.h" #include "base/eintr_wrapper.h" -#include "base/platform_thread.h" #include "base/string_number_conversions.h" +#include "base/threading/platform_thread.h" #include "chrome/browser/debugger/devtools_remote.h" #include "chrome/browser/debugger/devtools_remote_message.h" @@ -252,7 +252,7 @@ void DevToolsRemoteListenSocket::SendInternal(const char* bytes, int len) { send_buf += sent; len_left -= sent; } - PlatformThread::YieldCurrentThread(); + base::PlatformThread::YieldCurrentThread(); } } diff --git a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc index 4c1884f..84cc4a6 100644 --- a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc +++ b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc @@ -11,6 +11,7 @@ #include "base/eintr_wrapper.h" #include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" #include "net/base/net_util.h" #include "testing/platform_test.h" @@ -160,7 +161,7 @@ bool DevToolsRemoteListenSocketTester::NextAction(int timeout) { return false; while (true) { int result = sem_trywait(semaphore_); - PlatformThread::Sleep(1); // 1MS sleep + base::PlatformThread::Sleep(1); // 1MS sleep timeout--; if (timeout <= 0) return false; @@ -193,7 +194,7 @@ int DevToolsRemoteListenSocketTester::ClearTestSocket() { if (len == SOCKET_ERROR) { if (errno == EWOULDBLOCK || errno == EAGAIN) { #endif - PlatformThread::Sleep(1); + base::PlatformThread::Sleep(1); time_out++; if (time_out > 10) break; @@ -261,7 +262,7 @@ void DevToolsRemoteListenSocketTester::TestClientSend() { { ASSERT_TRUE(Send(test_socket_, kSimpleMessagePart1)); // sleep for 10ms to test message split between \r and \n - PlatformThread::Sleep(10); + base::PlatformThread::Sleep(10); ASSERT_TRUE(Send(test_socket_, kSimpleMessagePart2)); ASSERT_TRUE(NextAction(TestTimeouts::action_timeout_ms())); ASSERT_EQ(ACTION_READ_MESSAGE, last_action_.type()); @@ -312,7 +313,7 @@ void DevToolsRemoteListenSocketTester::TestServerSend() { // of the time. I could fix this by making the socket blocking, but then // this test might hang in the case of errors. It would be nice to do // something that felt more reliable here. - PlatformThread::Sleep(10); // sleep for 10ms + base::PlatformThread::Sleep(10); // sleep for 10ms const int buf_len = 200; char buf[buf_len+1]; int recv_len = HANDLE_EINTR(recv(test_socket_, buf, buf_len, 0)); diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc index 427f067..51b9754 100644 --- a/chrome/browser/errorpage_uitest.cc +++ b/chrome/browser/errorpage_uitest.cc @@ -1,8 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/ui/ui_test.h" #include "chrome/browser/net/url_request_failed_dns_job.h" @@ -15,7 +16,7 @@ class ErrorPageTest : public UITest { for (int i = 0; i < 10; ++i) { if (GetActiveTabTitle() == title) return true; - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); } EXPECT_EQ(title, GetActiveTabTitle()); return false; diff --git a/chrome/browser/geolocation/device_data_provider_unittest.cc b/chrome/browser/geolocation/device_data_provider_unittest.cc index f6e9d96..a361fc6 100644 --- a/chrome/browser/geolocation/device_data_provider_unittest.cc +++ b/chrome/browser/geolocation/device_data_provider_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/geolocation/device_data_provider.h" +#include "base/threading/platform_thread.h" #include "chrome/browser/geolocation/wifi_data_provider_common.h" #include "testing/gtest/include/gtest/gtest.h" @@ -27,12 +28,12 @@ TEST(GeolocationDeviceDataProviderWifiData, CreateDestroy) { for (int i = 0; i < 10; i++) { DeviceDataProvider<WifiData>::Register(&listener); for (int j = 0; j < 10; j++) { - PlatformThread::Sleep(0); + base::PlatformThread::Sleep(0); main_message_loop.RunAllPending(); // See comment above } DeviceDataProvider<WifiData>::Unregister(&listener); for (int j = 0; j < 10; j++) { - PlatformThread::Sleep(0); + base::PlatformThread::Sleep(0); main_message_loop.RunAllPending(); // See comment above } } diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 5e1af15..3669f5b 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - - //------------------------------------------------------------------------------ // Description of the life cycle of a instance of MetricsService. // @@ -164,6 +162,7 @@ #include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/thread.h" +#include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/bookmarks/bookmark_model.h" @@ -1904,10 +1903,10 @@ void MetricsService::RecordCurrentState(PrefService* pref) { } static bool IsSingleThreaded() { - static PlatformThreadId thread_id = 0; + static base::PlatformThreadId thread_id = 0; if (!thread_id) - thread_id = PlatformThread::CurrentId(); - return PlatformThread::CurrentId() == thread_id; + thread_id = base::PlatformThread::CurrentId(); + return base::PlatformThread::CurrentId() == thread_id; } #if defined(OS_CHROMEOS) diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc index 1198705..d2cdf9d 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_uitest.cc @@ -164,7 +164,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> { } if (found_emf && found_prn) break; - PlatformThread::Sleep(100); + base::PlatformThread::Sleep(100); } EXPECT_TRUE(found_emf) << ".PRN file is: " << prn_file; EXPECT_TRUE(found_prn) << ".EMF file is: " << emf_file; @@ -256,13 +256,13 @@ class DismissTheWindow : public base::DelegateSimpleThread::Delegate { break; } } - PlatformThread::Sleep(10); + base::PlatformThread::Sleep(10); } // Now verify that it indeed closed itself. while (IsWindow(dialog_window)) { CloseDialogWindow(dialog_window); - PlatformThread::Sleep(10); + base::PlatformThread::Sleep(10); } } diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc index 48390f6..7732032 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc @@ -216,7 +216,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteAfterCrash) { #endif ASSERT_TRUE(tab->NavigateToURLAsync(GURL(chrome::kAboutCrashURL))); // Wait for browser to notice the renderer crash. - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); // Navigate to a new cross-site page. The browser should not wait around for // the old renderer's on{before}unload handlers to run. diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index 259d3ff..662eb5d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -25,6 +25,7 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/string_split.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" @@ -452,7 +453,7 @@ class SafeBrowsingServiceTestHelper // Wait and try again if last fetch was failed. The loop will hit the // timeout in OutOfProcTestRunner if the fetch can not get success // response. - PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); + base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); } } diff --git a/chrome/browser/ui/tests/browser_uitest.cc b/chrome/browser/ui/tests/browser_uitest.cc index 6b8c735..f3cfc78 100644 --- a/chrome/browser/ui/tests/browser_uitest.cc +++ b/chrome/browser/ui/tests/browser_uitest.cc @@ -166,7 +166,7 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { // Make sure that a new tab but not new process has been created. ASSERT_TRUE(tab->NavigateToURLAsync(dont_fork_url)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_EQ(orig_process_count, GetBrowserProcessCount()); int new_tab_count = -1; ASSERT_TRUE(window->GetTabCount(&new_tab_count)); @@ -181,7 +181,7 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { // Make sure that no new process has been created. ASSERT_TRUE(tab->NavigateToURLAsync(dont_fork_url2)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_EQ(orig_process_count, GetBrowserProcessCount()); } diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc index 1bd118b..b74dfad1 100644 --- a/chrome/common/chrome_plugin_lib.cc +++ b/chrome/common/chrome_plugin_lib.cc @@ -10,17 +10,19 @@ #include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/perftimer.h" -#include "base/thread.h" -#if defined(OS_WIN) -#include "base/win/registry.h" -#endif #include "base/string_util.h" +#include "base/thread.h" +#include "base/threading/platform_thread.h" #include "chrome/common/chrome_counters.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/chrome_paths.h" #include "webkit/plugins/npapi/plugin_list.h" +#if defined(OS_WIN) +#include "base/win/registry.h" +#endif + using base::TimeDelta; // TODO(port): revisit when plugins happier @@ -39,7 +41,7 @@ static PluginMap* g_loaded_libs; // The thread plugins are loaded and used in, lazily initialized upon // the first creation call. -static PlatformThreadId g_plugin_thread_id = 0; +static base::PlatformThreadId g_plugin_thread_id = 0; static MessageLoop* g_plugin_thread_loop = NULL; static bool IsSingleProcessMode() { @@ -58,7 +60,7 @@ ChromePluginLib* ChromePluginLib::Create(const FilePath& filename, // Keep a map of loaded plugins to ensure we only load each library once. if (!g_loaded_libs) { g_loaded_libs = new PluginMap(); - g_plugin_thread_id = PlatformThread::CurrentId(); + g_plugin_thread_id = base::PlatformThread::CurrentId(); g_plugin_thread_loop = MessageLoop::current(); } DCHECK(IsPluginThread()); @@ -97,7 +99,7 @@ void ChromePluginLib::Destroy(const FilePath& filename) { // static bool ChromePluginLib::IsPluginThread() { - return PlatformThread::CurrentId() == g_plugin_thread_id; + return base::PlatformThread::CurrentId() == g_plugin_thread_id; } // static diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc index 2ef1b10..5c8f27f 100644 --- a/chrome/gpu/gpu_main.cc +++ b/chrome/gpu/gpu_main.cc @@ -10,6 +10,7 @@ #include "base/environment.h" #include "base/message_loop.h" #include "base/stringprintf.h" +#include "base/threading/platform_thread.h" #include "build/build_config.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -74,7 +75,7 @@ int GpuMain(const MainFunctionParams& parameters) { #endif MessageLoop main_message_loop(MessageLoop::TYPE_UI); - PlatformThread::SetName("CrGpuMain"); + base::PlatformThread::SetName("CrGpuMain"); #if defined(OS_WIN) win_util::ScopedCOMInitializer com_initializer; diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index 4722b47..4d56143 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -12,6 +12,7 @@ #include "app/system_monitor.h" #include "base/command_line.h" #include "base/message_loop.h" +#include "base/platform_thread.h" #include "base/string_util.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" @@ -36,7 +37,7 @@ int NaClBrokerMain(const MainFunctionParams& parameters) { // The main thread of the broker. MessageLoopForIO main_message_loop; - PlatformThread::SetName("CrNaClBrokerMain"); + base::PlatformThread::SetName("CrNaClBrokerMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; @@ -100,7 +101,7 @@ int NaClMain(const MainFunctionParams& parameters) { // The main thread of the plugin services IO. MessageLoopForIO main_message_loop; - PlatformThread::SetName("CrNaClMain"); + base::PlatformThread::SetName("CrNaClMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc index a59a5b5..dee171c 100644 --- a/chrome/plugin/plugin_main.cc +++ b/chrome/plugin/plugin_main.cc @@ -14,6 +14,7 @@ #include "base/command_line.h" #include "base/message_loop.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -91,7 +92,7 @@ int PluginMain(const MainFunctionParams& parameters) { InitializeChromeApplication(); #endif MessageLoop main_message_loop(MessageLoop::TYPE_UI); - PlatformThread::SetName("CrPluginMain"); + base::PlatformThread::SetName("CrPluginMain"); SystemMonitor system_monitor; HighResolutionTimerManager high_resolution_timer_manager; diff --git a/chrome/ppapi_plugin/ppapi_plugin_main.cc b/chrome/ppapi_plugin/ppapi_plugin_main.cc index 3f3ccfe..eb52a3f 100644 --- a/chrome/ppapi_plugin/ppapi_plugin_main.cc +++ b/chrome/ppapi_plugin/ppapi_plugin_main.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/message_loop.h" +#include "base/threading/platform_thread.h" #include "build/build_config.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_switches.h" @@ -17,7 +18,7 @@ int PpapiPluginMain(const MainFunctionParams& parameters) { } MessageLoop main_message_loop(MessageLoop::TYPE_UI); - PlatformThread::SetName("CrPPAPIMain"); + base::PlatformThread::SetName("CrPPAPIMain"); ChildProcess ppapi_process; ppapi_process.set_main_thread(new PpapiThread()); diff --git a/chrome/profile_import/profile_import_main.cc b/chrome/profile_import/profile_import_main.cc index ced62d5..a406dd8 100644 --- a/chrome/profile_import/profile_import_main.cc +++ b/chrome/profile_import/profile_import_main.cc @@ -5,6 +5,7 @@ #include "base/command_line.h" #include "base/message_loop.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -16,7 +17,7 @@ int ProfileImportMain(const MainFunctionParams& parameters) { // The main message loop of the profile import process. MessageLoop main_message_loop; - PlatformThread::SetName("CrProfileImportMain"); + base::PlatformThread::SetName("CrProfileImportMain"); ChildProcess profile_import_process; profile_import_process.set_main_thread(new ProfileImportThread()); diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc index 366021b..43c3c13 100644 --- a/chrome/service/service_main.cc +++ b/chrome/service/service_main.cc @@ -6,6 +6,7 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/singleton.h" +#include "base/threading/platform_thread.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/main_function_params.h" @@ -25,7 +26,7 @@ int ServiceProcessMain(const MainFunctionParams& parameters) { base::debug::WaitForDebugger(60, true); } - PlatformThread::SetName("CrServiceMain"); + base::PlatformThread::SetName("CrServiceMain"); #if defined(OS_WIN) sandbox::BrokerServices* broker_services = diff --git a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc index c4c1eec..df4d33d 100644 --- a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc +++ b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc @@ -1,7 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/threading/platform_thread.h" #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" @@ -11,7 +12,7 @@ TEST_F(AutomatedUITestBase, DragOut) { NewTab(); NewTab(); ASSERT_TRUE(active_browser()->WaitForTabCountToBecome(3)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_TRUE(DragTabOut()); int window_count; ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); @@ -24,7 +25,7 @@ TEST_F(AutomatedUITestBase, DragLeftRight) { ASSERT_TRUE(active_browser()->WaitForTabCountToBecome(3)); // TODO(phajdan.jr): We need a WaitForTabstripAnimationsToEnd() function. // Every sleep in this file should be replaced with it. - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); scoped_refptr<TabProxy> dragged_tab(active_browser()->GetActiveTab()); int tab_index; @@ -34,13 +35,13 @@ TEST_F(AutomatedUITestBase, DragLeftRight) { // Drag the active tab to left. Now it should be the middle tab. ASSERT_TRUE(DragActiveTab(false)); // We wait for the animation to be over. - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index)); EXPECT_EQ(1, tab_index); // Drag the active tab to left. Now it should be the leftmost tab. ASSERT_TRUE(DragActiveTab(false)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index)); EXPECT_EQ(0, tab_index); @@ -50,13 +51,13 @@ TEST_F(AutomatedUITestBase, DragLeftRight) { // Drag the active tab to right. Now it should be the middle tab. ASSERT_TRUE(DragActiveTab(true)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index)); EXPECT_EQ(1, tab_index); // Drag the active tab to right. Now it should be the rightmost tab. ASSERT_TRUE(DragActiveTab(true)); - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); ASSERT_TRUE(dragged_tab->GetTabIndex(&tab_index)); EXPECT_EQ(2, tab_index); diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index 0b5d15b..e4293ce 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -16,6 +16,7 @@ #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" @@ -383,7 +384,7 @@ bool AutomatedUITest::DoAction(const std::string& action) { did_complete_action = true; } else if (LowerCaseEqualsASCII(action, "sleep")) { // This is for debugging, it probably shouldn't be used real tests. - PlatformThread::Sleep(kDebuggingTimeoutMsec); + base::PlatformThread::Sleep(kDebuggingTimeoutMsec); did_complete_action = true; } else if (LowerCaseEqualsASCII(action, "star")) { did_complete_action = StarPage(); @@ -428,7 +429,7 @@ bool AutomatedUITest::DoAction(const std::string& action) { xml_writer_.EndElement(); if (post_action_delay_) - PlatformThread::Sleep(1000 * post_action_delay_); + base::PlatformThread::Sleep(1000 * post_action_delay_); return did_complete_action; } diff --git a/chrome/test/automation/autocomplete_edit_proxy.cc b/chrome/test/automation/autocomplete_edit_proxy.cc index 019326b..fd8061b 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.cc +++ b/chrome/test/automation/autocomplete_edit_proxy.cc @@ -6,6 +6,7 @@ #include <vector> +#include "base/threading/platform_thread.h" #include "chrome/common/automation_constants.h" #include "chrome/common/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" @@ -66,7 +67,7 @@ bool AutocompleteEditProxy::WaitForQuery(int wait_timeout_ms) const { while (TimeTicks::Now() - start < timeout) { if (IsQueryInProgress(&query_in_progress) && !query_in_progress) return true; - PlatformThread::Sleep(automation::kSleepTime); + base::PlatformThread::Sleep(automation::kSleepTime); } // If we get here the query is still in progress. return false; diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index cf9391d..1138cc4 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/logging.h" -#include "base/platform_thread.h" +#include "base/threading/platform_thread.h" #include "base/process_util.h" #include "base/ref_counted.h" #include "base/waitable_event.h" @@ -105,7 +105,7 @@ AutomationProxy::AutomationProxy(int command_execution_timeout_ms, // Zero also seems unreasonable, since we need to wait for IPC, but at // least it is legal... ;-) DCHECK_GE(command_execution_timeout_ms, 0); - listener_thread_id_ = PlatformThread::CurrentId(); + listener_thread_id_ = base::PlatformThread::CurrentId(); InitializeHandleTracker(); InitializeThread(); } diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h index ee77016..60677f7 100644 --- a/chrome/test/automation/automation_proxy.h +++ b/chrome/test/automation/automation_proxy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ -#define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ +#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ +#define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ #pragma once #include <string> @@ -12,6 +12,7 @@ #include "app/message_box_flags.h" #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/threading/platform_thread.h" #include "base/process_util.h" #include "base/scoped_ptr.h" #include "base/time.h" @@ -301,9 +302,9 @@ class AutomationProxy : public IPC::Channel::Listener, // Delay to let the browser execute the command. base::TimeDelta command_execution_timeout_; - PlatformThreadId listener_thread_id_; + base::PlatformThreadId listener_thread_id_; DISALLOW_COPY_AND_ASSIGN(AutomationProxy); }; -#endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ +#endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 8568e5e..465b610 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -1556,7 +1556,7 @@ TEST_F(AutomationProxyTest5, TestLifetimeOfDomAutomationController) { tab->NavigateToURL(net::FilePathToFileURL(filename))); // Allow some time for the popup to show up and close. - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); std::wstring expected(L"string"); std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index ae18470..9ba3057 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -8,7 +8,7 @@ #include "base/json/json_reader.h" #include "base/logging.h" -#include "base/platform_thread.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "chrome/common/automation_constants.h" #include "chrome/common/automation_messages.h" @@ -206,7 +206,7 @@ bool BrowserProxy::WaitForTabToBecomeActive(int tab, const TimeTicks start = TimeTicks::Now(); const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout); while (TimeTicks::Now() - start < timeout) { - PlatformThread::Sleep(automation::kSleepTime); + base::PlatformThread::Sleep(automation::kSleepTime); int active_tab; if (GetActiveTabIndex(&active_tab) && active_tab == tab) return true; diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index 2325958..1d1583c 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -4,6 +4,7 @@ #include "chrome/test/automation/proxy_launcher.h" +#include "base/threading/platform_thread.h" #include "chrome/common/automation_constants.h" #include "chrome/common/logging_chrome.h" #include "chrome/test/automation/automation_proxy.h" @@ -37,7 +38,7 @@ void NamedProxyLauncher::InitializeConnection(UITestBase* ui_test_base) const { // Wait for browser to be ready for connections. struct stat file_info; while (stat(kInterfacePath, &file_info)) - PlatformThread::Sleep(automation::kSleepTime); + base::PlatformThread::Sleep(automation::kSleepTime); } ui_test_base->ConnectToRunningBrowser(); diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index ce7ed16..bb8d9cc 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/string16.h" +#include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "chrome/common/automation_messages.h" #include "chrome/common/json_value_serializer.h" @@ -363,7 +364,7 @@ bool TabProxy::WaitForChildWindowCountToChange(int count, int* new_count, int wait_timeout) { int intervals = std::max(wait_timeout / automation::kSleepTime, 1); for (int i = 0; i < intervals; ++i) { - PlatformThread::Sleep(automation::kSleepTime); + base::PlatformThread::Sleep(automation::kSleepTime); bool succeeded = GetConstrainedWindowCount(new_count); if (!succeeded) return false; @@ -391,7 +392,7 @@ bool TabProxy::WaitForBlockedPopupCountToChangeTo(int target_count, int wait_timeout) { int intervals = std::max(wait_timeout / automation::kSleepTime, 1); for (int i = 0; i < intervals; ++i) { - PlatformThread::Sleep(automation::kSleepTime); + base::PlatformThread::Sleep(automation::kSleepTime); int new_count = -1; bool succeeded = GetBlockedPopupCount(&new_count); if (!succeeded) diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc index 9c287d2..9a3d125 100644 --- a/chrome/test/live_sync/live_sync_test.cc +++ b/chrome/test/live_sync/live_sync_test.cc @@ -11,10 +11,10 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/platform_thread.h" #include "base/string_util.h" #include "base/task.h" #include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" #include "base/values.h" #include "base/waitable_event.h" #include "chrome/browser/browser_thread.h" @@ -398,7 +398,7 @@ bool LiveSyncTest::WaitForTestServerToStart(int time_ms, int intervals) { for (int i = 0; i < intervals; ++i) { if (IsTestServerRunning()) return true; - PlatformThread::Sleep(time_ms / intervals); + base::PlatformThread::Sleep(time_ms / intervals); } return false; } diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc index 7b4d78f..29e7d27 100644 --- a/chrome/test/memory_test/memory_test.cc +++ b/chrome/test/memory_test/memory_test.cc @@ -9,6 +9,7 @@ #include "base/path_service.h" #include "base/process_util.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -148,7 +149,7 @@ class MemoryTest : public UIPerfTest { SCOPED_TRACE(url); if (url == "<PAUSE>") { // Special command to delay on this page - PlatformThread::Sleep(2000); + base::PlatformThread::Sleep(2000); continue; } @@ -197,7 +198,7 @@ class MemoryTest : public UIPerfTest { // A new window will not load a url if requested too soon. The window // stays on the new tab page instead. - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); active_window = window_count - 1; window = automation()->GetBrowserWindow(active_window); @@ -224,7 +225,7 @@ class MemoryTest : public UIPerfTest { // TODO(mbelshe): Bug 2953 // The automation crashes periodically if we cycle too quickly. // To make these tests more reliable, slowing them down a bit. - PlatformThread::Sleep(100); + base::PlatformThread::Sleep(100); } size_t stop_size = base::GetSystemCommitCharge(); diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc index 5e7aae1..20edf54 100644 --- a/chrome/test/mini_installer_test/chrome_mini_installer.cc +++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc @@ -7,11 +7,11 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/path_service.h" -#include "base/platform_thread.h" #include "base/process.h" #include "base/process_util.h" #include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "base/win/registry.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_update_constants.h" @@ -307,7 +307,7 @@ bool ChromeMiniInstaller::CloseUninstallWindow() { window_name = mini_installer_constants::kChromeUninstallDialogName; while (hndl == NULL && timer < 5000) { hndl = FindWindow(NULL, window_name.c_str()); - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } @@ -338,7 +338,7 @@ bool ChromeMiniInstaller::CloseChromeBrowser() { while (!handle && timer < 10000) { handle = FindWindowEx(NULL, handle, L"Chrome_WidgetWin_0", NULL); if (!handle) { - PlatformThread::Sleep(100); + base::PlatformThread::Sleep(100); timer = timer + 100; } } @@ -348,7 +348,7 @@ bool ChromeMiniInstaller::CloseChromeBrowser() { LRESULT _result = SendMessage(handle, WM_CLOSE, 1, 0); if (_result != 0) return false; - PlatformThread::Sleep(1000); + base::PlatformThread::Sleep(1000); timer = timer + 1000; } if (base::GetProcessCount(installer::kChromeExe, NULL) > 0) { @@ -382,7 +382,7 @@ bool ChromeMiniInstaller::CheckRegistryKeyOnUninstall( int timer = 0; while ((key.Open(GetRootRegistryKey(), key_path.c_str(), KEY_ALL_ACCESS)) && (timer < 20000)) { - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } return CheckRegistryKey(key_path); @@ -601,7 +601,7 @@ void ChromeMiniInstaller::VerifyInstall(bool over_install) { MiniInstallerTestUtil::VerifyProcessLaunch( installer::kChromeExe, true); } - PlatformThread::Sleep(800); + base::PlatformThread::Sleep(800); FindChromeShortcut(); LaunchAndCloseChrome(over_install); } @@ -645,7 +645,7 @@ void ChromeMiniInstaller::LaunchBrowser(const std::wstring& launch_path, bool expected_status) { base::LaunchApp(L"\"" + launch_path + L"\"" + L" " + launch_args, false, false, NULL); - PlatformThread::Sleep(1000); + base::PlatformThread::Sleep(1000); MiniInstallerTestUtil::VerifyProcessLaunch(process_name.c_str(), expected_status); } diff --git a/chrome/test/mini_installer_test/mini_installer_test_util.cc b/chrome/test/mini_installer_test/mini_installer_test_util.cc index a07ada5..7c0dddd 100644 --- a/chrome/test/mini_installer_test/mini_installer_test_util.cc +++ b/chrome/test/mini_installer_test/mini_installer_test_util.cc @@ -6,10 +6,10 @@ #include "base/file_util.h" #include "base/path_service.h" -#include "base/platform_thread.h" #include "base/process_util.h" #include "base/string_util.h" #include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/installer/util/logging_installer.h" @@ -36,7 +36,7 @@ void MiniInstallerTestUtil::CloseProcesses( while ((base::GetProcessCount(executable_name, NULL) > 0) && (timer < 20000)) { base::KillProcesses(executable_name, 1, NULL); - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } ASSERT_EQ(0, base::GetProcessCount(executable_name, NULL)); @@ -49,7 +49,7 @@ bool MiniInstallerTestUtil::CloseWindow(const wchar_t* window_name, HWND hndl = FindWindow(NULL, window_name); while (hndl == NULL && (timer < 60000)) { hndl = FindWindow(NULL, window_name); - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } if (hndl != NULL) { @@ -274,7 +274,7 @@ void MiniInstallerTestUtil::VerifyProcessLaunch( while ((base::GetProcessCount(process_name, NULL) == 0) && (timer < wait_time)) { - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } @@ -291,7 +291,7 @@ bool MiniInstallerTestUtil::VerifyProcessClose( VLOG(1) << "Waiting for this process to end: " << process_name; while ((base::GetProcessCount(process_name, NULL) > 0) && (timer < TestTimeouts::large_test_timeout_ms())) { - PlatformThread::Sleep(200); + base::PlatformThread::Sleep(200); timer = timer + 200; } } else { diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index ffa6190..2aeb0a7a 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -46,6 +46,7 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/test/test_file_util.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/prefs/pref_service.h" @@ -214,9 +215,9 @@ class PageLoadTest : public UITest { // This used to be settable but the flag went away. int sleep_time_ms = 2000; window->SimulateOSKeyPress(app::VKEY_NEXT, 0); - PlatformThread::Sleep(sleep_time_ms); + base::PlatformThread::Sleep(sleep_time_ms); window->SimulateOSKeyPress(app::VKEY_NEXT, 0); - PlatformThread::Sleep(sleep_time_ms); + base::PlatformThread::Sleep(sleep_time_ms); } } } diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc index 29776fd..68b97fa 100644 --- a/chrome/test/tab_switching/tab_switching_test.cc +++ b/chrome/test/tab_switching/tab_switching_test.cc @@ -7,8 +7,8 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" -#include "base/platform_thread.h" #include "base/scoped_ptr.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_command_ids.h" @@ -112,7 +112,7 @@ class TabSwitchingUITest : public UIPerfTest { log_has_been_dumped = file_util::ReadFileToString(log_file_name_, &contents); if (!log_has_been_dumped) - PlatformThread::Sleep(100); + base::PlatformThread::Sleep(100); } while (!log_has_been_dumped && max_tries--); ASSERT_TRUE(log_has_been_dumped) << "Failed to read the log file"; diff --git a/chrome/test/ui/run_all_unittests.cc b/chrome/test/ui/run_all_unittests.cc index 7745bcaf..42aefa0 100644 --- a/chrome/test/ui/run_all_unittests.cc +++ b/chrome/test/ui/run_all_unittests.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/platform_thread.h" +#include "base/threading/platform_thread.h" #include "chrome/test/ui/ui_test_suite.h" int main(int argc, char **argv) { - PlatformThread::SetName("Tests_Main"); + base::PlatformThread::SetName("Tests_Main"); return UITestSuite(argc, argv).Run(); } diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 1d50fe5..9ef3ae6 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -21,13 +21,13 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" -#include "base/platform_thread.h" #include "base/process_util.h" #include "base/scoped_ptr.h" #include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/test/test_file_util.h" +#include "base/threading/platform_thread.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_command_ids.h" @@ -212,7 +212,7 @@ void UITestBase::WaitForBrowserLaunch() { if (wait_for_initial_loads_) ASSERT_TRUE(automation_proxy_->WaitForInitialLoads()); else - PlatformThread::Sleep(sleep_timeout_ms()); + base::PlatformThread::Sleep(sleep_timeout_ms()); EXPECT_TRUE(automation()->SetFilteredInet(ShouldFilterInet())); } @@ -1021,7 +1021,7 @@ bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { for (int i = 0; i < 10; i++) { if (file_util::EvictFileFromSystemCache(path)) return true; - PlatformThread::Sleep(sleep_timeout_ms() / 10); + base::PlatformThread::Sleep(sleep_timeout_ms() / 10); } return false; } @@ -1046,7 +1046,7 @@ void UITest::WaitForGeneratedFileAndCheck( file_util::GetFileInfo(generated_file, &previous); exist = true; } - PlatformThread::Sleep(sleep_timeout_ms() / kCycles); + base::PlatformThread::Sleep(sleep_timeout_ms() / kCycles); } EXPECT_TRUE(exist); diff --git a/chrome/test/webdriver/commands/find_element_commands.cc b/chrome/test/webdriver/commands/find_element_commands.cc index acda1393..d208a00 100644 --- a/chrome/test/webdriver/commands/find_element_commands.cc +++ b/chrome/test/webdriver/commands/find_element_commands.cc @@ -8,6 +8,7 @@ #include <string> #include "base/string_number_conversions.h" +#include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "third_party/webdriver/atoms.h" @@ -100,7 +101,7 @@ void FindElementCommand::ExecutePost(Response* const response) { int64 elapsed_time = (base::Time::Now() - start_time).InMilliseconds(); done = done || elapsed_time > session_->implicit_wait(); - PlatformThread::Sleep(50); // Prevent a busy loop that eats the cpu. + base::PlatformThread::Sleep(50); // Prevent a busy loop that eats the cpu. } response->set_value(result); diff --git a/chrome/test/webdriver/server.cc b/chrome/test/webdriver/server.cc index 4760928..6409524 100644 --- a/chrome/test/webdriver/server.cc +++ b/chrome/test/webdriver/server.cc @@ -19,6 +19,7 @@ #include "base/logging.h" #include "base/scoped_ptr.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "chrome/test/webdriver/dispatch.h" @@ -129,7 +130,7 @@ int main(int argc, char *argv[]) { std::cout << "Starting server on port: " << port << std::endl; // The default behavior is to run this service forever. while (true) - PlatformThread::Sleep(3600); + base::PlatformThread::Sleep(3600); // We should not reach here since the service should never quit. // TODO(jmikhail): register a listener for SIGTERM and break the diff --git a/chrome/utility/utility_main.cc b/chrome/utility/utility_main.cc index 0fa6777..2abdd52 100644 --- a/chrome/utility/utility_main.cc +++ b/chrome/utility/utility_main.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,6 +10,7 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -28,7 +29,7 @@ int UtilityMain(const MainFunctionParams& parameters) { // The main message loop of the utility process. MessageLoop main_message_loop; - PlatformThread::SetName("CrUtilityMain"); + base::PlatformThread::SetName("CrUtilityMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/worker/worker_main.cc b/chrome/worker/worker_main.cc index 82d0eca..0ba0e87 100644 --- a/chrome/worker/worker_main.cc +++ b/chrome/worker/worker_main.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,6 +7,7 @@ #include "base/command_line.h" #include "base/message_loop.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -23,7 +24,7 @@ int WorkerMain(const MainFunctionParams& parameters) { // The main message loop of the worker process. MessageLoop main_message_loop; - PlatformThread::SetName("CrWorkerMain"); + base::PlatformThread::SetName("CrWorkerMain"); SystemMonitor system_monitor; HighResolutionTimerManager hi_res_timer_manager; diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc index 6b788b5..3babc78 100644 --- a/chrome/worker/worker_uitest.cc +++ b/chrome/worker/worker_uitest.cc @@ -1,9 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/file_path.h" #include "base/string_util.h" +#include "base/threading/platform_thread.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/worker_host/worker_service.h" #include "chrome/common/chrome_switches.h" @@ -95,7 +96,7 @@ class WorkerTest : public UILayoutTest { if (cur_process_count == number_of_processes) return true; - PlatformThread::Sleep(sleep_timeout_ms() / 10); + base::PlatformThread::Sleep(sleep_timeout_ms() / 10); } EXPECT_EQ(number_of_processes, cur_process_count); |