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

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

Issue 2355453002: [NoStatePrefetch] Support only GET and HEAD (Closed)
Patch Set: Review comments Created 4 years, 3 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/prerender/prerender_manager.cc
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 10887f9b63b0f5129c56d99a44eed3dfc98d06c1..0bef9677fda88bd210375ebcdf627384db315232 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -75,15 +75,6 @@ namespace {
// Time interval at which periodic cleanups are performed.
const int kPeriodicCleanupIntervalMs = 1000;
-// Valid HTTP methods for prerendering.
-const char* const kValidHttpMethods[] = {
- "GET",
- "HEAD",
- "OPTIONS",
- "POST",
- "TRACE",
-};
-
// Length of prerender history, for display in chrome://net-internals
const int kHistoryLength = 100;
@@ -707,19 +698,6 @@ bool PrerenderManager::HasRecentlyBeenNavigatedTo(Origin origin,
}
// static
-bool PrerenderManager::IsValidHttpMethod(const std::string& method) {
- // method has been canonicalized to upper case at this point so we can just
- // compare them.
- DCHECK_EQ(method, base::ToUpperASCII(method));
- for (size_t i = 0; i < arraysize(kValidHttpMethods); ++i) {
- if (method.compare(kValidHttpMethods[i]) == 0)
- return true;
- }
-
- return false;
-}
-
-// static
bool PrerenderManager::DoesURLHaveValidScheme(const GURL& url) {
return (url.SchemeIsHTTPOrHTTPS() ||
url.SchemeIs(extensions::kExtensionScheme) ||

Powered by Google App Engine
This is Rietveld 408576698