Bug 1281505 - Only enable predictor prefetch by default on nightly. r=mayhemer

MozReview-Commit-ID: 3IPYGooiUSx
This commit is contained in:
Nicholas Hurley 2016-06-22 09:10:34 -07:00
parent 1a695a53a7
commit 692067a4d1
2 changed files with 12 additions and 0 deletions

View File

@ -1826,7 +1826,11 @@ pref("network.prefetch-next", true);
// enables the predictive service
pref("network.predictor.enabled", true);
pref("network.predictor.enable-hover-on-ssl", false);
#ifdef NIGHTLY_BUILD
pref("network.predictor.enable-prefetch", true);
#else
pref("network.predictor.enable-prefetch", false);
#endif
pref("network.predictor.page-degradation.day", 0);
pref("network.predictor.page-degradation.week", 5);
pref("network.predictor.page-degradation.month", 10);

View File

@ -337,7 +337,11 @@ Predictor::Predictor()
:mInitialized(false)
,mEnabled(true)
,mEnableHoverOnSSL(false)
#ifdef NIGHTLY_BUILD
,mEnablePrefetch(true)
#else
,mEnablePrefetch(false)
#endif
,mPageDegradationDay(PREDICTOR_PAGE_DELTA_DAY_DEFAULT)
,mPageDegradationWeek(PREDICTOR_PAGE_DELTA_WEEK_DEFAULT)
,mPageDegradationMonth(PREDICTOR_PAGE_DELTA_MONTH_DEFAULT)
@ -396,7 +400,11 @@ Predictor::InstallObserver()
Preferences::AddBoolVarCache(&mEnabled, PREDICTOR_ENABLED_PREF, true);
Preferences::AddBoolVarCache(&mEnableHoverOnSSL,
PREDICTOR_SSL_HOVER_PREF, false);
#ifdef NIGHTLY_BUILD
Preferences::AddBoolVarCache(&mEnablePrefetch, PREDICTOR_PREFETCH_PREF, true);
#else
Preferences::AddBoolVarCache(&mEnablePrefetch, PREDICTOR_PREFETCH_PREF, false);
#endif
Preferences::AddIntVarCache(&mPageDegradationDay,
PREDICTOR_PAGE_DELTA_DAY_PREF,
PREDICTOR_PAGE_DELTA_DAY_DEFAULT);