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

Unified Diff: webrtc/test/field_trial.cc

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Tests. Created 5 years, 5 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
Index: webrtc/test/field_trial.cc
diff --git a/webrtc/test/field_trial.cc b/webrtc/test/field_trial.cc
index 6b3d83cf563cc3d90a521d4b45f844ba5119bac4..ed3b883b54b2a0cde409ba018020416b6dea821a 100644
--- a/webrtc/test/field_trial.cc
+++ b/webrtc/test/field_trial.cc
@@ -45,11 +45,14 @@ namespace test {
void InitFieldTrialsFromString(const std::string& trials_string) {
static const char kPersistentStringSeparator = '/';
- // Catch an error if this is called more than once.
- assert(field_trials_initiated_ == false);
+ assert(!field_trials_initiated_ || trials_string.empty());
+
field_trials_initiated_ = true;
- if (trials_string.empty()) return;
+ if (trials_string.empty()) {
pbos-webrtc 2015/07/06 13:30:17 trials_string == "" reads better
+ field_trials_.clear();
+ return;
+ }
size_t next_item = 0;
while (next_item < trials_string.length()) {

Powered by Google App Engine
This is Rietveld 408576698