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 "config.h" | 5 #include "config.h" |
6 #include "FetchHeaderList.h" | 6 #include "FetchHeaderList.h" |
7 | 7 |
8 #include "core/fetch/CrossOriginAccessControl.h" | 8 #include "core/fetch/CrossOriginAccessControl.h" |
9 #include "core/xml/XMLHttpRequest.h" | 9 #include "core/xml/XMLHttpRequest.h" |
10 #include "platform/network/HTTPParsers.h" | 10 #include "platform/network/HTTPParsers.h" |
11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
12 | 12 |
13 namespace WebCore { | 13 namespace WebCore { |
14 | 14 |
15 PassRefPtr<FetchHeaderList> FetchHeaderList::create() | 15 PassRefPtrWillBeRawPtr<FetchHeaderList> FetchHeaderList::create() |
16 { | 16 { |
17 return adoptRef(new FetchHeaderList()); | 17 return adoptRefWillBeNoop(new FetchHeaderList()); |
18 } | 18 } |
19 | 19 |
20 PassRefPtr<FetchHeaderList> FetchHeaderList::createCopy() | 20 PassRefPtrWillBeRawPtr<FetchHeaderList> FetchHeaderList::createCopy() |
21 { | 21 { |
22 RefPtr<FetchHeaderList> list(create()); | 22 RefPtrWillBeRawPtr<FetchHeaderList> list(create()); |
23 for (size_t i = 0; i < m_headerList.size(); ++i) | 23 for (size_t i = 0; i < m_headerList.size(); ++i) |
24 list->append(m_headerList[i]->first, m_headerList[i]->second); | 24 list->append(m_headerList[i]->first, m_headerList[i]->second); |
25 return list.release(); | 25 return list.release(); |
26 } | 26 } |
27 | 27 |
28 FetchHeaderList::FetchHeaderList() | 28 FetchHeaderList::FetchHeaderList() |
29 { | 29 { |
30 } | 30 } |
31 | 31 |
32 FetchHeaderList::~FetchHeaderList() | 32 FetchHeaderList::~FetchHeaderList() |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 bool FetchHeaderList::isForbiddenResponseHeaderName(const String& name) | 173 bool FetchHeaderList::isForbiddenResponseHeaderName(const String& name) |
174 { | 174 { |
175 // "A forbidden response header name is a header name that is one of: | 175 // "A forbidden response header name is a header name that is one of: |
176 // `Set-Cookie`, `Set-Cookie2`" | 176 // `Set-Cookie`, `Set-Cookie2`" |
177 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set
-cookie2"); | 177 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set
-cookie2"); |
178 } | 178 } |
179 | 179 |
180 } // namespace WebCore | 180 } // namespace WebCore |
OLD | NEW |