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

Unified Diff: webrtc/system_wrappers/include/field_trial.h

Issue 2719233003: Provide an inline implementation of IsEnabled. (Closed)
Patch Set: Created 3 years, 10 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 | webrtc/system_wrappers/source/field_trial_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/include/field_trial.h
diff --git a/webrtc/system_wrappers/include/field_trial.h b/webrtc/system_wrappers/include/field_trial.h
index d649191563e9697344748266206ad065bfb49c33..b94be2cf115ff1eabfed581fed9ebde45424f26b 100644
--- a/webrtc/system_wrappers/include/field_trial.h
+++ b/webrtc/system_wrappers/include/field_trial.h
@@ -64,7 +64,10 @@ std::string FindFullName(const std::string& name);
// Convenience method, returns true iff FindFullName(name) return a string that
// starts with "Enabled".
-bool IsEnabled(const char* name);
+// TODO(tommi): Make sure all implementations support this.
+inline bool IsEnabled(const char* name) {
+ return FindFullName(name).find("Enabled") == 0;
+}
} // namespace field_trial
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/system_wrappers/source/field_trial_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698