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

Unified Diff: base/build_time.cc

Issue 660753003: Put some references to __DATE__ and __TIME__ behind a preprocessor flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit. Created 6 years, 2 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 | « no previous file | base/build_time_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/build_time.cc
diff --git a/base/build_time.cc b/base/build_time.cc
index 760269a3ffe33aada613e23476815466f1420c69..86503e22a9f0400fa0828a3c4de4f0140767af14 100644
--- a/base/build_time.cc
+++ b/base/build_time.cc
@@ -16,7 +16,11 @@ Time GetBuildTime() {
//
// __DATE__ is exactly "Mmm DD YYYY".
// __TIME__ is exactly "hh:mm:ss".
+#if defined(DONT_EMBED_BUILD_METADATA)
+ const char kDateTime[] = "Sep 02 2008 08:00:00 PST";
+#else
const char kDateTime[] = __DATE__ " " __TIME__ " PST";
+#endif
bool result = Time::FromString(kDateTime, &integral_build_time);
DCHECK(result);
return integral_build_time;
« no previous file with comments | « no previous file | base/build_time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698