summaryrefslogtreecommitdiffstats
path: root/base/time
diff options
context:
space:
mode:
authordconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-04 13:52:51 +0000
committerdconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-04 13:52:51 +0000
commit11572c1449c9d96f89c8fdd34264dc511a44ff73 (patch)
tree337f36dfd6a90e0a52efdbb19e08e0941c8b1f3d /base/time
parent596dc1bfa0be9c756ccd9746419101868d86c772 (diff)
downloadchromium_src-11572c1449c9d96f89c8fdd34264dc511a44ff73.zip
chromium_src-11572c1449c9d96f89c8fdd34264dc511a44ff73.tar.gz
chromium_src-11572c1449c9d96f89c8fdd34264dc511a44ff73.tar.bz2
Revert "Non-SFI NaCl: Allow CLOCK_SYSTEM_TRACE on Chrome OS"
This reverts commit 8dfdf978b61a74b65cda8e7f22d32d0ae743eab0. Breaking Linux Chromium OS Tests: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/44018 BUG=none TBR=hamaji@chromium.org Review URL: https://codereview.chromium.org/313053004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time')
-rw-r--r--base/time/time.h8
-rw-r--r--base/time/time_posix.cc19
2 files changed, 9 insertions, 18 deletions
diff --git a/base/time/time.h b/base/time/time.h
index 41d662a..f08ba68 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -576,14 +576,6 @@ inline Time TimeDelta::operator+(Time t) const {
class BASE_EXPORT TimeTicks {
public:
- // We define this even without OS_CHROMEOS for seccomp sandbox testing.
-#if defined(OS_LINUX)
- // Force definition of the system trace clock; it is a chromeos-only api
- // at the moment and surfacing it in the right place requires mucking
- // with glibc et al.
- static const clockid_t kClockSystemTrace = 11;
-#endif
-
TimeTicks() : ticks_(0) {
}
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index 3037c98..6b08bb3 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -320,19 +320,18 @@ TimeTicks TimeTicks::ThreadNow() {
#endif
}
-// NaCl IRT does not support the Chrome OS specific clock
-// ID. build/common.gypi sets OS_CHROMEOS without any other OS_*
-// macros for untrusted NaCl build so we need to check
-// __native_client__ explicitly.
-// TODO(hamaji): Do not specify OS_CHROMEOS for untrusted NaCl build
-// and remove !defined(__native_client__).
-#if defined(OS_CHROMEOS) && !defined(__native_client__)
+#if defined(OS_CHROMEOS)
+// Force definition of the system trace clock; it is a chromeos-only api
+// at the moment and surfacing it in the right place requires mucking
+// with glibc et al.
+#define CLOCK_SYSTEM_TRACE 11
+
// static
TimeTicks TimeTicks::NowFromSystemTraceTime() {
uint64_t absolute_micro;
struct timespec ts;
- if (clock_gettime(kClockSystemTrace, &ts) != 0) {
+ if (clock_gettime(CLOCK_SYSTEM_TRACE, &ts) != 0) {
// NB: fall-back for a chrome os build running on linux
return HighResNow();
}
@@ -344,14 +343,14 @@ TimeTicks TimeTicks::NowFromSystemTraceTime() {
return TimeTicks(absolute_micro);
}
-#else // !(defined(OS_CHROMEOS) && !defined(__native_client__))
+#else // !defined(OS_CHROMEOS)
// static
TimeTicks TimeTicks::NowFromSystemTraceTime() {
return HighResNow();
}
-#endif // defined(OS_CHROMEOS) && !defined(__native_client__)
+#endif // defined(OS_CHROMEOS)
#endif // !OS_MACOSX