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

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: 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..49b5a20f2adce71100b0726d9de5e20aafcb37b3 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)
rvargas (doing something else) 2014/10/16 22:32:07 nit: invert the order of the if (#if defined()) I
Sébastien Marchand 2014/10/17 13:51:11 Done. We shouldn't use this macro that much, but
const char kDateTime[] = __DATE__ " " __TIME__ " PST";
+#else
+ const char kDateTime[] = "Sep 02 2008 08:00:00 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