summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 02:17:08 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 02:17:08 +0000
commitf214f8797150f49e1233110c1dafe4e8b601d9ea (patch)
tree191f4f5b9ee1d9c20fc02dd4f1c940ad4d04267c
parent34b9963c187a733bef76535521f3de688fffd34f (diff)
downloadchromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.zip
chromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.tar.gz
chromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.tar.bz2
Remove base/platform_thread.h stub and fix up all callers to use the new location and namespace.
TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70346 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/platform_thread.h24
-rw-r--r--base/test/test_file_util_win.cc6
-rw-r--r--chrome/browser/automation/automation_resource_message_filter.h1
-rw-r--r--chrome/browser/browser_about_handler.cc1
-rw-r--r--chrome/browser/browser_main.cc4
-rw-r--r--chrome/browser/chromeos/cros/network_library.h1
-rw-r--r--chrome/browser/download/download_uitest.cc4
-rw-r--r--chrome/browser/download/save_page_uitest.cc3
-rw-r--r--chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc1
-rw-r--r--chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc1
-rw-r--r--chrome/browser/history/redirect_uitest.cc6
-rw-r--r--chrome/browser/images_uitest.cc4
-rw-r--r--chrome/browser/importer/importer_list.h1
-rw-r--r--chrome/browser/mach_broker_mac.cc7
-rw-r--r--chrome/browser/media_uitest.cc4
-rw-r--r--chrome/browser/metrics/metrics_service_uitest.cc4
-rw-r--r--chrome/browser/net/url_info_unittest.cc6
-rw-r--r--chrome/browser/net/url_request_slow_http_job.cc1
-rw-r--r--chrome/browser/password_manager/password_manager.cc7
-rw-r--r--chrome/browser/process_singleton_linux.cc6
-rw-r--r--chrome/browser/sanity_uitest.cc3
-rw-r--r--chrome/browser/session_history_uitest.cc1
-rw-r--r--chrome/browser/sync/engine/syncapi.cc1
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc54
-rw-r--r--chrome/browser/sync/util/channel.h8
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc7
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h4
-rw-r--r--chrome/browser/unload_uitest.cc1
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--chrome/common/deprecated/event_sys_unittest.cc12
-rw-r--r--chrome/common/extensions/extension_resource.h1
-rw-r--r--chrome/common/notification_registrar.cc10
-rw-r--r--chrome/common/process_watcher_posix.cc10
-rw-r--r--chrome/common/worker_thread_ticker_unittest.cc4
-rw-r--r--chrome/installer/util/copy_tree_work_item_unittest.cc4
-rw-r--r--chrome/nacl/nacl_main.cc1
-rw-r--r--chrome/renderer/about_handler.cc6
-rw-r--r--chrome/renderer/renderer_main.cc12
-rw-r--r--chrome/test/automation/automation_proxy_uitest.h1
-rw-r--r--chrome/test/mini_installer_test/test.cc1
-rw-r--r--chrome/test/startup/shutdown_test.cc1
-rw-r--r--chrome/test/startup/startup_test.cc1
-rw-r--r--chrome_frame/metrics_service.cc20
-rw-r--r--chrome_frame/metrics_service.h4
-rw-r--r--chrome_frame/npapi_url_request.cc9
-rw-r--r--chrome_frame/npapi_url_request.h1
-rw-r--r--chrome_frame/ns_isupports_impl.h12
-rw-r--r--chrome_frame/test/perf/run_all.cc4
-rw-r--r--ipc/ipc_fuzzing_tests.cc8
-rw-r--r--ipc/ipc_sync_channel_unittest.cc4
-rw-r--r--ipc/sync_socket_unittest.cc15
-rw-r--r--media/audio/audio_input_unittest.cc4
-rw-r--r--media/audio/audio_output_proxy_unittest.cc8
-rw-r--r--media/audio/fake_audio_input_stream_unittest.cc6
-rw-r--r--media/filters/null_audio_renderer.cc14
-rw-r--r--media/filters/null_audio_renderer.h7
-rw-r--r--media/filters/video_renderer_base.cc11
-rw-r--r--media/filters/video_renderer_base.h6
-rw-r--r--media/tools/player_wtl/movie.cc3
-rw-r--r--media/tools/player_x11/player_x11.cc3
-rw-r--r--net/base/cookie_monster_unittest.cc6
-rw-r--r--net/base/directory_lister.cc14
-rw-r--r--net/base/directory_lister.h6
-rw-r--r--net/base/mock_host_resolver.cc4
-rw-r--r--net/disk_cache/backend_unittest.cc14
-rw-r--r--net/disk_cache/entry_unittest.cc12
-rw-r--r--net/disk_cache/stress_cache.cc4
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc19
-rw-r--r--net/url_request/url_request_job_manager.h8
-rw-r--r--remoting/base/tracer.cc2
-rw-r--r--sandbox/src/broker_services.cc4
-rw-r--r--webkit/tools/test_shell/simple_database_system.cc2
72 files changed, 222 insertions, 248 deletions
diff --git a/base/platform_thread.h b/base/platform_thread.h
deleted file mode 100644
index 36f8f07..0000000
--- a/base/platform_thread.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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.
-
-
-#ifndef BASE_PLATFORM_THREAD_H_
-#define BASE_PLATFORM_THREAD_H_
-#pragma once
-
-// This file is for backwards-compatibility to keep things compiling that use
-// the old location & lack of namespace.
-//
-// TODO(brettw) make all callers use the new location & namespace and delete
-// this file.
-
-#include "base/threading/platform_thread.h"
-
-using base::PlatformThread;
-using base::PlatformThreadHandle;
-using base::PlatformThreadId;
-using base::kNullThreadHandle;
-using base::kInvalidThreadId;
-
-#endif // BASE_PLATFORM_THREAD_H_
diff --git a/base/test/test_file_util_win.cc b/base/test/test_file_util_win.cc
index fc3d018..0917570 100644
--- a/base/test/test_file_util_win.cc
+++ b/base/test/test_file_util_win.cc
@@ -12,8 +12,8 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
#include "base/scoped_handle.h"
+#include "base/threading/platform_thread.h"
namespace file_util {
@@ -32,7 +32,7 @@ bool DieFileDie(const FilePath& file, bool recurse) {
for (int i = 0; i < 25; ++i) {
if (file_util::Delete(file, recurse))
return true;
- PlatformThread::Sleep(kTimeoutMs / 25);
+ base::PlatformThread::Sleep(kTimeoutMs / 25);
}
return false;
}
@@ -203,7 +203,7 @@ bool HasInternetZoneIdentifier(const FilePath& full_path) {
// Windows does not guarantee that we will get the same contents even after
// the other process closes the handle, flushes the buffers, etc.
for (int i = 0; i < 20; i++) {
- PlatformThread::Sleep(1000);
+ base::PlatformThread::Sleep(1000);
const DWORD kShare = FILE_SHARE_READ |
FILE_SHARE_WRITE |
diff --git a/chrome/browser/automation/automation_resource_message_filter.h b/chrome/browser/automation/automation_resource_message_filter.h
index 82081ec..89357e6 100644
--- a/chrome/browser/automation/automation_resource_message_filter.h
+++ b/chrome/browser/automation/automation_resource_message_filter.h
@@ -11,7 +11,6 @@
#include "base/atomicops.h"
#include "base/lazy_instance.h"
#include "base/lock.h"
-#include "base/platform_thread.h"
#include "ipc/ipc_channel_proxy.h"
#include "net/base/completion_callback.h"
#include "net/base/cookie_store.h"
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 4522bc2..3de80ac 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -16,7 +16,6 @@
#include "base/metrics/histogram.h"
#include "base/metrics/stats_table.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/singleton.h"
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index a544ec1..181cfea 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -21,7 +21,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_piece.h"
@@ -480,7 +480,7 @@ void BrowserMainParts::MainMessageLoopStart() {
void BrowserMainParts::InitializeMainThread() {
const char* kThreadName = "CrBrowserMain";
- PlatformThread::SetName(kThreadName);
+ base::PlatformThread::SetName(kThreadName);
main_message_loop().set_thread_name(kThreadName);
// Register the main thread by instantiating it, but don't call any methods.
diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h
index 99780e2..0a78cd4 100644
--- a/chrome/browser/chromeos/cros/network_library.h
+++ b/chrome/browser/chromeos/cros/network_library.h
@@ -11,7 +11,6 @@
#include "base/gtest_prod_util.h"
#include "base/observer_list.h"
-#include "base/platform_thread.h"
#include "base/scoped_vector.h"
#include "base/singleton.h"
#include "base/string16.h"
diff --git a/chrome/browser/download/download_uitest.cc b/chrome/browser/download/download_uitest.cc
index aed2f6c..b347a77 100644
--- a/chrome/browser/download/download_uitest.cc
+++ b/chrome/browser/download/download_uitest.cc
@@ -13,9 +13,9 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/string_util.h"
#include "base/test/test_file_util.h"
+#include "base/threading/platform_thread.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/net/url_request_mock_http_job.h"
@@ -154,7 +154,7 @@ TEST_F(DownloadTest, FLAKY_NoDownload) {
WaitUntilTabCount(1);
// Wait to see if the file will be downloaded.
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
EXPECT_FALSE(file_util::PathExists(file_path));
if (file_util::PathExists(file_path))
diff --git a/chrome/browser/download/save_page_uitest.cc b/chrome/browser/download/save_page_uitest.cc
index e6c6e08..d6078b3 100644
--- a/chrome/browser/download/save_page_uitest.cc
+++ b/chrome/browser/download/save_page_uitest.cc
@@ -1,10 +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/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/string_util.h"
#include "base/test/test_file_util.h"
#include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc b/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc
index 1842e00..19cd379 100644
--- a/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc
+++ b/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc
@@ -4,7 +4,6 @@
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
diff --git a/chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc b/chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc
index 9a8f29e..d90a522 100644
--- a/chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc
+++ b/chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc
@@ -12,7 +12,6 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/stl_util-inl.h"
diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc
index 1dbadcc..9d2c35a 100644
--- a/chrome/browser/history/redirect_uitest.cc
+++ b/chrome/browser/history/redirect_uitest.cc
@@ -8,11 +8,11 @@
// the case of redirects. It may also mean problems with the history system.
#include "base/file_util.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/string16.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/test/automation/browser_proxy.h"
@@ -210,7 +210,7 @@ TEST_F(RedirectTest, ClientServerServer) {
NavigateToURL(first_url);
for (int i = 0; i < 10; ++i) {
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
ASSERT_TRUE(tab_proxy->GetRedirectsFrom(first_url, &redirects));
@@ -316,7 +316,7 @@ TEST_F(RedirectTest,
std::wstring final_url_title = UTF8ToWide("Title Of Awesomeness");
// Wait till the final page has been loaded.
for (int i = 0; i < 10; ++i) {
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
ASSERT_TRUE(tab_proxy->GetTabTitle(&tab_title));
diff --git a/chrome/browser/images_uitest.cc b/chrome/browser/images_uitest.cc
index 2c67437..400ac86 100644
--- a/chrome/browser/images_uitest.cc
+++ b/chrome/browser/images_uitest.cc
@@ -4,7 +4,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "net/base/net_util.h"
#include "chrome/test/ui/ui_test.h"
@@ -16,7 +16,7 @@ TEST_F(ImagesTest, AnimatedGIFs) {
NavigateToURL(net::FilePathToFileURL(test_file));
// Let the GIFs fully animate.
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
std::wstring page_title = L"animated gif test";
EXPECT_EQ(page_title, GetActiveTabTitle());
diff --git a/chrome/browser/importer/importer_list.h b/chrome/browser/importer/importer_list.h
index f3db148..513a55f 100644
--- a/chrome/browser/importer/importer_list.h
+++ b/chrome/browser/importer/importer_list.h
@@ -10,7 +10,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/scoped_vector.h"
#include "build/build_config.h"
diff --git a/chrome/browser/mach_broker_mac.cc b/chrome/browser/mach_broker_mac.cc
index b3afe94..4ea2069 100644
--- a/chrome/browser/mach_broker_mac.cc
+++ b/chrome/browser/mach_broker_mac.cc
@@ -7,9 +7,9 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/mach_ipc_mac.h"
-#include "base/platform_thread.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
+#include "base/threading/platform_thread.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/renderer_host/render_process_host.h"
@@ -54,7 +54,7 @@ class RegisterNotificationTask : public Task {
DISALLOW_COPY_AND_ASSIGN(RegisterNotificationTask);
};
-class MachListenerThreadDelegate : public PlatformThread::Delegate {
+class MachListenerThreadDelegate : public base::PlatformThread::Delegate {
public:
MachListenerThreadDelegate(MachBroker* broker) : broker_(broker) {
DCHECK(broker_);
@@ -136,7 +136,8 @@ void MachBroker::PrepareForFork() {
BrowserThread::UI, FROM_HERE, new RegisterNotificationTask(this));
// Intentional leak. This thread is never joined or reaped.
- PlatformThread::CreateNonJoinable(0, new MachListenerThreadDelegate(this));
+ base::PlatformThread::CreateNonJoinable(
+ 0, new MachListenerThreadDelegate(this));
}
}
diff --git a/chrome/browser/media_uitest.cc b/chrome/browser/media_uitest.cc
index 61861e0..c52f926 100644
--- a/chrome/browser/media_uitest.cc
+++ b/chrome/browser/media_uitest.cc
@@ -5,8 +5,8 @@
#include "app/gfx/gl/gl_implementation.h"
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "base/platform_thread.h"
#include "base/string_util.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/test_launcher_utils.h"
#include "chrome/test/ui/ui_layout_test.h"
@@ -46,7 +46,7 @@ class MediaTest : public UITest {
const std::wstring kFailed = L"FAILED";
const std::wstring kError = L"ERROR";
for (int i = 0; i < 10; ++i) {
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
const std::wstring& title = GetActiveTabTitle();
if (title == kPlaying || title == kFailed ||
StartsWith(title, kError, true))
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
index 16eb641..77117f8 100644
--- a/chrome/browser/metrics/metrics_service_uitest.cc
+++ b/chrome/browser/metrics/metrics_service_uitest.cc
@@ -10,7 +10,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/pref_value_store.h"
@@ -99,7 +99,7 @@ TEST_F(MetricsServiceTest, CrashRenderers) {
}
// Give the browser a chance to notice the crashed tab.
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
QuitBrowser();
diff --git a/chrome/browser/net/url_info_unittest.cc b/chrome/browser/net/url_info_unittest.cc
index ea7d619..870ad7e 100644
--- a/chrome/browser/net/url_info_unittest.cc
+++ b/chrome/browser/net/url_info_unittest.cc
@@ -7,7 +7,7 @@
#include <time.h>
#include <string>
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "chrome/browser/net/url_info.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -67,7 +67,7 @@ TEST(UrlHostInfoTest, StateChangeTest) {
info.SetAssignedState();
EXPECT_FALSE(info.NeedsDnsUpdate());
// Greater than minimal expected network latency on DNS lookup.
- PlatformThread::Sleep(25);
+ base::PlatformThread::Sleep(25);
before_resolution_complete = TimeTicks::Now();
info.SetNoSuchNameState();
// "Immediately" check to see if we need an update yet (we shouldn't).
@@ -78,7 +78,7 @@ TEST(UrlHostInfoTest, StateChangeTest) {
return;
}
// Wait over 300ms, so it should definately be considered out of cache.
- PlatformThread::Sleep(kMockExpirationTime + 20);
+ base::PlatformThread::Sleep(kMockExpirationTime + 20);
EXPECT_TRUE(info.NeedsDnsUpdate()) << "expiration time not honored";
}
diff --git a/chrome/browser/net/url_request_slow_http_job.cc b/chrome/browser/net/url_request_slow_http_job.cc
index bfd32e6..04a24f9 100644
--- a/chrome/browser/net/url_request_slow_http_job.cc
+++ b/chrome/browser/net/url_request_slow_http_job.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/net/url_request_slow_http_job.h"
-#include "base/platform_thread.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "net/url_request/url_request_filter.h"
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index 90de8be..a96492a9 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -6,8 +6,8 @@
#include <vector>
-#include "base/platform_thread.h"
#include "base/stl_util-inl.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/password_manager/password_form_manager.h"
@@ -35,8 +35,9 @@ void PasswordManager::RegisterUserPrefs(PrefService* prefs) {
// avoid needing to lock (a static boolean flag is then sufficient to
// guarantee running only once).
static void ReportMetrics(bool password_manager_enabled) {
- static PlatformThreadId initial_thread_id = PlatformThread::CurrentId();
- DCHECK(initial_thread_id == PlatformThread::CurrentId());
+ static base::PlatformThreadId initial_thread_id =
+ base::PlatformThread::CurrentId();
+ DCHECK(initial_thread_id == base::PlatformThread::CurrentId());
static bool ran_once = false;
if (ran_once)
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index a95d668..acf982d 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -64,7 +64,6 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/process_util.h"
#include "base/rand_util.h"
#include "base/safe_strerror_posix.h"
@@ -72,9 +71,10 @@
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "base/timer.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#if defined(TOOLKIT_GTK)
@@ -818,7 +818,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
return PROCESS_NONE;
}
- PlatformThread::Sleep(1000 /* ms */);
+ base::PlatformThread::Sleep(1000 /* ms */);
}
timeval timeout = {timeout_seconds, 0};
diff --git a/chrome/browser/sanity_uitest.cc b/chrome/browser/sanity_uitest.cc
index 36bc372..cecbd71 100644
--- a/chrome/browser/sanity_uitest.cc
+++ b/chrome/browser/sanity_uitest.cc
@@ -1,4 +1,4 @@
-// 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.
@@ -9,7 +9,6 @@
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "base/platform_thread.h"
#include "chrome/common/chrome_switches.h"
#include "net/base/net_util.h"
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc
index 871ea6d..4889a81 100644
--- a/chrome/browser/session_history_uitest.cc
+++ b/chrome/browser/session_history_uitest.cc
@@ -2,7 +2,6 @@
// 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/string_util.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/automation/tab_proxy.h"
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index 112878d..c1d19f7 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -14,7 +14,6 @@
#include "base/lock.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
#include "base/sha1.h"
#include "base/string_util.h"
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index 32a4cc3..1bf4587 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -23,10 +23,10 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
+#include "base/threading/platform_thread.h"
#include "chrome/browser/sync/engine/syncproto.h"
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
#include "chrome/browser/sync/syncable/directory_backing_store.h"
@@ -1356,7 +1356,7 @@ TEST(SyncableDirectoryManager, TestFileRelease) {
ASSERT_TRUE(file_util::Delete(dm.GetSyncDataDatabasePath(), true));
}
-class ThreadOpenTestDelegate : public PlatformThread::Delegate {
+class ThreadOpenTestDelegate : public base::PlatformThread::Delegate {
public:
explicit ThreadOpenTestDelegate(DirectoryManager* dm)
: directory_manager_(dm) {}
@@ -1373,10 +1373,10 @@ class ThreadOpenTestDelegate : public PlatformThread::Delegate {
TEST(SyncableDirectoryManager, ThreadOpenTest) {
DirectoryManager dm(FilePath(FILE_PATH_LITERAL(".")));
- PlatformThreadHandle thread_handle;
+ base::PlatformThreadHandle thread_handle;
ThreadOpenTestDelegate test_delegate(&dm);
- ASSERT_TRUE(PlatformThread::Create(0, &test_delegate, &thread_handle));
- PlatformThread::Join(thread_handle);
+ ASSERT_TRUE(base::PlatformThread::Create(0, &test_delegate, &thread_handle));
+ base::PlatformThread::Join(thread_handle);
{
ScopedDirLookup dir(&dm, "Open");
ASSERT_TRUE(dir.good());
@@ -1395,7 +1395,7 @@ struct Step {
int64 metahandle;
};
-class ThreadBugDelegate : public PlatformThread::Delegate {
+class ThreadBugDelegate : public base::PlatformThread::Delegate {
public:
// a role is 0 or 1, meaning this thread does the odd or event steps.
ThreadBugDelegate(int role, Step* step, DirectoryManager* dirman)
@@ -1457,14 +1457,16 @@ TEST(SyncableDirectoryManager, ThreadBug1) {
ThreadBugDelegate thread_delegate_1(0, &step, &dirman);
ThreadBugDelegate thread_delegate_2(1, &step, &dirman);
- PlatformThreadHandle thread_handle_1;
- PlatformThreadHandle thread_handle_2;
+ base::PlatformThreadHandle thread_handle_1;
+ base::PlatformThreadHandle thread_handle_2;
- ASSERT_TRUE(PlatformThread::Create(0, &thread_delegate_1, &thread_handle_1));
- ASSERT_TRUE(PlatformThread::Create(0, &thread_delegate_2, &thread_handle_2));
+ ASSERT_TRUE(
+ base::PlatformThread::Create(0, &thread_delegate_1, &thread_handle_1));
+ ASSERT_TRUE(
+ base::PlatformThread::Create(0, &thread_delegate_2, &thread_handle_2));
- PlatformThread::Join(thread_handle_1);
- PlatformThread::Join(thread_handle_2);
+ base::PlatformThread::Join(thread_handle_1);
+ base::PlatformThread::Join(thread_handle_2);
}
@@ -1552,17 +1554,19 @@ TEST(SyncableDirectoryManager, DirectoryKernelStalenessBug) {
DirectoryKernelStalenessBugDelegate thread_delegate_1(0, &step, &dirman);
DirectoryKernelStalenessBugDelegate thread_delegate_2(1, &step, &dirman);
- PlatformThreadHandle thread_handle_1;
- PlatformThreadHandle thread_handle_2;
+ base::PlatformThreadHandle thread_handle_1;
+ base::PlatformThreadHandle thread_handle_2;
- ASSERT_TRUE(PlatformThread::Create(0, &thread_delegate_1, &thread_handle_1));
- ASSERT_TRUE(PlatformThread::Create(0, &thread_delegate_2, &thread_handle_2));
+ ASSERT_TRUE(
+ base::PlatformThread::Create(0, &thread_delegate_1, &thread_handle_1));
+ ASSERT_TRUE(
+ base::PlatformThread::Create(0, &thread_delegate_2, &thread_handle_2));
- PlatformThread::Join(thread_handle_1);
- PlatformThread::Join(thread_handle_2);
+ base::PlatformThread::Join(thread_handle_1);
+ base::PlatformThread::Join(thread_handle_2);
}
-class StressTransactionsDelegate : public PlatformThread::Delegate {
+class StressTransactionsDelegate : public base::PlatformThread::Delegate {
public:
StressTransactionsDelegate(DirectoryManager* dm,
const std::string& dirname,
@@ -1588,7 +1592,7 @@ class StressTransactionsDelegate : public PlatformThread::Delegate {
if (rand_action < 4 && !path_name.empty()) {
ReadTransaction trans(dir, __FILE__, __LINE__);
CHECK(1 == CountEntriesWithName(&trans, trans.root_id(), path_name));
- PlatformThread::Sleep(rand() % 10);
+ base::PlatformThread::Sleep(rand() % 10);
} else {
std::string unique_name = StringPrintf("%d.%d", thread_number_,
entry_count++);
@@ -1596,7 +1600,7 @@ class StressTransactionsDelegate : public PlatformThread::Delegate {
WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
MutableEntry e(&trans, CREATE, trans.root_id(), path_name);
CHECK(e.good());
- PlatformThread::Sleep(rand() % 20);
+ base::PlatformThread::Sleep(rand() % 20);
e.Put(IS_UNSYNCED, true);
if (e.Put(ID, TestIdFactory::FromNumber(rand())) &&
e.Get(ID).ServerKnows() && !e.Get(ID).IsRoot()) {
@@ -1616,18 +1620,18 @@ TEST(SyncableDirectory, StressTransactions) {
dirman.Open(dirname);
const int kThreadCount = 7;
- PlatformThreadHandle threads[kThreadCount];
+ base::PlatformThreadHandle threads[kThreadCount];
scoped_ptr<StressTransactionsDelegate> thread_delegates[kThreadCount];
for (int i = 0; i < kThreadCount; ++i) {
thread_delegates[i].reset(
new StressTransactionsDelegate(&dirman, dirname, i));
- ASSERT_TRUE(
- PlatformThread::Create(0, thread_delegates[i].get(), &threads[i]));
+ ASSERT_TRUE(base::PlatformThread::Create(
+ 0, thread_delegates[i].get(), &threads[i]));
}
for (int i = 0; i < kThreadCount; ++i) {
- PlatformThread::Join(threads[i]);
+ base::PlatformThread::Join(threads[i]);
}
dirman.Close(dirname);
diff --git a/chrome/browser/sync/util/channel.h b/chrome/browser/sync/util/channel.h
index a21f6ea..88ddfc4 100644
--- a/chrome/browser/sync/util/channel.h
+++ b/chrome/browser/sync/util/channel.h
@@ -52,7 +52,7 @@
#include "base/lock.h"
#include "base/observer_list.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
namespace browser_sync {
@@ -106,7 +106,7 @@ class Channel {
void RemoveObserver(ChannelEventHandler<EventType>* observer) {
// This can be called in response to a notification, so we may already have
// locked this channel on this thread.
- bool need_lock = (locking_thread_ != PlatformThread::CurrentId());
+ bool need_lock = (locking_thread_ != base::PlatformThread::CurrentId());
if (need_lock)
event_handlers_mutex_.Acquire();
@@ -121,7 +121,7 @@ class Channel {
// This may result in an observer trying to remove itself, so keep track
// of the thread we're locked on.
- locking_thread_ = PlatformThread::CurrentId();
+ locking_thread_ = base::PlatformThread::CurrentId();
ChannelObserverList::Iterator it(event_handlers_);
EventHandler* obs;
@@ -136,7 +136,7 @@ class Channel {
private:
Lock event_handlers_mutex_;
- PlatformThreadId locking_thread_;
+ base::PlatformThreadId locking_thread_;
ObserverList<EventHandler> event_handlers_;
};
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc
index bf6df2a..4b21ec0 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc
@@ -11,6 +11,7 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/task.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_node_data.h"
@@ -171,7 +172,7 @@ void TabContentsDragWin::StartBackgroundDragging(
const std::string& page_encoding,
const SkBitmap& image,
const gfx::Point& image_offset) {
- drag_drop_thread_id_ = PlatformThread::CurrentId();
+ drag_drop_thread_id_ = base::PlatformThread::CurrentId();
DoDragging(drop_data, ops, page_url, page_encoding, image, image_offset);
BrowserThread::PostTask(
@@ -345,7 +346,7 @@ void TabContentsDragWin::CloseThread() {
}
void TabContentsDragWin::OnWaitForData() {
- DCHECK(drag_drop_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(drag_drop_thread_id_ == base::PlatformThread::CurrentId());
// When the left button is release and we start to wait for the data, end
// the dragging before DoDragDrop returns. This makes the page leave the drag
@@ -356,7 +357,7 @@ void TabContentsDragWin::OnWaitForData() {
}
void TabContentsDragWin::OnDataObjectDisposed() {
- DCHECK(drag_drop_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(drag_drop_thread_id_ == base::PlatformThread::CurrentId());
// The drag-and-drop thread is only closed after OLE is done with
// DataObjectImpl.
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h
index d787931..7e2b7c8 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h
@@ -7,9 +7,9 @@
#pragma once
#include "app/os_exchange_data_provider_win.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "gfx/point.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h"
@@ -71,7 +71,7 @@ class TabContentsDragWin
void CloseThread();
// For debug check only. Access only on drag-and-drop thread.
- PlatformThreadId drag_drop_thread_id_;
+ base::PlatformThreadId drag_drop_thread_id_;
// All the member variables below are accessed on UI thread.
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index bf45ecc..a359e23 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -4,7 +4,6 @@
#include "app/message_box_flags.h"
#include "base/file_util.h"
-#include "base/platform_thread.h"
#include "chrome/browser/net/url_request_mock_http_job.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index c945b07..71fa4c0 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -529,6 +529,7 @@
'common/logging_chrome_uitest.cc',
'renderer/external_extension_uitest.cc',
'test/automation/automation_proxy_uitest.cc',
+ 'test/automation/automation_proxy_uitest.h',
'test/automation/extension_proxy_uitest.cc',
'test/automated_ui_tests/automated_ui_test_test.cc',
'test/chrome_process_util_uitest.cc',
diff --git a/chrome/common/deprecated/event_sys_unittest.cc b/chrome/common/deprecated/event_sys_unittest.cc
index 3e7957e..1d35d5f 100644
--- a/chrome/common/deprecated/event_sys_unittest.cc
+++ b/chrome/common/deprecated/event_sys_unittest.cc
@@ -9,8 +9,8 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/port.h"
+#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "chrome/common/deprecated/event_sys-inl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -140,7 +140,7 @@ TEST(EventSys, Basic) {
// This goes pretty far beyond the normal use pattern, so don't use
// ThreadTester as an example of what to do.
class ThreadTester : public EventListener<TestEvent>,
- public PlatformThread::Delegate {
+ public base::PlatformThread::Delegate {
public:
explicit ThreadTester(Pair* pair)
: pair_(pair), remove_event_(&remove_event_mutex_),
@@ -150,12 +150,12 @@ class ThreadTester : public EventListener<TestEvent>,
~ThreadTester() {
pair_->event_channel()->RemoveListener(this);
for (size_t i = 0; i < threads_.size(); i++) {
- PlatformThread::Join(threads_[i].thread);
+ base::PlatformThread::Join(threads_[i].thread);
}
}
struct ThreadInfo {
- PlatformThreadHandle thread;
+ base::PlatformThreadHandle thread;
};
struct ThreadArgs {
@@ -173,7 +173,7 @@ class ThreadTester : public EventListener<TestEvent>,
args.thread_running_mutex = &(thread_running_mutex);
args.thread_running = false;
args_ = args;
- ASSERT_TRUE(PlatformThread::Create(0, this, &info.thread));
+ ASSERT_TRUE(base::PlatformThread::Create(0, this, &info.thread));
thread_running_mutex.Acquire();
while ((args_.thread_running) == false) {
thread_running_cond.Wait();
@@ -216,7 +216,7 @@ class ThreadTester : public EventListener<TestEvent>,
remove_event_.Broadcast();
remove_event_mutex_.Release();
- PlatformThread::YieldCurrentThread();
+ base::PlatformThread::YieldCurrentThread();
completed_mutex_.Acquire();
if (completed_)
diff --git a/chrome/common/extensions/extension_resource.h b/chrome/common/extensions/extension_resource.h
index c680345..86705a88 100644
--- a/chrome/common/extensions/extension_resource.h
+++ b/chrome/common/extensions/extension_resource.h
@@ -9,7 +9,6 @@
#include <string>
#include "base/file_path.h"
-#include "base/platform_thread.h"
// Represents a resource inside an extension. For example, an image, or a
// JavaScript file. This is more complicated than just a simple FilePath
diff --git a/chrome/common/notification_registrar.cc b/chrome/common/notification_registrar.cc
index d413585..841d5d7 100644
--- a/chrome/common/notification_registrar.cc
+++ b/chrome/common/notification_registrar.cc
@@ -7,13 +7,13 @@
#include <algorithm>
#include "base/logging.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/notification_service.h"
-#include "base/platform_thread.h"
namespace {
-void CheckCalledOnValidThread(PlatformThreadId thread_id) {
- PlatformThreadId current_thread_id = PlatformThread::CurrentId();
+void CheckCalledOnValidThread(base::PlatformThreadId thread_id) {
+ base::PlatformThreadId current_thread_id = base::PlatformThread::CurrentId();
CHECK(current_thread_id == thread_id) << "called on invalid thread: "
<< thread_id << " vs. "
<< current_thread_id;
@@ -27,7 +27,7 @@ struct NotificationRegistrar::Record {
NotificationObserver* observer;
NotificationType type;
NotificationSource source;
- PlatformThreadId thread_id;
+ base::PlatformThreadId thread_id;
};
bool NotificationRegistrar::Record::operator==(const Record& other) const {
@@ -49,7 +49,7 @@ void NotificationRegistrar::Add(NotificationObserver* observer,
const NotificationSource& source) {
DCHECK(!IsRegistered(observer, type, source)) << "Duplicate registration.";
- Record record = { observer, type, source, PlatformThread::CurrentId() };
+ Record record = { observer, type, source, base::PlatformThread::CurrentId() };
registered_.push_back(record);
NotificationService::current()->AddObserver(observer, type, source);
diff --git a/chrome/common/process_watcher_posix.cc b/chrome/common/process_watcher_posix.cc
index 4b13c32..38a4e1b 100644
--- a/chrome/common/process_watcher_posix.cc
+++ b/chrome/common/process_watcher_posix.cc
@@ -11,7 +11,7 @@
#include "base/eintr_wrapper.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
// Return true if the given child is dead. This will also reap the process.
// Doesn't block.
@@ -30,7 +30,7 @@ static bool IsChildDead(pid_t child) {
// A thread class which waits for the given child to exit and reaps it.
// If the child doesn't exit within a couple of seconds, kill it.
-class BackgroundReaper : public PlatformThread::Delegate {
+class BackgroundReaper : public base::PlatformThread::Delegate {
public:
explicit BackgroundReaper(pid_t child, unsigned timeout)
: child_(child),
@@ -58,7 +58,7 @@ class BackgroundReaper : public PlatformThread::Delegate {
// Wait for 2 * timeout_ 500 milliseconds intervals.
for (unsigned i = 0; i < 2 * timeout_; ++i) {
- PlatformThread::Sleep(500); // 0.5 seconds
+ base::PlatformThread::Sleep(500); // 0.5 seconds
if (IsChildDead(child_))
return;
}
@@ -91,7 +91,7 @@ void ProcessWatcher::EnsureProcessTerminated(base::ProcessHandle process) {
const unsigned timeout = 2; // seconds
BackgroundReaper* reaper = new BackgroundReaper(process, timeout);
- PlatformThread::CreateNonJoinable(0, reaper);
+ base::PlatformThread::CreateNonJoinable(0, reaper);
}
// static
@@ -101,5 +101,5 @@ void ProcessWatcher::EnsureProcessGetsReaped(base::ProcessHandle process) {
return;
BackgroundReaper* reaper = new BackgroundReaper(process, 0);
- PlatformThread::CreateNonJoinable(0, reaper);
+ base::PlatformThread::CreateNonJoinable(0, reaper);
}
diff --git a/chrome/common/worker_thread_ticker_unittest.cc b/chrome/common/worker_thread_ticker_unittest.cc
index 71b74c8..b3e1f08 100644
--- a/chrome/common/worker_thread_ticker_unittest.cc
+++ b/chrome/common/worker_thread_ticker_unittest.cc
@@ -5,7 +5,7 @@
#include "chrome/common/worker_thread_ticker.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -32,7 +32,7 @@ class TestCallback : public WorkerThreadTicker::Callback {
class LongCallback : public WorkerThreadTicker::Callback {
public:
virtual void OnTick() {
- PlatformThread::Sleep(1500);
+ base::PlatformThread::Sleep(1500);
}
};
diff --git a/chrome/installer/util/copy_tree_work_item_unittest.cc b/chrome/installer/util/copy_tree_work_item_unittest.cc
index 269d2fe..9314799 100644
--- a/chrome/installer/util/copy_tree_work_item_unittest.cc
+++ b/chrome/installer/util/copy_tree_work_item_unittest.cc
@@ -10,10 +10,10 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/process_util.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
+#include "base/threading/platform_thread.h"
#include "chrome/installer/util/work_item.h"
#include "chrome/installer/util/copy_tree_work_item.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -478,7 +478,7 @@ TEST_F(CopyTreeWorkItemTest, NewNameAndCopyTest) {
temp_dir_.ToWStringHack(), WorkItem::NEW_NAME_IF_IN_USE,
alternate_to.ToWStringHack()));
if (IsFileInUse(file_name_to))
- PlatformThread::Sleep(2000);
+ base::PlatformThread::Sleep(2000);
// If file is still in use, the rest of the test will fail.
ASSERT_FALSE(IsFileInUse(file_name_to));
EXPECT_TRUE(work_item->Do());
diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc
index 4d56143..f039538 100644
--- a/chrome/nacl/nacl_main.cc
+++ b/chrome/nacl/nacl_main.cc
@@ -12,7 +12,6 @@
#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"
diff --git a/chrome/renderer/about_handler.cc b/chrome/renderer/about_handler.cc
index 5e6659e..f53302b 100644
--- a/chrome/renderer/about_handler.cc
+++ b/chrome/renderer/about_handler.cc
@@ -4,7 +4,7 @@
#include "chrome/renderer/about_handler.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/about_handler.h"
#include "googleurl/src/gurl.h"
@@ -46,13 +46,13 @@ void AboutHandler::AboutCrash() {
// static
void AboutHandler::AboutHang() {
for (;;) {
- PlatformThread::Sleep(1000);
+ base::PlatformThread::Sleep(1000);
}
}
// static
void AboutHandler::AboutShortHang() {
- PlatformThread::Sleep(20000);
+ base::PlatformThread::Sleep(20000);
}
// static
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc
index 13554d6..a380902 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/chrome/renderer/renderer_main.cc
@@ -17,9 +17,9 @@
#include "base/metrics/histogram.h"
#include "base/metrics/stats_counters.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/process_util.h"
#include "base/string_util.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_counters.h"
#include "chrome/common/chrome_switches.h"
@@ -78,7 +78,7 @@ void SIGTERMHandler(int signal) {
RAW_LOG(INFO, "Wrote signal to shutdown pipe.");
}
-class ShutdownDetector : public PlatformThread::Delegate {
+class ShutdownDetector : public base::PlatformThread::Delegate {
public:
explicit ShutdownDetector(int shutdown_fd) : shutdown_fd_(shutdown_fd) {
CHECK(shutdown_fd_ != -1);
@@ -193,9 +193,9 @@ int RendererMain(const MainFunctionParams& parameters) {
int shutdown_pipe_read_fd = pipefd[0];
g_shutdown_pipe_write_fd = pipefd[1];
const size_t kShutdownDetectorThreadStackSize = 4096;
- if (!PlatformThread::CreateNonJoinable(
- kShutdownDetectorThreadStackSize,
- new ShutdownDetector(shutdown_pipe_read_fd))) {
+ if (!base::PlatformThread::CreateNonJoinable(
+ kShutdownDetectorThreadStackSize,
+ new ShutdownDetector(shutdown_pipe_read_fd))) {
LOG(DFATAL) << "Failed to create shutdown detector task.";
}
}
@@ -238,7 +238,7 @@ int RendererMain(const MainFunctionParams& parameters) {
MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT);
#endif
- PlatformThread::SetName("CrRendererMain");
+ base::PlatformThread::SetName("CrRendererMain");
SystemMonitor system_monitor;
HighResolutionTimerManager hi_res_timer_manager;
diff --git a/chrome/test/automation/automation_proxy_uitest.h b/chrome/test/automation/automation_proxy_uitest.h
index 6f87c4e..0b5556f 100644
--- a/chrome/test/automation/automation_proxy_uitest.h
+++ b/chrome/test/automation/automation_proxy_uitest.h
@@ -9,7 +9,6 @@
#include <string>
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/time.h"
#include "chrome/test/automation/automation_proxy.h"
#include "chrome/test/ui/ui_test.h"
diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc
index d4e31ee..3f92434 100644
--- a/chrome/test/mini_installer_test/test.cc
+++ b/chrome/test/mini_installer_test/test.cc
@@ -4,7 +4,6 @@
#include "base/command_line.h"
#include "base/file_path.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/install_util.h"
diff --git a/chrome/test/startup/shutdown_test.cc b/chrome/test/startup/shutdown_test.cc
index 6093305..a0d64e1 100644
--- a/chrome/test/startup/shutdown_test.cc
+++ b/chrome/test/startup/shutdown_test.cc
@@ -5,7 +5,6 @@
#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/sys_info.h"
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index e78083f..1604f86 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -5,7 +5,6 @@
#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/platform_thread.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/string_util.h"
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index 7b9570b..3311853 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -251,12 +251,12 @@ class ChromeFrameMetricsDataUploader
ChromeFrameMetricsDataUploader()
: fetcher_(NULL) {
DVLOG(1) << __FUNCTION__;
- creator_thread_id_ = PlatformThread::CurrentId();
+ creator_thread_id_ = base::PlatformThread::CurrentId();
}
~ChromeFrameMetricsDataUploader() {
DVLOG(1) << __FUNCTION__;
- DCHECK(creator_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(creator_thread_id_ == base::PlatformThread::CurrentId());
}
virtual void OnFinalMessage(HWND wnd) {
@@ -350,7 +350,7 @@ class ChromeFrameMetricsDataUploader
private:
URLFetcher* fetcher_;
- PlatformThreadId creator_thread_id_;
+ base::PlatformThreadId creator_thread_id_;
};
MetricsService* MetricsService::GetInstance() {
@@ -383,7 +383,7 @@ MetricsService::~MetricsService() {
void MetricsService::InitializeMetricsState() {
DCHECK(state_ == INITIALIZED);
- thread_ = PlatformThread::CurrentId();
+ thread_ = base::PlatformThread::CurrentId();
user_permits_upload_ = GoogleUpdateSettings::GetCollectStatsConsent();
// Update session ID
@@ -480,7 +480,7 @@ void CALLBACK MetricsService::TransmissionTimerProc(HWND window,
void MetricsService::SetReporting(bool enable) {
static const int kChromeFrameMetricsTimerId = 0xFFFFFFFF;
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (reporting_active_ != enable) {
reporting_active_ = enable;
if (reporting_active_) {
@@ -498,7 +498,7 @@ void MetricsService::SetReporting(bool enable) {
// Recording control methods
void MetricsService::StartRecording() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (current_log_)
return;
@@ -509,7 +509,7 @@ void MetricsService::StartRecording() {
}
void MetricsService::StopRecording(bool save_log) {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (!current_log_)
return;
@@ -527,7 +527,7 @@ void MetricsService::StopRecording(bool save_log) {
}
void MetricsService::MakePendingLog() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (pending_log())
return;
@@ -556,7 +556,7 @@ bool MetricsService::TransmissionPermitted() const {
}
std::string MetricsService::PrepareLogSubmissionString() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
MakePendingLog();
DCHECK(pending_log());
@@ -572,7 +572,7 @@ std::string MetricsService::PrepareLogSubmissionString() {
}
bool MetricsService::UploadData() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (!GetInstance()->TransmissionPermitted())
return false;
diff --git a/chrome_frame/metrics_service.h b/chrome_frame/metrics_service.h
index 5976c18..46f39ed 100644
--- a/chrome_frame/metrics_service.h
+++ b/chrome_frame/metrics_service.h
@@ -15,8 +15,8 @@
#include "base/lazy_instance.h"
#include "base/lock.h"
#include "base/metrics/histogram.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread_local.h"
#include "chrome/common/metrics_helpers.h"
@@ -139,7 +139,7 @@ class MetricsService : public MetricsServiceBase {
// A number that identifies the how many times the app has been launched.
int session_id_;
- PlatformThreadId thread_;
+ base::PlatformThreadId thread_;
// Indicates if this is the first uma upload from this instance.
bool initial_uma_upload_;
diff --git a/chrome_frame/npapi_url_request.cc b/chrome_frame/npapi_url_request.cc
index 1d57065..0a28cdd 100644
--- a/chrome_frame/npapi_url_request.cc
+++ b/chrome_frame/npapi_url_request.cc
@@ -5,6 +5,7 @@
#include "chrome_frame/npapi_url_request.h"
#include "base/string_number_conversions.h"
+#include "base/threading/platform_thread.h"
#include "chrome_frame/np_browser_functions.h"
#include "chrome_frame/np_utils.h"
#include "net/base/net_errors.h"
@@ -44,7 +45,7 @@ class NPAPIUrlRequest : public PluginUrlRequest {
size_t pending_read_size_;
URLRequestStatus status_;
- PlatformThreadId thread_;
+ base::PlatformThreadId thread_;
static int instance_count_;
DISALLOW_COPY_AND_ASSIGN(NPAPIUrlRequest);
};
@@ -55,7 +56,7 @@ NPAPIUrlRequest::NPAPIUrlRequest(NPP instance)
: ref_count_(0), instance_(instance), stream_(NULL),
pending_read_size_(0),
status_(URLRequestStatus::FAILED, net::ERR_FAILED),
- thread_(PlatformThread::CurrentId()) {
+ thread_(base::PlatformThread::CurrentId()) {
DVLOG(1) << "Created request. Count: " << ++instance_count_;
}
@@ -187,13 +188,13 @@ int NPAPIUrlRequest::OnWrite(void* buffer, int len) {
}
STDMETHODIMP_(ULONG) NPAPIUrlRequest::AddRef() {
- DCHECK_EQ(PlatformThread::CurrentId(), thread_);
+ DCHECK_EQ(base::PlatformThread::CurrentId(), thread_);
++ref_count_;
return ref_count_;
}
STDMETHODIMP_(ULONG) NPAPIUrlRequest::Release() {
- DCHECK_EQ(PlatformThread::CurrentId(), thread_);
+ DCHECK_EQ(base::PlatformThread::CurrentId(), thread_);
unsigned long ret = --ref_count_;
if (!ret)
delete this;
diff --git a/chrome_frame/npapi_url_request.h b/chrome_frame/npapi_url_request.h
index a257faf..cce1b88 100644
--- a/chrome_frame/npapi_url_request.h
+++ b/chrome_frame/npapi_url_request.h
@@ -8,7 +8,6 @@
#include <map>
#include <string>
-#include "base/platform_thread.h"
#include "chrome_frame/plugin_url_request.h"
#include "third_party/npapi/bindings/npapi.h"
diff --git a/chrome_frame/ns_isupports_impl.h b/chrome_frame/ns_isupports_impl.h
index 4873163..c60201f 100644
--- a/chrome_frame/ns_isupports_impl.h
+++ b/chrome_frame/ns_isupports_impl.h
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "chrome_frame/utils.h"
#include "third_party/xulrunner-sdk/win/include/xpcom/nscore.h"
#include "third_party/xulrunner-sdk/win/include/xpcom/nsid.h"
@@ -19,15 +19,15 @@ template<class Derived>
class NsISupportsImplBase {
public:
NsISupportsImplBase() : nsiimpl_ref_count_(0) {
- nsiimpl_thread_id_ = PlatformThread::CurrentId();
+ nsiimpl_thread_id_ = base::PlatformThread::CurrentId();
}
virtual ~NsISupportsImplBase() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
}
NS_IMETHOD QueryInterface(REFNSIID iid, void** ptr) {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsresult res = NS_NOINTERFACE;
if (memcmp(&iid, &__uuidof(nsISupports), sizeof(nsIID)) == 0) {
@@ -40,13 +40,13 @@ class NsISupportsImplBase {
}
NS_IMETHOD_(nsrefcnt) AddRef() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsiimpl_ref_count_++;
return nsiimpl_ref_count_;
}
NS_IMETHOD_(nsrefcnt) Release() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsiimpl_ref_count_--;
if (!nsiimpl_ref_count_) {
diff --git a/chrome_frame/test/perf/run_all.cc b/chrome_frame/test/perf/run_all.cc
index 26c6e99..01dda7c 100644
--- a/chrome_frame/test/perf/run_all.cc
+++ b/chrome_frame/test/perf/run_all.cc
@@ -2,9 +2,9 @@
// 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/test/perf_test_suite.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/chrome_paths.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test_utils.h"
@@ -13,7 +13,7 @@
int main(int argc, char **argv) {
base::PerfTestSuite perf_suite(argc, argv);
chrome::RegisterPathProvider();
- PlatformThread::SetName("ChromeFrame perf tests");
+ base::PlatformThread::SetName("ChromeFrame perf tests");
SetConfigBool(kChromeFrameHeadlessMode, true);
SetConfigBool(kChromeFrameUnpinnedMode, true);
diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc
index 5dd916f..7c96587 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/ipc/ipc_fuzzing_tests.cc
@@ -7,8 +7,8 @@
#include <sstream>
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/process_util.h"
+#include "base/threading/platform_thread.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message_utils.h"
@@ -288,7 +288,7 @@ TEST_F(IPCFuzzingTest, SanityTest) {
&listener);
base::ProcessHandle server_process = SpawnChild(FUZZER_SERVER, &chan);
ASSERT_TRUE(server_process);
- PlatformThread::Sleep(1000);
+ base::PlatformThread::Sleep(1000);
ASSERT_TRUE(chan.Connect());
listener.Init(&chan);
@@ -318,7 +318,7 @@ TEST_F(IPCFuzzingTest, MsgBadPayloadShort) {
&listener);
base::ProcessHandle server_process = SpawnChild(FUZZER_SERVER, &chan);
ASSERT_TRUE(server_process);
- PlatformThread::Sleep(1000);
+ base::PlatformThread::Sleep(1000);
ASSERT_TRUE(chan.Connect());
listener.Init(&chan);
@@ -348,7 +348,7 @@ TEST_F(IPCFuzzingTest, MsgBadPayloadArgs) {
&listener);
base::ProcessHandle server_process = SpawnChild(FUZZER_SERVER, &chan);
ASSERT_TRUE(server_process);
- PlatformThread::Sleep(1000);
+ base::PlatformThread::Sleep(1000);
ASSERT_TRUE(chan.Connect());
listener.Init(&chan);
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 32969a3..b713c0a 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -12,11 +12,11 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "base/waitable_event.h"
#include "ipc/ipc_message.h"
@@ -1011,7 +1011,7 @@ class NestedTask : public Task {
explicit NestedTask(Worker* server) : server_(server) { }
void Run() {
// Sleep a bit so that we wake up after the reply has been received.
- PlatformThread::Sleep(250);
+ base::PlatformThread::Sleep(250);
server_->SendAnswerToLife(true, base::kNoTimeout, true);
}
diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc
index 3598cf3..4b2dd13 100644
--- a/ipc/sync_socket_unittest.cc
+++ b/ipc/sync_socket_unittest.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.
@@ -9,23 +9,20 @@
#include <sstream>
#include "base/message_loop.h"
-#if defined(OS_LINUX) || defined(OS_MACOSX)
-#include "base/file_descriptor_posix.h"
-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
-#include "base/platform_thread.h"
#include "base/process_util.h"
+#include "build/build_config.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
+#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_message_utils_impl.h"
#include "ipc/ipc_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
-
-// We don't actually use the messages defined in this file, but we do this
-// to get to the IPC macros.
-#include "ipc/ipc_sync_message_unittest.h"
+#if defined(OS_LINUX) || defined(OS_MACOSX)
+#include "base/file_descriptor_posix.h"
+#endif // defined(OS_LINUX) || defined(OS_MACOSX)
enum IPCMessageIds {
UNUSED_IPC_TYPE,
diff --git a/media/audio/audio_input_unittest.cc b/media/audio/audio_input_unittest.cc
index 82cb887..5ab4a62 100644
--- a/media/audio/audio_input_unittest.cc
+++ b/media/audio/audio_input_unittest.cc
@@ -5,8 +5,8 @@
#include "base/basictypes.h"
#include "base/environment.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -81,7 +81,7 @@ class TestInputCallbackBlocking : public TestInputCallback {
// Call the base, which increments the callback_count_.
TestInputCallback::OnData(stream, data, size);
if (callback_count() > block_after_callback_)
- PlatformThread::Sleep(block_for_ms_);
+ base::PlatformThread::Sleep(block_for_ms_);
}
private:
diff --git a/media/audio/audio_output_proxy_unittest.cc b/media/audio/audio_output_proxy_unittest.cc
index 0e531dd..2f308bd 100644
--- a/media/audio/audio_output_proxy_unittest.cc
+++ b/media/audio/audio_output_proxy_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "media/audio/audio_output_dispatcher.h"
#include "media/audio/audio_output_proxy.h"
#include "media/audio/audio_manager.h"
@@ -126,7 +126,7 @@ TEST_F(AudioOutputProxyTest, CreateAndWait) {
EXPECT_TRUE(proxy->Open());
// Simulate a delay.
- PlatformThread::Sleep(kTestCloseDelayMs * 2);
+ base::PlatformThread::Sleep(kTestCloseDelayMs * 2);
message_loop_.RunAllPending();
// Verify expectation before calling Close().
@@ -186,7 +186,7 @@ TEST_F(AudioOutputProxyTest, CloseAfterStop) {
// Simulate a delay.
message_loop_.RunAllPending();
- PlatformThread::Sleep(kTestCloseDelayMs * 10);
+ base::PlatformThread::Sleep(kTestCloseDelayMs * 10);
message_loop_.RunAllPending();
// Verify expectation before calling Close().
@@ -333,7 +333,7 @@ TEST_F(AudioOutputProxyTest, StartFailed) {
EXPECT_TRUE(proxy->Open());
// Simulate a delay.
- PlatformThread::Sleep(kTestCloseDelayMs);
+ base::PlatformThread::Sleep(kTestCloseDelayMs);
message_loop_.RunAllPending();
// Verify expectation before calling Close().
diff --git a/media/audio/fake_audio_input_stream_unittest.cc b/media/audio/fake_audio_input_stream_unittest.cc
index 487ddb7..27cf590 100644
--- a/media/audio/fake_audio_input_stream_unittest.cc
+++ b/media/audio/fake_audio_input_stream_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/basictypes.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -46,7 +46,9 @@ TEST(FakeAudioInputTest, FLAKY_BasicCallbacks) {
ASSERT_TRUE(NULL != stream);
EXPECT_TRUE(stream->Open());
stream->Start(&callback);
- PlatformThread::Sleep(340); // Give sufficient time to receive 5 / 6 packets.
+
+ // Give sufficient time to receive 5 / 6 packets.
+ base::PlatformThread::Sleep(340);
stream->Stop();
stream->Close();
}
diff --git a/media/filters/null_audio_renderer.cc b/media/filters/null_audio_renderer.cc
index b60b478..15fd41b 100644
--- a/media/filters/null_audio_renderer.cc
+++ b/media/filters/null_audio_renderer.cc
@@ -6,6 +6,7 @@
#include <cmath>
#include "base/logging.h"
+#include "base/threading/platform_thread.h"
#include "media/base/filter_host.h"
#include "media/filters/null_audio_renderer.h"
@@ -20,12 +21,12 @@ NullAudioRenderer::NullAudioRenderer()
: AudioRendererBase(),
bytes_per_millisecond_(0),
buffer_size_(0),
- thread_(kNullThreadHandle),
+ thread_(base::kNullThreadHandle),
shutdown_(false) {
}
NullAudioRenderer::~NullAudioRenderer() {
- DCHECK_EQ(kNullThreadHandle, thread_);
+ DCHECK_EQ(base::kNullThreadHandle, thread_);
}
void NullAudioRenderer::SetVolume(float volume) {
@@ -54,7 +55,8 @@ void NullAudioRenderer::ThreadMain() {
}
// Sleep for at least one millisecond so we don't spin the CPU.
- PlatformThread::Sleep(std::max(1, static_cast<int>(sleep_in_milliseconds)));
+ base::PlatformThread::Sleep(
+ std::max(1, static_cast<int>(sleep_in_milliseconds)));
}
}
@@ -76,14 +78,14 @@ bool NullAudioRenderer::OnInitialize(const MediaFormat& media_format) {
// It's safe to start the thread now because it simply sleeps when playback
// rate is 0.0f.
- return PlatformThread::Create(0, this, &thread_);
+ return base::PlatformThread::Create(0, this, &thread_);
}
void NullAudioRenderer::OnStop() {
shutdown_ = true;
if (thread_) {
- PlatformThread::Join(thread_);
- thread_ = kNullThreadHandle;
+ base::PlatformThread::Join(thread_);
+ thread_ = base::kNullThreadHandle;
}
}
diff --git a/media/filters/null_audio_renderer.h b/media/filters/null_audio_renderer.h
index 038ac25..95b345c 100644
--- a/media/filters/null_audio_renderer.h
+++ b/media/filters/null_audio_renderer.h
@@ -19,15 +19,16 @@
#include <deque>
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "media/base/buffers.h"
#include "media/base/filters.h"
#include "media/filters/audio_renderer_base.h"
namespace media {
-class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate {
+class NullAudioRenderer : public AudioRendererBase,
+ public base::PlatformThread::Delegate {
public:
NullAudioRenderer();
virtual ~NullAudioRenderer();
@@ -54,7 +55,7 @@ class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate {
size_t buffer_size_;
// Separate thread used to throw away data.
- PlatformThreadHandle thread_;
+ base::PlatformThreadHandle thread_;
// Shutdown flag.
bool shutdown_;
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc
index 994a520..8aee560 100644
--- a/media/filters/video_renderer_base.cc
+++ b/media/filters/video_renderer_base.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/callback.h"
+#include "base/threading/platform_thread.h"
#include "media/base/buffers.h"
#include "media/base/callback.h"
#include "media/base/filter_host.h"
@@ -30,7 +31,7 @@ VideoRendererBase::VideoRendererBase()
height_(0),
frame_available_(&lock_),
state_(kUninitialized),
- thread_(kNullThreadHandle),
+ thread_(base::kNullThreadHandle),
pending_reads_(0),
pending_paint_(false),
pending_paint_with_last_available_(false),
@@ -116,9 +117,9 @@ void VideoRendererBase::Stop(FilterCallback* callback) {
frame_available_.Signal();
{
AutoUnlock auto_unlock(lock_);
- PlatformThread::Join(thread_);
+ base::PlatformThread::Join(thread_);
}
- thread_ = kNullThreadHandle;
+ thread_ = base::kNullThreadHandle;
}
}
@@ -193,7 +194,7 @@ void VideoRendererBase::Initialize(VideoDecoder* decoder,
state_ = kFlushed;
// Create our video thread.
- if (!PlatformThread::Create(0, this, &thread_)) {
+ if (!base::PlatformThread::Create(0, this, &thread_)) {
NOTREACHED() << "Video thread creation failed";
host()->SetError(PIPELINE_ERROR_INITIALIZATION_FAILED);
state_ = kError;
@@ -215,7 +216,7 @@ bool VideoRendererBase::HasEnded() {
// PlatformThread::Delegate implementation.
void VideoRendererBase::ThreadMain() {
- PlatformThread::SetName("CrVideoRenderer");
+ base::PlatformThread::SetName("CrVideoRenderer");
base::TimeDelta remaining_time;
for (;;) {
diff --git a/media/filters/video_renderer_base.h b/media/filters/video_renderer_base.h
index 0ded475..8868521 100644
--- a/media/filters/video_renderer_base.h
+++ b/media/filters/video_renderer_base.h
@@ -19,8 +19,8 @@
#include "base/condition_variable.h"
#include "base/lock.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "media/base/filters.h"
#include "media/base/video_frame.h"
@@ -29,7 +29,7 @@ namespace media {
// TODO(scherkus): to avoid subclasses, consider using a peer/delegate interface
// and pass in a reference to the constructor.
class VideoRendererBase : public VideoRenderer,
- public PlatformThread::Delegate {
+ public base::PlatformThread::Delegate {
public:
VideoRendererBase();
virtual ~VideoRendererBase();
@@ -189,7 +189,7 @@ class VideoRendererBase : public VideoRenderer,
State state_;
// Video thread handle.
- PlatformThreadHandle thread_;
+ base::PlatformThreadHandle thread_;
// Previous time returned from the pipeline.
base::TimeDelta previous_time_;
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 7a06cb9..2efd715 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -5,6 +5,7 @@
#include "media/tools/player_wtl/movie.h"
#include "base/singleton.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "media/base/filter_collection.h"
#include "media/base/pipeline_impl.h"
@@ -80,7 +81,7 @@ bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
// Create and start our pipeline.
pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)), NULL);
while (true) {
- PlatformThread::Sleep(100);
+ base::PlatformThread::Sleep(100);
if (pipeline_->IsInitialized())
break;
if (pipeline_->GetError() != media::PIPELINE_OK)
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index 2d49d7c..df9bd619 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "media/base/callback.h"
#include "media/base/filter_collection.h"
@@ -124,7 +125,7 @@ bool InitPipeline(MessageLoop* message_loop,
// Wait until the pipeline is fully initialized.
while (true) {
- PlatformThread::Sleep(100);
+ base::PlatformThread::Sleep(100);
if ((*pipeline)->IsInitialized())
break;
if ((*pipeline)->GetError() != media::PIPELINE_OK) {
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index a0c16ea..f431674 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -7,11 +7,11 @@
#include <string>
#include "base/basictypes.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_monster.h"
@@ -1023,7 +1023,7 @@ TEST(CookieMonsterTest, TestLastAccess) {
EXPECT_TRUE(last_access_date == GetFirstCookieAccessDate(cm));
// Reading after a short wait should update the access date.
- PlatformThread::Sleep(kLastAccessThresholdMilliseconds + 20);
+ base::PlatformThread::Sleep(kLastAccessThresholdMilliseconds + 20);
EXPECT_EQ("A=B", cm->GetCookies(url_google));
EXPECT_FALSE(last_access_date == GetFirstCookieAccessDate(cm));
}
@@ -1201,7 +1201,7 @@ TEST(CookieMonsterTest, GetAllCookiesForURL) {
const Time last_access_date(GetFirstCookieAccessDate(cm));
- PlatformThread::Sleep(kLastAccessThresholdMilliseconds + 20);
+ base::PlatformThread::Sleep(kLastAccessThresholdMilliseconds + 20);
// Check cookies for url.
net::CookieList cookies = cm->GetAllCookiesForURL(url_google);
diff --git a/net/base/directory_lister.cc b/net/base/directory_lister.cc
index fd36132..a0f6317 100644
--- a/net/base/directory_lister.cc
+++ b/net/base/directory_lister.cc
@@ -10,7 +10,7 @@
#include "base/file_util.h"
#include "base/i18n/file_util_icu.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "net/base/net_errors.h"
@@ -104,7 +104,7 @@ DirectoryLister::DirectoryLister(const FilePath& dir,
delegate_(delegate),
sort_(ALPHA_DIRS_FIRST),
message_loop_(NULL),
- thread_(kNullThreadHandle) {
+ thread_(base::kNullThreadHandle) {
DCHECK(!dir.value().empty());
}
@@ -117,7 +117,7 @@ DirectoryLister::DirectoryLister(const FilePath& dir,
delegate_(delegate),
sort_(sort),
message_loop_(NULL),
- thread_(kNullThreadHandle) {
+ thread_(base::kNullThreadHandle) {
DCHECK(!dir.value().empty());
}
@@ -126,7 +126,7 @@ DirectoryLister::~DirectoryLister() {
// This is a bug and we should stop joining this thread.
// http://crbug.com/65331
base::ThreadRestrictions::ScopedAllowIO allow_io;
- PlatformThread::Join(thread_);
+ base::PlatformThread::Join(thread_);
}
}
@@ -139,7 +139,7 @@ bool DirectoryLister::Start() {
AddRef(); // the thread will release us when it is done
- if (!PlatformThread::Create(0, this, &thread_)) {
+ if (!base::PlatformThread::Create(0, this, &thread_)) {
Release();
return false;
}
@@ -154,8 +154,8 @@ void DirectoryLister::Cancel() {
// This is a bug and we should stop joining this thread.
// http://crbug.com/65331
base::ThreadRestrictions::ScopedAllowIO allow_io;
- PlatformThread::Join(thread_);
- thread_ = kNullThreadHandle;
+ base::PlatformThread::Join(thread_);
+ thread_ = base::kNullThreadHandle;
}
}
diff --git a/net/base/directory_lister.h b/net/base/directory_lister.h
index b531880..3419daa 100644
--- a/net/base/directory_lister.h
+++ b/net/base/directory_lister.h
@@ -11,9 +11,9 @@
#include "base/cancellation_flag.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/task.h"
+#include "base/threading/platform_thread.h"
class MessageLoop;
@@ -27,7 +27,7 @@ namespace net {
// is insulated from any of the multi-threading details.
//
class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>,
- public PlatformThread::Delegate {
+ public base::PlatformThread::Delegate {
public:
// Represents one file found.
struct DirectoryListerData {
@@ -106,7 +106,7 @@ class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>,
DirectoryListerDelegate* delegate_;
SORT_TYPE sort_;
MessageLoop* message_loop_;
- PlatformThreadHandle thread_;
+ base::PlatformThreadHandle thread_;
base::CancellationFlag canceled_;
};
diff --git a/net/base/mock_host_resolver.cc b/net/base/mock_host_resolver.cc
index 9ee5c53..a1817a2 100644
--- a/net/base/mock_host_resolver.cc
+++ b/net/base/mock_host_resolver.cc
@@ -5,8 +5,8 @@
#include "net/base/mock_host_resolver.h"
#include "base/string_util.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
+#include "base/threading/platform_thread.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/sys_addrinfo.h"
@@ -231,7 +231,7 @@ int RuleBasedHostResolverProc::Resolve(const std::string& host,
if (matches_flags && matches_address_family &&
MatchPattern(host, r->host_pattern)) {
if (r->latency_ms != 0)
- PlatformThread::Sleep(r->latency_ms);
+ base::PlatformThread::Sleep(r->latency_ms);
// Remap to a new host.
const std::string& effective_host =
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index d3e79a1..4703460 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -4,10 +4,10 @@
#include "base/basictypes.h"
#include "base/file_util.h"
-#include "base/platform_thread.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "base/threading/platform_thread.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
@@ -877,7 +877,7 @@ void DiskCacheBackendTest::BackendEnumerations2() {
entry2->Close();
// Make sure that the timestamp is not the same.
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
ASSERT_EQ(net::OK, OpenEntry(second, &entry1));
void* iter = NULL;
ASSERT_EQ(net::OK, OpenNextEntry(&iter, &entry2));
@@ -1053,7 +1053,7 @@ void DiskCacheBackendTest::BackendDoomRecent() {
ASSERT_EQ(net::OK, CreateEntry("second", &entry));
entry->Close();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time middle = Time::Now();
ASSERT_EQ(net::OK, CreateEntry("third", &entry));
@@ -1061,7 +1061,7 @@ void DiskCacheBackendTest::BackendDoomRecent() {
ASSERT_EQ(net::OK, CreateEntry("fourth", &entry));
entry->Close();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time final = Time::Now();
ASSERT_EQ(4, cache_->GetEntryCount());
@@ -1097,7 +1097,7 @@ void DiskCacheBackendTest::BackendDoomBetween() {
ASSERT_EQ(net::OK, CreateEntry("first", &entry));
entry->Close();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time middle_start = Time::Now();
ASSERT_EQ(net::OK, CreateEntry("second", &entry));
@@ -1105,7 +1105,7 @@ void DiskCacheBackendTest::BackendDoomBetween() {
ASSERT_EQ(net::OK, CreateEntry("third", &entry));
entry->Close();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time middle_end = Time::Now();
ASSERT_EQ(net::OK, CreateEntry("fourth", &entry));
@@ -1113,7 +1113,7 @@ void DiskCacheBackendTest::BackendDoomBetween() {
ASSERT_EQ(net::OK, OpenEntry("fourth", &entry));
entry->Close();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time final = Time::Now();
ASSERT_EQ(4, cache_->GetEntryCount());
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index cb7f680..21d5839 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2010 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/basictypes.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/timer.h"
#include "base/string_util.h"
#include "net/base/io_buffer.h"
@@ -634,7 +634,7 @@ void DiskCacheEntryTest::GetTimes() {
EXPECT_TRUE(entry->GetLastModified() >= t1);
EXPECT_TRUE(entry->GetLastModified() == entry->GetLastUsed());
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time t2 = Time::Now();
EXPECT_TRUE(t2 > t1);
EXPECT_EQ(0, WriteData(entry, 0, 200, NULL, 0, false));
@@ -645,7 +645,7 @@ void DiskCacheEntryTest::GetTimes() {
}
EXPECT_TRUE(entry->GetLastModified() == entry->GetLastUsed());
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
Time t3 = Time::Now();
EXPECT_TRUE(t3 > t2);
const int kSize = 200;
@@ -1286,7 +1286,7 @@ void DiskCacheEntryTest::DoomedEntry() {
FlushQueueForTest();
EXPECT_EQ(0, cache_->GetEntryCount());
Time initial = Time::Now();
- PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(20);
const int kSize1 = 2000;
const int kSize2 = 2000;
@@ -1746,7 +1746,7 @@ void DiskCacheEntryTest::DoomSparseEntry() {
// Most likely we are waiting for the result of reading the sparse info
// (it's always async on Posix so it is easy to miss). Unfortunately we
// don't have any signal to watch for so we can only wait.
- PlatformThread::Sleep(500);
+ base::PlatformThread::Sleep(500);
MessageLoop::current()->RunAllPending();
}
EXPECT_EQ(0, cache_->GetEntryCount());
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
index 6658dc8..41a98c9 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/stress_cache.cc
@@ -32,10 +32,10 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
-#include "base/platform_thread.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/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "net/base/net_errors.h"
@@ -228,7 +228,7 @@ int main(int argc, const char* argv[]) {
logging::SetLogAssertHandler(CrashHandler);
// Some time for the memory manager to flush stuff.
- PlatformThread::Sleep(3000);
+ base::PlatformThread::Sleep(3000);
MessageLoop message_loop(MessageLoop::TYPE_IO);
char* end;
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 7c0e2e1..c6092d7 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -7,11 +7,11 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/ref_counted.h"
#include "base/scoped_vector.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/threading/platform_thread.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/base/net_log_unittest.h"
@@ -618,7 +618,7 @@ TEST_F(ClientSocketPoolBaseTest, ConnectJob_TimedOut) {
&client_socket_factory_,
&log);
ASSERT_EQ(ERR_IO_PENDING, job->Connect());
- PlatformThread::Sleep(1);
+ base::PlatformThread::Sleep(1);
EXPECT_EQ(ERR_TIMED_OUT, delegate.WaitForResult());
net::CapturingNetLog::EntryList entries;
@@ -872,7 +872,7 @@ TEST_F(ClientSocketPoolBaseTest, TotalLimitCountsConnectingSockets) {
// actually become pending until 2ms after they have been created. In order
// to flush all tasks, we need to wait so that we know there are no
// soon-to-be-pending tasks waiting.
- PlatformThread::Sleep(10);
+ base::PlatformThread::Sleep(10);
MessageLoop::current()->RunAllPending();
// The next synchronous request should wait for its turn.
@@ -1315,7 +1315,7 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
{
MessageLoop::ScopedNestableTaskAllower nestable(
MessageLoop::current());
- PlatformThread::Sleep(10);
+ base::PlatformThread::Sleep(10);
EXPECT_EQ(OK, next_job_callback.WaitForResult());
}
break;
@@ -1890,7 +1890,7 @@ TEST_F(ClientSocketPoolBaseTest, CleanupTimedOutIdleSockets) {
// actually become pending until 2ms after they have been created. In order
// to flush all tasks, we need to wait so that we know there are no
// soon-to-be-pending tasks waiting.
- PlatformThread::Sleep(10);
+ base::PlatformThread::Sleep(10);
MessageLoop::current()->RunAllPending();
ASSERT_EQ(2, pool_->IdleSocketCount());
@@ -2313,7 +2313,8 @@ TEST_F(ClientSocketPoolBaseTest, BackupSocketCancelAtMaxSockets) {
handle.Reset();
// Wait for the backup timer to fire (add some slop to ensure it fires)
- PlatformThread::Sleep(ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
+ base::PlatformThread::Sleep(
+ ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kDefaultMaxSockets, client_socket_factory_.allocation_count());
@@ -2341,7 +2342,8 @@ TEST_F(ClientSocketPoolBaseTest, CancelBackupSocketAfterCancelingAllRequests) {
// the backup time to see if it indeed got canceled.
handle.Reset();
// Wait for the backup timer to fire (add some slop to ensure it fires)
- PlatformThread::Sleep(ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
+ base::PlatformThread::Sleep(
+ ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
MessageLoop::current()->RunAllPending();
ASSERT_TRUE(pool_->HasGroup("bar"));
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("bar"));
@@ -2379,7 +2381,8 @@ TEST_F(ClientSocketPoolBaseTest, CancelBackupSocketAfterFinishingAllRequests) {
handle.Reset();
EXPECT_EQ(OK, callback2.WaitForResult());
// Wait for the backup timer to fire (add some slop to ensure it fires)
- PlatformThread::Sleep(ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
+ base::PlatformThread::Sleep(
+ ClientSocketPool::kMaxConnectRetryIntervalMs / 2 * 3);
MessageLoop::current()->RunAllPending();
}
diff --git a/net/url_request/url_request_job_manager.h b/net/url_request/url_request_job_manager.h
index a0d3c87..34e3a58 100644
--- a/net/url_request/url_request_job_manager.h
+++ b/net/url_request/url_request_job_manager.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/lock.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "net/url_request/url_request.h"
template <typename T> struct DefaultSingletonTraits;
@@ -84,7 +84,7 @@ class URLRequestJobManager {
#ifndef NDEBUG
// We use this to assert that CreateJob and the registration functions all
// run on the same thread.
- mutable PlatformThreadId allowed_thread_;
+ mutable base::PlatformThreadId allowed_thread_;
mutable bool allowed_thread_initialized_;
// The first guy to call this function sets the allowed thread. This way we
@@ -94,10 +94,10 @@ class URLRequestJobManager {
bool IsAllowedThread() const {
#if 0
if (!allowed_thread_initialized_) {
- allowed_thread_ = PlatformThread::CurrentId();
+ allowed_thread_ = base::PlatformThread::CurrentId();
allowed_thread_initialized_ = true;
}
- return allowed_thread_ == PlatformThread::CurrentId();
+ return allowed_thread_ == base::PlatformThread::CurrentId();
#else
// The previous version of this check used GetCurrentThread on Windows to
// get thread handles to compare. Unfortunately, GetCurrentThread returns
diff --git a/remoting/base/tracer.cc b/remoting/base/tracer.cc
index 69f41b1..0126e1f 100644
--- a/remoting/base/tracer.cc
+++ b/remoting/base/tracer.cc
@@ -10,11 +10,11 @@
#include "base/condition_variable.h"
#include "base/lazy_instance.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
#include "base/rand_util.h"
#include "base/ref_counted.h"
#include "base/stl_util-inl.h"
#include "base/threading/thread.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread_local.h"
#include "base/time.h"
diff --git a/sandbox/src/broker_services.cc b/sandbox/src/broker_services.cc
index 3b832f6..f6a0577 100644
--- a/sandbox/src/broker_services.cc
+++ b/sandbox/src/broker_services.cc
@@ -5,7 +5,7 @@
#include "sandbox/src/broker_services.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "sandbox/src/sandbox_policy_base.h"
#include "sandbox/src/sandbox.h"
#include "sandbox/src/target_process.h"
@@ -138,7 +138,7 @@ DWORD WINAPI BrokerServicesBase::TargetEventsThread(PVOID param) {
if (NULL == param)
return 1;
- PlatformThread::SetName("BrokerEvent");
+ base::PlatformThread::SetName("BrokerEvent");
BrokerServicesBase* broker = reinterpret_cast<BrokerServicesBase*>(param);
HANDLE port = broker->job_port_;
diff --git a/webkit/tools/test_shell/simple_database_system.cc b/webkit/tools/test_shell/simple_database_system.cc
index c5a573e..4c591e6 100644
--- a/webkit/tools/test_shell/simple_database_system.cc
+++ b/webkit/tools/test_shell/simple_database_system.cc
@@ -7,7 +7,7 @@
#include "base/auto_reset.h"
#include "base/file_util.h"
#include "base/message_loop.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"