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

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

Issue 23064011: Consolidate scheme checks into an easy GURL method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
Index: chrome/browser/net/predictor.cc
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 48239100b5ea65e8b81c72772bea5e235509412d..dc1ce69fec345ad2bc28b17c2224e5ac83b9d9bd 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -466,7 +466,7 @@ UrlList Predictor::GetPredictedUrlListAtStartup(
GURL gurl = tab_start_pref.urls[i];
if (!gurl.is_valid() || gurl.SchemeIsFile() || gurl.host().empty())
continue;
- if (gurl.SchemeIs("http") || gurl.SchemeIs("https"))
+ if (gurl.SchemeIsHttp())
urls.push_back(gurl.GetWithEmptyPath());
}
}
@@ -1300,7 +1300,7 @@ void Predictor::InitialObserver::Append(const GURL& url,
if (kStartupResolutionCount <= first_navigations_.size())
return;
- DCHECK(url.SchemeIs("http") || url.SchemeIs("https"));
+ DCHECK(url.SchemeIsHttp());
DCHECK_EQ(url, Predictor::CanonicalizeUrl(url));
if (first_navigations_.find(url) == first_navigations_.end())
first_navigations_[url] = base::TimeTicks::Now();

Powered by Google App Engine
This is Rietveld 408576698