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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 6216004: Feature to disable field trials in old versions of Chromium. Field trials... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 #if defined(OS_POSIX) 299 #if defined(OS_POSIX)
300 suicide_on_channel_error_filter_ = new SuicideOnChannelErrorFilter; 300 suicide_on_channel_error_filter_ = new SuicideOnChannelErrorFilter;
301 AddFilter(suicide_on_channel_error_filter_.get()); 301 AddFilter(suicide_on_channel_error_filter_.get());
302 #endif 302 #endif
303 303
304 // Establish a channel to the GPU process asynchronously if requested. If the 304 // Establish a channel to the GPU process asynchronously if requested. If the
305 // channel is established in time, EstablishGpuChannelSync will not block when 305 // channel is established in time, EstablishGpuChannelSync will not block when
306 // it is later called. Delays by a fixed period of time to avoid loading the 306 // it is later called. Delays by a fixed period of time to avoid loading the
307 // GPU immediately in an attempt to not slow startup time. 307 // GPU immediately in an attempt to not slow startup time.
308 // After June 30, 2011 builds, it will always be in defaut group.
308 scoped_refptr<base::FieldTrial> prelaunch_trial( 309 scoped_refptr<base::FieldTrial> prelaunch_trial(
309 new base::FieldTrial("PrelaunchGpuProcessExperiment", 100)); 310 new base::FieldTrial("PrelaunchGpuProcessExperiment", 100,
311 "default_prelaunch_gpu_process", 2011, 6, 30));
jar (doing other things) 2011/01/15 20:52:47 nit: better may be to add "_default" as a postfix
310 int prelaunch_group = prelaunch_trial->AppendGroup("prelaunch_gpu_process", 312 int prelaunch_group = prelaunch_trial->AppendGroup("prelaunch_gpu_process",
311 kPrelauchGpuPercentage); 313 kPrelauchGpuPercentage);
312 if (prelaunch_group == prelaunch_trial->group() || 314 if (prelaunch_group == prelaunch_trial->group() ||
313 CommandLine::ForCurrentProcess()->HasSwitch( 315 CommandLine::ForCurrentProcess()->HasSwitch(
314 switches::kPrelaunchGpuProcess)) { 316 switches::kPrelaunchGpuProcess)) {
315 message_loop()->PostDelayedTask(FROM_HERE, 317 message_loop()->PostDelayedTask(FROM_HERE,
316 task_factory_->NewRunnableMethod( 318 task_factory_->NewRunnableMethod(
317 &RenderThread::EstablishGpuChannel), 319 &RenderThread::EstablishGpuChannel),
318 kPrelauchGpuProcessDelayMS); 320 kPrelauchGpuProcessDelayMS);
319 } 321 }
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 } 1145 }
1144 1146
1145 return false; 1147 return false;
1146 } 1148 }
1147 1149
1148 void RenderThread::RegisterExtension(v8::Extension* extension, 1150 void RenderThread::RegisterExtension(v8::Extension* extension,
1149 bool restrict_to_extensions) { 1151 bool restrict_to_extensions) {
1150 WebScriptController::registerExtension(extension); 1152 WebScriptController::registerExtension(extension);
1151 v8_extensions_[extension->name()] = restrict_to_extensions; 1153 v8_extensions_[extension->name()] = restrict_to_extensions;
1152 } 1154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698