OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" | 5 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" |
6 | 6 |
7 #include "platform/blob/BlobData.h" | 7 #include "platform/blob/BlobData.h" |
8 #include "platform/weborigin/KURL.h" | 8 #include "platform/weborigin/KURL.h" |
9 #include "platform/wtf/RefCounted.h" | 9 #include "platform/wtf/RefCounted.h" |
10 #include "public/platform/WebHTTPHeaderVisitor.h" | 10 #include "public/platform/WebHTTPHeaderVisitor.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void WebServiceWorkerRequest::SetMethod(const WebString& method) { | 62 void WebServiceWorkerRequest::SetMethod(const WebString& method) { |
63 private_->method_ = method; | 63 private_->method_ = method; |
64 } | 64 } |
65 | 65 |
66 const WebString& WebServiceWorkerRequest::Method() const { | 66 const WebString& WebServiceWorkerRequest::Method() const { |
67 return private_->method_; | 67 return private_->method_; |
68 } | 68 } |
69 | 69 |
70 void WebServiceWorkerRequest::SetHeader(const WebString& key, | 70 void WebServiceWorkerRequest::SetHeader(const WebString& key, |
71 const WebString& value) { | 71 const WebString& value) { |
72 if (EqualIgnoringCase(key, "referer")) | 72 if (DeprecatedEqualIgnoringCase(key, "referer")) |
73 return; | 73 return; |
74 private_->headers_.Set(key, value); | 74 private_->headers_.Set(key, value); |
75 } | 75 } |
76 | 76 |
77 void WebServiceWorkerRequest::AppendHeader(const WebString& key, | 77 void WebServiceWorkerRequest::AppendHeader(const WebString& key, |
78 const WebString& value) { | 78 const WebString& value) { |
79 if (EqualIgnoringCase(key, "referer")) | 79 if (DeprecatedEqualIgnoringCase(key, "referer")) |
80 return; | 80 return; |
81 HTTPHeaderMap::AddResult result = private_->headers_.Add(key, value); | 81 HTTPHeaderMap::AddResult result = private_->headers_.Add(key, value); |
82 if (!result.is_new_entry) | 82 if (!result.is_new_entry) |
83 result.stored_value->value = | 83 result.stored_value->value = |
84 result.stored_value->value + ", " + String(value); | 84 result.stored_value->value + ", " + String(value); |
85 } | 85 } |
86 | 86 |
87 void WebServiceWorkerRequest::VisitHTTPHeaderFields( | 87 void WebServiceWorkerRequest::VisitHTTPHeaderFields( |
88 WebHTTPHeaderVisitor* header_visitor) const { | 88 WebHTTPHeaderVisitor* header_visitor) const { |
89 for (HTTPHeaderMap::const_iterator i = private_->headers_.begin(), | 89 for (HTTPHeaderMap::const_iterator i = private_->headers_.begin(), |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 void WebServiceWorkerRequest::SetIsReload(bool is_reload) { | 193 void WebServiceWorkerRequest::SetIsReload(bool is_reload) { |
194 private_->is_reload_ = is_reload; | 194 private_->is_reload_ = is_reload; |
195 } | 195 } |
196 | 196 |
197 bool WebServiceWorkerRequest::IsReload() const { | 197 bool WebServiceWorkerRequest::IsReload() const { |
198 return private_->is_reload_; | 198 return private_->is_reload_; |
199 } | 199 } |
200 | 200 |
201 } // namespace blink | 201 } // namespace blink |
OLD | NEW |