• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "test/field_trial.h"
12 
13 #include <algorithm>
14 #include <cassert>
15 #include <cstdio>
16 #include <cstdlib>
17 #include <map>
18 #include <string>
19 
20 #include "system_wrappers/include/field_trial.h"
21 
22 namespace webrtc {
23 namespace test {
ValidateFieldTrialsStringOrDie(const std::string &)24 void ValidateFieldTrialsStringOrDie(const std::string&) {}
25 
ScopedFieldTrials(const std::string & config)26 ScopedFieldTrials::ScopedFieldTrials(const std::string& config)
27     : previous_field_trials_(webrtc::field_trial::GetFieldTrialString()) {
28   current_field_trials_ = config;
29   webrtc::field_trial::InitFieldTrialsFromString(current_field_trials_.c_str());
30 }
31 
~ScopedFieldTrials()32 ScopedFieldTrials::~ScopedFieldTrials() {
33   webrtc::field_trial::InitFieldTrialsFromString(previous_field_trials_);
34 }
35 
36 }  // namespace test
37 }  // namespace webrtc
38