| Index: base/profiler/alternate_timer.cc
|
| diff --git a/base/profiler/alternate_timer.cc b/base/profiler/alternate_timer.cc
|
| index 05a983c4be41214639d2d5c37007e3af173bfbe8..abf91802061d267f7335ac489d5a7f36f98f4555 100644
|
| --- a/base/profiler/alternate_timer.cc
|
| +++ b/base/profiler/alternate_timer.cc
|
| @@ -6,20 +6,25 @@
|
|
|
| #include "base/logging.h"
|
|
|
| -namespace tracked_objects {
|
| +namespace {
|
| +
|
| +tracked_objects::NowFunction* g_time_function = NULL;
|
|
|
| -static NowFunction* g_time_function = NULL;
|
| +} // anonymous namespace
|
| +
|
| +namespace tracked_objects {
|
|
|
| const char kAlternateProfilerTime[] = "CHROME_PROFILER_TIME";
|
|
|
| // Set an alternate timer function to replace the OS time function when
|
| // profiling.
|
| void SetAlternateTimeSource(NowFunction* now_function) {
|
| - DCHECK_EQ(g_time_function, reinterpret_cast<NowFunction*>(NULL));
|
| + DCHECK_EQ(reinterpret_cast<NowFunction*>(NULL), g_time_function);
|
| g_time_function = now_function;
|
| }
|
|
|
| -extern NowFunction* GetAlternateTimeSource() {
|
| +NowFunction* GetAlternateTimeSource() {
|
| return g_time_function;
|
| }
|
| -} // tracked_objects
|
| +
|
| +} // namespace tracked_objects
|
|
|