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

Side by Side Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years 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 unified diff | Download patch
OLDNEW
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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/activity_tracker.h" 11 #include "base/debug/activity_tracker.h"
12 #include "base/feature_list.h" 12 #include "base/feature_list.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/metrics/field_trial.h" 14 #include "base/metrics/field_trial.h"
15 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "chrome/browser/prerender/prerender_field_trial.h" 17 #include "chrome/browser/prerender/prerender_field_trial.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "components/browser_watcher/features.h" 20 #include "components/browser_watcher/features.h"
21 #include "components/variations/variations_associated_data.h" 21 #include "components/variations/variations_associated_data.h"
22 #include "content/public/common/content_switches.h" 22 #include "content/public/common/content_switches.h"
23 #include "media/media_features.h"
23 24
24 #if defined(OS_WIN) 25 #if defined(OS_WIN)
25 #include "components/browser_watcher/stability_debugging_win.h" 26 #include "components/browser_watcher/stability_debugging_win.h"
26 #endif 27 #endif
27 28
28 namespace chrome { 29 namespace chrome {
29 30
30 namespace { 31 namespace {
31 32
32 void SetupStunProbeTrial() { 33 void SetupStunProbeTrial() {
33 #if defined(ENABLE_WEBRTC) 34 #if BUILDFLAG(ENABLE_WEBRTC)
34 std::map<std::string, std::string> params; 35 std::map<std::string, std::string> params;
35 if (!variations::GetVariationParams("StunProbeTrial2", &params)) 36 if (!variations::GetVariationParams("StunProbeTrial2", &params))
36 return; 37 return;
37 38
38 // The parameter, used by StartStunFieldTrial, should have the following 39 // The parameter, used by StartStunFieldTrial, should have the following
39 // format: "request_per_ip/interval/sharedsocket/batch_size/total_batches/ 40 // format: "request_per_ip/interval/sharedsocket/batch_size/total_batches/
40 // server1:port/server2:port/server3:port/" 41 // server1:port/server2:port/server3:port/"
41 std::string cmd_param = params["request_per_ip"] + "/" + params["interval"] + 42 std::string cmd_param = params["request_per_ip"] + "/" + params["interval"] +
42 "/" + params["sharedsocket"] + "/" + 43 "/" + params["sharedsocket"] + "/" +
43 params["batch_size"] + "/" + params["total_batches"] + 44 params["batch_size"] + "/" + params["total_batches"] +
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) { 109 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) {
109 prerender::ConfigurePrerender(parsed_command_line); 110 prerender::ConfigurePrerender(parsed_command_line);
110 SetupStunProbeTrial(); 111 SetupStunProbeTrial();
111 #if defined(OS_WIN) 112 #if defined(OS_WIN)
112 SetupStabilityDebugging(); 113 SetupStabilityDebugging();
113 #endif // defined(OS_WIN) 114 #endif // defined(OS_WIN)
114 } 115 }
115 116
116 } // namespace chrome 117 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698