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

Unified Diff: src/date.h

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 months 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
« src/base/macros.h ('K') | « src/d8.cc ('k') | src/date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.h
diff --git a/src/date.h b/src/date.h
index 89ae641c19a329916880c58bc6533aca83a0c28a..812647b049e095905a6f94c4e8b9eb7aad262990 100644
--- a/src/date.h
+++ b/src/date.h
@@ -6,8 +6,8 @@
#define V8_DATE_H_
#include "src/allocation.h"
+#include "src/base/platform/platform.h"
#include "src/globals.h"
-#include "src/platform.h"
namespace v8 {
@@ -39,12 +39,12 @@ class DateCache {
// It is an invariant of DateCache that cache stamp is non-negative.
static const int kInvalidStamp = -1;
- DateCache() : stamp_(0), tz_cache_(OS::CreateTimezoneCache()) {
+ DateCache() : stamp_(0), tz_cache_(base::OS::CreateTimezoneCache()) {
ResetDateCache();
}
virtual ~DateCache() {
- OS::DisposeTimezoneCache(tz_cache_);
+ base::OS::DisposeTimezoneCache(tz_cache_);
tz_cache_ = NULL;
}
@@ -93,7 +93,7 @@ class DateCache {
if (time_ms < 0 || time_ms > kMaxEpochTimeInMs) {
time_ms = EquivalentTime(time_ms);
}
- return OS::LocalTimezone(static_cast<double>(time_ms), tz_cache_);
+ return base::OS::LocalTimezone(static_cast<double>(time_ms), tz_cache_);
}
// ECMA 262 - 15.9.5.26
@@ -162,11 +162,12 @@ class DateCache {
// These functions are virtual so that we can override them when testing.
virtual int GetDaylightSavingsOffsetFromOS(int64_t time_sec) {
double time_ms = static_cast<double>(time_sec * 1000);
- return static_cast<int>(OS::DaylightSavingsOffset(time_ms, tz_cache_));
+ return static_cast<int>(
+ base::OS::DaylightSavingsOffset(time_ms, tz_cache_));
}
virtual int GetLocalOffsetFromOS() {
- double offset = OS::LocalTimeOffset(tz_cache_);
+ double offset = base::OS::LocalTimeOffset(tz_cache_);
ASSERT(offset < kInvalidLocalOffsetInMs);
return static_cast<int>(offset);
}
@@ -234,7 +235,7 @@ class DateCache {
int ymd_month_;
int ymd_day_;
- TimezoneCache* tz_cache_;
+ base::TimezoneCache* tz_cache_;
};
} } // namespace v8::internal
« src/base/macros.h ('K') | « src/d8.cc ('k') | src/date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698