| 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 "extensions/browser/error_map.h" | 5 #include "extensions/browser/error_map.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" |
| 10 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 11 | 12 |
| 12 namespace extensions { | 13 namespace extensions { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // The maximum number of errors to be stored per extension. | 17 // The maximum number of errors to be stored per extension. |
| 17 const size_t kMaxErrorsPerExtension = 100; | 18 const size_t kMaxErrorsPerExtension = 100; |
| 18 | 19 |
| 19 base::LazyInstance<ErrorList> g_empty_error_list = LAZY_INSTANCE_INITIALIZER; | 20 base::LazyInstance<ErrorList> g_empty_error_list = LAZY_INSTANCE_INITIALIZER; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 205 } |
| 205 } | 206 } |
| 206 | 207 |
| 207 void ErrorMap::RemoveAllErrors() { | 208 void ErrorMap::RemoveAllErrors() { |
| 208 for (EntryMap::iterator iter = map_.begin(); iter != map_.end(); ++iter) | 209 for (EntryMap::iterator iter = map_.begin(); iter != map_.end(); ++iter) |
| 209 delete iter->second; | 210 delete iter->second; |
| 210 map_.clear(); | 211 map_.clear(); |
| 211 } | 212 } |
| 212 | 213 |
| 213 } // namespace extensions | 214 } // namespace extensions |
| OLD | NEW |