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

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

Issue 7605019: Reduce number of unnamed-type-template-args violations. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/net/predictor.h ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
===================================================================
--- chrome/browser/net/predictor.cc (revision 98481)
+++ chrome/browser/net/predictor.cc (working copy)
@@ -29,10 +29,9 @@
namespace chrome_browser_net {
// static
+const int Predictor::kPredictorReferrerVersion = 2;
const double Predictor::kPreconnectWorthyExpectedValue = 0.8;
-// static
const double Predictor::kDNSPreresolutionWorthyExpectedValue = 0.1;
-// static
const double Predictor::kDiscardableExpectedValue = 0.05;
// The goal is of trimming is to to reduce the importance (number of expected
// subresources needed) by a factor of 2 after about 24 hours of uptime. We will
@@ -45,13 +44,9 @@
// system that uses a higher trim ratio when the list is large.
// static
const double Predictor::kReferrerTrimRatio = 0.97153;
-
-// static
const TimeDelta Predictor::kDurationBetweenTrimmings = TimeDelta::FromHours(1);
-// static
const TimeDelta Predictor::kDurationBetweenTrimmingIncrements =
TimeDelta::FromSeconds(15);
-// static
const size_t Predictor::kUrlsTrimmedPerIncrement = 5u;
class Predictor::LookupRequest {
@@ -606,7 +601,7 @@
void Predictor::SerializeReferrers(ListValue* referral_list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
referral_list->Clear();
- referral_list->Append(new base::FundamentalValue(PREDICTOR_REFERRER_VERSION));
+ referral_list->Append(new base::FundamentalValue(kPredictorReferrerVersion));
for (Referrers::const_iterator it = referrers_.begin();
it != referrers_.end(); ++it) {
// Serialize the list of subresource names.
@@ -626,7 +621,7 @@
int format_version = -1;
if (referral_list.GetSize() > 0 &&
referral_list.GetInteger(0, &format_version) &&
- format_version == PREDICTOR_REFERRER_VERSION) {
+ format_version == kPredictorReferrerVersion) {
for (size_t i = 1; i < referral_list.GetSize(); ++i) {
ListValue* motivator;
if (!referral_list.GetList(i, &motivator)) {
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698