Index: net/url_request/url_request.cc |
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
index ad399b9ea081c51ed85b81c790be9b1215964550..c278761f6da28af4ce86b306b69887ce37c55c54 100644 |
--- a/net/url_request/url_request.cc |
+++ b/net/url_request/url_request.cc |
@@ -463,11 +463,21 @@ void URLRequest::set_first_party_url_policy( |
first_party_url_policy_ = first_party_url_policy; |
} |
+void URLRequest::set_initiator(const url::Origin& initiator) { |
+ DCHECK(!is_pending_); |
+ initiator_ = initiator; |
+} |
+ |
void URLRequest::set_method(const std::string& method) { |
DCHECK(!is_pending_); |
method_ = method; |
} |
+bool URLRequest::IsMethodSafe() const { |
+ return method_ == "GET" || method_ == "HEAD" || method_ == "OPTIONS" || |
+ method_ == "TRACE"; |
+} |
+ |
void URLRequest::SetReferrer(const std::string& referrer) { |
DCHECK(!is_pending_); |
GURL referrer_url(referrer); |