| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void HTTPHeaderMap::adopt(PassOwnPtr<CrossThreadHTTPHeaderMapData> data) | 59 void HTTPHeaderMap::adopt(PassOwnPtr<CrossThreadHTTPHeaderMapData> data) |
| 60 { | 60 { |
| 61 clear(); | 61 clear(); |
| 62 size_t dataSize = data->size(); | 62 size_t dataSize = data->size(); |
| 63 for (size_t index = 0; index < dataSize; ++index) { | 63 for (size_t index = 0; index < dataSize; ++index) { |
| 64 pair<String, String>& header = (*data)[index]; | 64 pair<String, String>& header = (*data)[index]; |
| 65 set(AtomicString(header.first), AtomicString(header.second)); | 65 set(AtomicString(header.first), AtomicString(header.second)); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 AtomicString HTTPHeaderMap::get(const AtomicString& name) const | 69 const AtomicString& HTTPHeaderMap::get(const AtomicString& name) const |
| 70 { | 70 { |
| 71 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::get(name); | 71 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::get(name); |
| 72 } | 72 } |
| 73 | 73 |
| 74 HTTPHeaderMap::AddResult HTTPHeaderMap::add(const AtomicString& name, const Atom
icString& value) | 74 HTTPHeaderMap::AddResult HTTPHeaderMap::add(const AtomicString& name, const Atom
icString& value) |
| 75 { | 75 { |
| 76 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::add(name, value
); | 76 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::add(name, value
); |
| 77 } | 77 } |
| 78 | 78 |
| 79 // Adapter that allows the HashMap to take C strings as keys. | 79 // Adapter that allows the HashMap to take C strings as keys. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 106 { | 106 { |
| 107 return find<CaseFoldingCStringTranslator>(name) != end(); | 107 return find<CaseFoldingCStringTranslator>(name) != end(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 HTTPHeaderMap::AddResult HTTPHeaderMap::add(const char* name, const AtomicString
& value) | 110 HTTPHeaderMap::AddResult HTTPHeaderMap::add(const char* name, const AtomicString
& value) |
| 111 { | 111 { |
| 112 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::add<CaseFolding
CStringTranslator>(name, value); | 112 return HashMap<AtomicString, AtomicString, CaseFoldingHash>::add<CaseFolding
CStringTranslator>(name, value); |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace WebCore | 115 } // namespace WebCore |
| OLD | NEW |