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

Unified Diff: third_party/tcmalloc/chromium/src/base/commandlineflags.h

Issue 281613004: Don't let tcmalloc read all kinds of env vars at startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: profile Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/base/commandlineflags.h
diff --git a/third_party/tcmalloc/chromium/src/base/commandlineflags.h b/third_party/tcmalloc/chromium/src/base/commandlineflags.h
index 649b95fa450e838832d65f0750161689c16a6bf4..6d41e8643659c560d4e9425f6da67bb556a0c403 100644
--- a/third_party/tcmalloc/chromium/src/base/commandlineflags.h
+++ b/third_party/tcmalloc/chromium/src/base/commandlineflags.h
@@ -119,6 +119,8 @@
// They are functions in Android because __system_property_get() doesn't
// return a string.
+#if defined(ENABLE_PROFILING)
+
#if defined(__ANDROID__) || defined(ANDROID)
// Returns a pointer to a static variable. The string pointed by the returned
@@ -178,4 +180,14 @@ inline double EnvToDouble(const char* envname, double dflt) {
#endif // defined(__ANDROID__) || defined(ANDROID)
+#else // defined(ENABLE_PROFILING)
+
+#define EnvToString(envname, dflt) (dflt)
+#define EnvToBool(envname, dflt) (dflt)
+#define EnvToInt(envname, dflt) (dflt)
+#define EnvToInt64(envname, dflt) (dflt)
+#define EnvToDouble(envname, dflt) (dflt)
+
+#endif // defined(ENABLE_PROFILING)
+
#endif // BASE_COMMANDLINEFLAGS_H_
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698