Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3791)

Unified Diff: base/logging.cc

Issue 9391: Enabled WebFrameTest, stubbed out a gtk test shell function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
===================================================================
--- base/logging.cc (revision 4729)
+++ base/logging.cc (working copy)
@@ -36,10 +36,13 @@
#include "base/command_line.h"
#include "base/debug_util.h"
#include "base/lock_impl.h"
+#include "base/platform_thread.h"
+#include "base/process_util.h"
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
-
+#include "base/time.h"
+
namespace logging {
bool g_enable_dcheck = false;
@@ -106,36 +109,6 @@
// Helper functions to wrap platform differences.
-int32 CurrentProcessId() {
-#if defined(OS_WIN)
- return GetCurrentProcessId();
-#elif defined(OS_POSIX)
- return getpid();
-#endif
-}
-
-int32 CurrentThreadId() {
-#if defined(OS_WIN)
- return GetCurrentThreadId();
-#elif defined(OS_MACOSX)
- return mach_thread_self();
-#else
- NOTIMPLEMENTED();
- return 0;
-#endif
-}
-
-uint64 TickCount() {
-#if defined(OS_WIN)
- return GetTickCount();
-#elif defined(OS_MACOSX)
- return mach_absolute_time();
-#else
- NOTIMPLEMENTED();
- return 0;
-#endif
-}
-
void CloseFile(FileHandle log) {
#if defined(OS_WIN)
CloseHandle(log);
@@ -362,9 +335,9 @@
stream_ << '[';
if (log_process_id)
- stream_ << CurrentProcessId() << ':';
+ stream_ << process_util::GetCurrentProcId() << ':';
if (log_thread_id)
- stream_ << CurrentThreadId() << ':';
+ stream_ << PlatformThread::CurrentId() << ':';
if (log_timestamp) {
time_t t = time(NULL);
#if _MSC_VER >= 1400
@@ -384,7 +357,7 @@
<< ':';
}
if (log_tickcount)
- stream_ << TickCount() << ':';
+ stream_ << base::TimeTicks::Now().ToInternalValue() << ':';
stream_ << log_severity_names[severity_] << ":" << file << "(" << line << ")] ";
message_start_ = stream_.tellp();
« no previous file with comments | « no previous file | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698