Port the Thread class properly to Mac and Linux. This involved porting
PlatformThread and creating an API on PlatformThread to create a native thread
and later join with it. I also made a few other tweaks to PlatformThread, such
as eliminating the Current() method which appears to be unused. The
operator==() is also unused, so I killed it as well.
I made a few other miscellaneous cleanups and adjustments.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1146 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: e9ba26d8303272f6a4a75b53ebf4b96ae8df05f6
diff --git a/base/watchdog.cc b/base/watchdog.cc
index 1d9c183..f8540eb 100644
--- a/base/watchdog.cc
+++ b/base/watchdog.cc
@@ -28,8 +28,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "base/watchdog.h"
+
+#include "base/platform_thread.h"
#include "base/string_util.h"
-#include "base/thread.h"
//------------------------------------------------------------------------------
// Public API methods.
@@ -159,7 +160,7 @@
void Watchdog::SetThreadName() const {
std::string name = StringPrintf("%s Watchdog",
WideToASCII(thread_watched_name_).c_str());
- Thread::SetThreadName(name.c_str(), thread_id_);
+ PlatformThread::SetName(thread_id_, name.c_str());
DLOG(INFO) << "Watchdog active: " << name;
}