OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 void SetupLightSpeedTrials() { | 38 void SetupLightSpeedTrials() { |
39 if (!variations::GetVariationParamValue("LightSpeed", "NoGpu").empty()) { | 39 if (!variations::GetVariationParamValue("LightSpeed", "NoGpu").empty()) { |
40 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 40 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
41 switches::kDisableGpu); | 41 switches::kDisableGpu); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 void SetupStunProbeTrial() { | 45 void SetupStunProbeTrial() { |
46 #if defined(ENABLE_WEBRTC) | 46 #if defined(ENABLE_WEBRTC) |
47 std::map<std::string, std::string> params; | 47 std::map<std::string, std::string> params; |
48 if (!variations::GetVariationParams("StunProbeTrial", ¶ms)) | 48 if (!variations::GetVariationParams("StunProbeTrial2", ¶ms)) |
49 return; | 49 return; |
50 | 50 |
51 // The parameter, used by StartStunFieldTrial, should have the following | 51 // The parameter, used by StartStunFieldTrial, should have the following |
52 // format: "request_per_ip/interval/sharedsocket/server1:port/server2:port/ | 52 // format: "request_per_ip/interval/sharedsocket/batch_size/total_batches/ |
53 // server3:port/" | 53 // server1:port/server2:port/server3:port/" |
54 std::string cmd_param = params["request_per_ip"] + "/" + params["interval"] + | 54 std::string cmd_param = params["request_per_ip"] + "/" + params["interval"] + |
55 "/" + params["sharedsocket"] + "/" + | 55 "/" + params["sharedsocket"] + "/" + |
56 params["server1"] + "/" + params["server2"] + "/" + | 56 params["batch_size"] + "/" + params["total_batches"] + |
57 params["server3"] + "/"; | 57 "/" + params["server1"] + "/" + params["server2"] + |
58 "/" + params["server3"] + "/" + params["server4"] + | |
59 "/" + params["server5"] + "/" + params["server6"]; | |
pthatcher2
2015/10/29 14:13:13
Why do we need 6 servers?
guoweis_webrtc
2015/10/29 21:45:29
The parsing code will stop at the empty server so
| |
58 | 60 |
59 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 61 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
60 switches::kWebRtcStunProbeTrialParameter, cmd_param); | 62 switches::kWebRtcStunProbeTrialParameter, cmd_param); |
61 #endif | 63 #endif |
62 } | 64 } |
63 | 65 |
64 } // namespace | 66 } // namespace |
65 | 67 |
66 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) { | 68 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) { |
67 prerender::ConfigurePrerender(parsed_command_line); | 69 prerender::ConfigurePrerender(parsed_command_line); |
68 AutoLaunchChromeFieldTrial(); | 70 AutoLaunchChromeFieldTrial(); |
69 SetupLightSpeedTrials(); | 71 SetupLightSpeedTrials(); |
70 tracing::SetupBackgroundTracingFieldTrial(); | 72 tracing::SetupBackgroundTracingFieldTrial(); |
71 SetupStunProbeTrial(); | 73 SetupStunProbeTrial(); |
72 } | 74 } |
73 | 75 |
74 } // namespace chrome | 76 } // namespace chrome |
OLD | NEW |