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

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

Issue 2038463004: Remove references to network_hints::UrlList and network_hints::NameList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 496644fcd79c8616f3abaa400a0f93918d95f7c1..727d8eea21048eb82859ff64a90221958894b87a 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -160,7 +160,7 @@ void Predictor::InitNetworkPredictor(PrefService* user_prefs,
url_request_context_getter_ = getter;
// Gather the list of hostnames to prefetch on startup.
- UrlList urls = GetPredictedUrlListAtStartup(user_prefs);
+ std::vector<GURL> urls = GetPredictedUrlListAtStartup(user_prefs);
base::ListValue* referral_list =
static_cast<base::ListValue*>(user_prefs->GetList(
@@ -276,9 +276,10 @@ void Predictor::PreconnectUrlAndSubresources(const GURL& url,
PredictFrameSubresources(url.GetWithEmptyPath(), first_party_for_cookies);
}
-UrlList Predictor::GetPredictedUrlListAtStartup(PrefService* user_prefs) {
+std::vector<GURL> Predictor::GetPredictedUrlListAtStartup(
+ PrefService* user_prefs) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- UrlList urls;
+ std::vector<GURL> urls;
// Recall list of URLs we learned about during last session.
// This may catch secondary hostnames, pulled in by the homepages. It will
// also catch more of the "primary" home pages, since that was (presumably)
@@ -398,11 +399,12 @@ void Predictor::DiscardAllResults() {
}
// Overloaded Resolve() to take a vector of names.
-void Predictor::ResolveList(const UrlList& urls,
+void Predictor::ResolveList(const std::vector<GURL>& urls,
UrlInfo::ResolutionMotivation motivation) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- for (UrlList::const_iterator it = urls.begin(); it < urls.end(); ++it) {
+ for (std::vector<GURL>::const_iterator it = urls.begin(); it < urls.end();
+ ++it) {
AppendToResolutionQueue(*it, motivation);
}
}
@@ -643,7 +645,7 @@ void Predictor::DiscardInitialNavigationHistory() {
}
void Predictor::FinalizeInitializationOnIOThread(
- const UrlList& startup_urls,
+ const std::vector<GURL>& startup_urls,
base::ListValue* referral_list,
IOThread* io_thread,
ProfileIOData* profile_io_data) {
@@ -691,13 +693,12 @@ void Predictor::LearnAboutInitialNavigation(const GURL& url) {
// It is called from an IPC message originating in the renderer. It currently
// includes both Page-Scan, and Link-Hover prefetching.
// TODO(jar): Separate out link-hover prefetching, and page-scan results.
-void Predictor::DnsPrefetchList(const NameList& hostnames) {
+void Predictor::DnsPrefetchList(const std::vector<std::string>& hostnames) {
// TODO(jar): Push GURL transport further back into renderer, but this will
// require a Webkit change in the observer :-/.
- UrlList urls;
- for (NameList::const_iterator it = hostnames.begin();
- it < hostnames.end();
- ++it) {
+ std::vector<GURL> urls;
+ for (std::vector<std::string>::const_iterator it = hostnames.begin();
+ it < hostnames.end(); ++it) {
urls.push_back(GURL("http://" + *it + ":80"));
}
@@ -706,7 +707,7 @@ void Predictor::DnsPrefetchList(const NameList& hostnames) {
}
void Predictor::DnsPrefetchMotivatedList(
- const UrlList& urls,
+ const std::vector<GURL>& urls,
UrlInfo::ResolutionMotivation motivation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/predictor_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698