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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: No more static default group number Created 8 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 // Initialize statistical testing infrastructure. We set client_id to the 198 // Initialize statistical testing infrastructure. We set client_id to the
199 // empty string to disallow the renderer process from creating its own 199 // empty string to disallow the renderer process from creating its own
200 // one-time randomized trials; they should be created in the browser process. 200 // one-time randomized trials; they should be created in the browser process.
201 base::FieldTrialList field_trial(EmptyString()); 201 base::FieldTrialList field_trial(EmptyString());
202 // Ensure any field trials in browser are reflected into renderer. 202 // Ensure any field trials in browser are reflected into renderer.
203 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { 203 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) {
204 std::string persistent = parsed_command_line.GetSwitchValueASCII( 204 std::string persistent = parsed_command_line.GetSwitchValueASCII(
205 switches::kForceFieldTestNameAndValue); 205 switches::kForceFieldTestNameAndValue);
206 bool ret = field_trial.CreateTrialsInChildProcess(persistent); 206 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent);
207 DCHECK(ret); 207 DCHECK(ret);
208 } 208 }
209 209
210 // Load pepper plugins before engaging the sandbox. 210 // Load pepper plugins before engaging the sandbox.
211 PepperPluginRegistry::GetInstance(); 211 PepperPluginRegistry::GetInstance();
212 212
213 { 213 {
214 #if defined(OS_WIN) || defined(OS_MACOSX) 214 #if defined(OS_WIN) || defined(OS_MACOSX)
215 // TODO(markus): Check if it is OK to unconditionally move this 215 // TODO(markus): Check if it is OK to unconditionally move this
216 // instruction down. 216 // instruction down.
(...skipping 22 matching lines...) Expand all
239 #endif 239 #endif
240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
241 MessageLoop::current()->Run(); 241 MessageLoop::current()->Run();
242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
243 } 243 }
244 } 244 }
245 platform.PlatformUninitialize(); 245 platform.PlatformUninitialize();
246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 246 TRACE_EVENT_END_ETW("RendererMain", 0, "");
247 return 0; 247 return 0;
248 } 248 }
OLDNEW
« base/metrics/field_trial.cc ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698