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

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: Merge to head. Extend trial cut-off date to July 23rd. 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
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/trials/http_throttling_trial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8a0d08e72032152cd7c1d5923063ba71e0b261d0 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/http_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.
+ CreateHttpThrottlingTrial(prefs);
}
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/trials/http_throttling_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698