Chromium Code Reviews| Index: net/base/linked_hash_map.h |
| diff --git a/net/base/linked_hash_map.h b/net/base/linked_hash_map.h |
| index 7948647df05913ae86de3eb3eaeacbb11fcf7967..b024ca1d5361d46f958051b096d668b61412ce6c 100644 |
| --- a/net/base/linked_hash_map.h |
| +++ b/net/base/linked_hash_map.h |
| @@ -79,6 +79,28 @@ class linked_hash_map { |
| return list_.rend(); |
| } |
| + // Front and back accessors common to many stl containers. |
| + |
| + // Returns the earliest-inserted element |
| + const value_type& front() const { |
|
ramant (doing other things)
2014/08/15 01:51:33
We are only using back(), added front() to be cons
|
| + return list_.front(); |
| + } |
| + |
| + // Returns the earliest-inserted element. |
| + value_type& front() { |
| + return list_.front(); |
| + } |
| + |
| + // Returns the most-recently-inserted element. |
| + const value_type& back() const { |
| + return list_.back(); |
| + } |
| + |
| + // Returns the most-recently-inserted element. |
| + value_type& back() { |
| + return list_.back(); |
| + } |
| + |
| // Clears the map of all values. |
| void clear() { |
| map_.clear(); |