| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/text/AtomicString.h" | 34 #include "wtf/text/AtomicString.h" |
| 35 #include "wtf/text/AtomicStringHash.h" | 35 #include "wtf/text/AtomicStringHash.h" |
| 36 #include "wtf/text/StringHash.h" | 36 #include "wtf/text/StringHash.h" |
| 37 #include <memory> | 37 #include <memory> |
| 38 #include <utility> | 38 #include <utility> |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 typedef Vector<std::pair<String, String>> CrossThreadHTTPHeaderMapData; | 42 typedef Vector<std::pair<String, String>> CrossThreadHTTPHeaderMapData; |
| 43 | 43 |
| 44 // FIXME: Not every header fits into a map. Notably, multiple Set-Cookie header
fields are needed to set multiple cookies. | 44 // FIXME: Not every header fits into a map. Notably, multiple Set-Cookie header |
| 45 // fields are needed to set multiple cookies. |
| 45 class PLATFORM_EXPORT HTTPHeaderMap final { | 46 class PLATFORM_EXPORT HTTPHeaderMap final { |
| 46 DISALLOW_NEW(); | 47 DISALLOW_NEW(); |
| 47 | 48 |
| 48 public: | 49 public: |
| 49 HTTPHeaderMap(); | 50 HTTPHeaderMap(); |
| 50 ~HTTPHeaderMap(); | 51 ~HTTPHeaderMap(); |
| 51 | 52 |
| 52 // Gets a copy of the data suitable for passing to another thread. | 53 // Gets a copy of the data suitable for passing to another thread. |
| 53 std::unique_ptr<CrossThreadHTTPHeaderMapData> copyData() const; | 54 std::unique_ptr<CrossThreadHTTPHeaderMapData> copyData() const; |
| 54 | 55 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 return m_headers == rhs.m_headers; | 82 return m_headers == rhs.m_headers; |
| 82 } | 83 } |
| 83 | 84 |
| 84 private: | 85 private: |
| 85 HashMap<AtomicString, AtomicString, CaseFoldingHash> m_headers; | 86 HashMap<AtomicString, AtomicString, CaseFoldingHash> m_headers; |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace blink | 89 } // namespace blink |
| 89 | 90 |
| 90 #endif // HTTPHeaderMap_h | 91 #endif // HTTPHeaderMap_h |
| OLD | NEW |