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: base/third_party/nspr/prtime.cc

Issue 7701014: Upstream misc changes for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added more files, and addressed the comments Created 9 years, 4 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
« no previous file with comments | « base/shared_memory_android.cc ('k') | base/time_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/third_party/nspr/prtime.cc
diff --git a/base/third_party/nspr/prtime.cc b/base/third_party/nspr/prtime.cc
index f1fcf26cd81842765477a38a90e0f8ceeb58187e..5b7826984d7a4bdfa075dbc75b51851ba1beff7a 100644
--- a/base/third_party/nspr/prtime.cc
+++ b/base/third_party/nspr/prtime.cc
@@ -71,6 +71,9 @@
#include <windows.h>
#elif defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
+#elif defined(OS_ANDROID)
+#include <ctype.h>
+#include "base/time.h" // For timegm()
brettw 2011/08/24 23:17:13 I don't think you actually updated this like you s
michaelbai 2011/08/25 17:26:16 Here it is, thanks
#endif
#include <errno.h> /* for EINVAL */
#include <time.h>
@@ -138,10 +141,10 @@ PR_ImplodeTime(const PRExplodedTime *exploded)
gregorian_date.minute = exploded->tm_min;
gregorian_date.second = exploded->tm_sec;
- // Compute |absolute_time| in seconds, correct for gmt and dst
+ // Compute |absolute_time| in seconds, correct for gmt and dst
// (note the combined offset will be negative when we need to add it), then
// convert to microseconds which is what PRTime expects.
- CFAbsoluteTime absolute_time =
+ CFAbsoluteTime absolute_time =
CFGregorianDateGetAbsoluteTime(gregorian_date, NULL);
PRTime result = static_cast<PRTime>(absolute_time);
result -= exploded->tm_params.tp_gmt_offset +
« no previous file with comments | « base/shared_memory_android.cc ('k') | base/time_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698