| Index: content/common/dom_storage/dom_storage_map.cc
|
| diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
|
| index de33a52e89ac4db83c0b2401509729fba56d9f19..fc4ef0651b0a38e1a6d0c9d477b368652cb54089 100644
|
| --- a/content/common/dom_storage/dom_storage_map.cc
|
| +++ b/content/common/dom_storage/dom_storage_map.cc
|
| @@ -14,17 +14,6 @@ size_t size_of_item(const base::string16& key, const base::string16& value) {
|
| return (key.length() + value.length()) * sizeof(base::char16);
|
| }
|
|
|
| -size_t CountBytes(const DOMStorageValuesMap& values) {
|
| - if (values.size() == 0)
|
| - return 0;
|
| -
|
| - size_t count = 0;
|
| - DOMStorageValuesMap::const_iterator it = values.begin();
|
| - for (; it != values.end(); ++it)
|
| - count += size_of_item(it->first, it->second.string());
|
| - return count;
|
| -}
|
| -
|
| } // namespace
|
|
|
| DOMStorageMap::DOMStorageMap(size_t quota)
|
| @@ -119,4 +108,14 @@ void DOMStorageMap::ResetKeyIterator() {
|
| last_key_index_ = 0;
|
| }
|
|
|
| +size_t DOMStorageMap::CountBytes(const DOMStorageValuesMap& values) {
|
| + if (values.size() == 0)
|
| + return 0;
|
| +
|
| + size_t count = 0;
|
| + for (const auto& pair : values)
|
| + count += size_of_item(pair.first, pair.second.string());
|
| + return count;
|
| +}
|
| +
|
| } // namespace content
|
|
|