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

Unified Diff: net/url_request/url_request.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index d7203a477f148237cc9bffe54833d4dbbe80c37d..8777c06d569d68761618e294540abdf825db2ab0 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -12,7 +12,6 @@
#include "base/lazy_instance.h"
#include "base/memory/singleton.h"
#include "base/message_loop/message_loop.h"
-#include "base/metrics/stats_counters.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -470,26 +469,6 @@ void URLRequest::set_method(const std::string& method) {
method_ = method;
}
-// static
-std::string URLRequest::ComputeMethodForRedirect(
- const std::string& method,
- int http_status_code) {
- // For 303 redirects, all request methods except HEAD are converted to GET,
- // as per the latest httpbis draft. The draft also allows POST requests to
- // be converted to GETs when following 301/302 redirects, for historical
- // reasons. Most major browsers do this and so shall we. Both RFC 2616 and
- // the httpbis draft say to prompt the user to confirm the generation of new
- // requests, other than GET and HEAD requests, but IE omits these prompts and
- // so shall we.
- // See: https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.3
- if ((http_status_code == 303 && method != "HEAD") ||
- ((http_status_code == 301 || http_status_code == 302) &&
- method == "POST")) {
- return "GET";
- }
- return method;
-}
-
void URLRequest::SetReferrer(const std::string& referrer) {
DCHECK(!is_pending_);
GURL referrer_url(referrer);
@@ -573,8 +552,6 @@ URLRequest::URLRequest(const GURL& url,
creation_time_(base::TimeTicks::Now()),
notified_before_network_start_(false),
cookie_store_(cookie_store ? cookie_store : context->cookie_store()) {
- SIMPLE_STATS_COUNTER("URLRequestCount");
-
// Sanity check out environment.
DCHECK(base::MessageLoop::current())
<< "The current base::MessageLoop must exist";
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698