summaryrefslogtreecommitdiffstats
path: root/chrome/browser
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 /chrome/browser
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
Diffstat (limited to 'chrome/browser')
-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
26 files changed, 68 insertions, 73 deletions
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"