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

Unified Diff: chrome/browser/net/net_pref_observer.cc

Issue 7027040: Implement A/B experiment for anti-DDoS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/net_pref_observer.cc
diff --git a/chrome/browser/net/net_pref_observer.cc b/chrome/browser/net/net_pref_observer.cc
index b125daebe2cc394e864555f09f84fac00279e620..af1e3bfb6c1ae549774d126e2de68c08b55100bb 100644
--- a/chrome/browser/net/net_pref_observer.cc
+++ b/chrome/browser/net/net_pref_observer.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/trials/throttling_trial.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_type.h"
@@ -80,4 +81,11 @@ void NetPrefObserver::RegisterPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kHttpThrottlingEnabled,
false,
PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kHttpThrottlingMayExperiment,
+ true,
+ PrefService::UNSYNCABLE_PREF);
+
+ // This is the earliest point at which we can set up the trial, as
+ // it relies on prefs for parameterization.
+ throttling_trial::CreateTrial(prefs);
}

Powered by Google App Engine
This is Rietveld 408576698