| 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 "net/spdy/hpack/hpack_header_table.h" | 5 #include "net/spdy/hpack/hpack_header_table.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/spdy/hpack/hpack_constants.h" | 10 #include "net/spdy/hpack/hpack_constants.h" |
| 11 #include "net/spdy/hpack/hpack_static_table.h" | 11 #include "net/spdy/hpack/hpack_static_table.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 using base::StringPiece; | 15 using base::StringPiece; |
| 16 | 16 |
| 17 size_t HpackHeaderTable::EntryHasher::operator()( | 17 size_t HpackHeaderTable::EntryHasher::operator()( |
| 18 const HpackEntry* entry) const { | 18 const HpackEntry* entry) const { |
| 19 return BASE_HASH_NAMESPACE::hash<base::StringPiece>()(entry->name()) ^ | 19 return base::StringPieceHash()(entry->name()) ^ |
| 20 BASE_HASH_NAMESPACE::hash<base::StringPiece>()(entry->value()); | 20 base::StringPieceHash()(entry->value()); |
| 21 } | 21 } |
| 22 | 22 |
| 23 bool HpackHeaderTable::EntriesEq::operator()(const HpackEntry* lhs, | 23 bool HpackHeaderTable::EntriesEq::operator()(const HpackEntry* lhs, |
| 24 const HpackEntry* rhs) const { | 24 const HpackEntry* rhs) const { |
| 25 if (lhs == nullptr) { | 25 if (lhs == nullptr) { |
| 26 return rhs == nullptr; | 26 return rhs == nullptr; |
| 27 } | 27 } |
| 28 if (rhs == nullptr) { | 28 if (rhs == nullptr) { |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 for (const auto entry : dynamic_index_) { | 242 for (const auto entry : dynamic_index_) { |
| 243 DVLOG(2) << " " << entry->GetDebugString(); | 243 DVLOG(2) << " " << entry->GetDebugString(); |
| 244 } | 244 } |
| 245 DVLOG(2) << "Full Dynamic Name Index:"; | 245 DVLOG(2) << "Full Dynamic Name Index:"; |
| 246 for (const auto it : dynamic_name_index_) { | 246 for (const auto it : dynamic_name_index_) { |
| 247 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString(); | 247 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString(); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace net | 251 } // namespace net |
| OLD | NEW |