summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 06:16:09 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 06:16:09 +0000
commitabb785b2625b7fd791e620548f617b1652883e0b (patch)
tree8e9c4b574eaa9d25fee4ae5237dce70ca284dcb6 /chrome
parent7442ee960f05e5f4d9515fc3f555b2e2f26861ac (diff)
downloadchromium_src-abb785b2625b7fd791e620548f617b1652883e0b.zip
chromium_src-abb785b2625b7fd791e620548f617b1652883e0b.tar.gz
chromium_src-abb785b2625b7fd791e620548f617b1652883e0b.tar.bz2
Throttle websocket live experiment
0.5% of users will participate websocket live experiment. BUG=28843 TEST=none Review URL: http://codereview.chromium.org/434110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc
index 26ba53e..1dfa3d6 100644
--- a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc
+++ b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h"
#include "base/compiler_specific.h"
+#include "base/field_trial.h"
#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/task.h"
@@ -99,6 +100,13 @@ static scoped_refptr<WebSocketExperimentRunner> runner;
/* static */
void WebSocketExperimentRunner::Start() {
DCHECK(!runner.get());
+
+ scoped_refptr<FieldTrial> trial = new FieldTrial("WebSocketExperiment", 1000);
+ trial->AppendGroup("_active", 5); // 0.5% in _active group.
+
+ if (trial->group() == FieldTrial::kNotParticipating)
+ return;
+
runner = new WebSocketExperimentRunner;
runner->Run();
}