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

Unified Diff: base/time_posix.cc

Issue 11453012: Fix black background when locking with fullscreen window: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename undo/stop to cancel Created 8 years 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
Index: base/time_posix.cc
diff --git a/base/time_posix.cc b/base/time_posix.cc
index b6a12501212e64cee0686d0aaa6d04d581b141dd..a842e7dadf411aa0ca380d6fe9e3d6bdea7c4927 100644
--- a/base/time_posix.cc
+++ b/base/time_posix.cc
@@ -111,6 +111,9 @@ const int64 Time::kTimeTToMicrosecondsOffset = kWindowsEpochDeltaMicroseconds;
// static
Time Time::Now() {
+ if (TimeFactory::instance())
+ return TimeFactory::instance()->TimeNow();
+
struct timeval tv;
struct timezone tz = { 0, 0 }; // UTC
if (gettimeofday(&tv, &tz) != 0) {
@@ -237,6 +240,9 @@ Time Time::FromExploded(bool is_local, const Exploded& exploded) {
// static
TimeTicks TimeTicks::Now() {
+ if (TimeFactory::instance())
+ return TimeFactory::instance()->TimeTicksNow();
+
uint64_t absolute_micro;
struct timespec ts;
« base/test/scoped_time_controller.cc ('K') | « base/time_mac.cc ('k') | base/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698