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

Unified Diff: chrome/browser/prerender/prerender_manager.cc

Issue 2697513009: Enable forced prerenders on wifi (Closed)
Patch Set: Created 3 years, 10 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/prerender/prerender_manager.h ('k') | chrome/browser/prerender/prerender_origin.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.cc
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 36a6dbaeb02d33f38c7cb1a5c9634dcb63c5e0ca..3762794deeb9d1f1ae98b27676b649ddf1eed6f9 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -105,7 +105,7 @@ bool AreExtraHeadersCompatibleWithPrerenderContents(
// opposed to a performance optimization.
bool IsPrerenderingForced(Origin origin) {
return origin == ORIGIN_OFFLINE ||
- origin == ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR;
+ origin == ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER;
}
} // namespace
@@ -277,16 +277,13 @@ PrerenderManager::AddPrerenderFromExternalRequest(
}
std::unique_ptr<PrerenderHandle>
-PrerenderManager::AddPrerenderOnCellularFromExternalRequest(
+PrerenderManager::AddForcedPrerenderFromExternalRequest(
const GURL& url,
const content::Referrer& referrer,
SessionStorageNamespace* session_storage_namespace,
const gfx::Rect& bounds) {
- return AddPrerender(ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR,
- url,
- referrer,
- bounds,
- session_storage_namespace);
+ return AddPrerender(ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER, url, referrer,
+ bounds, session_storage_namespace);
}
std::unique_ptr<PrerenderHandle> PrerenderManager::AddPrerenderForInstant(
@@ -1341,7 +1338,7 @@ void PrerenderManager::RecordNetworkBytes(Origin origin,
bool PrerenderManager::IsPrerenderSilenceExperiment(Origin origin) const {
if (origin == ORIGIN_OFFLINE ||
- origin == ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR) {
+ origin == ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER) {
return false;
}
@@ -1399,7 +1396,7 @@ NetworkPredictionStatus PrerenderManager::GetPredictionStatusForOrigin(
// the DISABLED_ALWAYS selected via privacy settings.
NetworkPredictionStatus prediction_status =
chrome_browser_net::CanPrefetchAndPrerenderUI(profile_->GetPrefs());
- if (origin == ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR &&
+ if (origin == ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER &&
prediction_status == NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK) {
return NetworkPredictionStatus::ENABLED;
}
« no previous file with comments | « chrome/browser/prerender/prerender_manager.h ('k') | chrome/browser/prerender/prerender_origin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698