Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: extensions/browser/error_map.cc

Issue 2236443003: extensions: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add braces Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/browser/content_verify_job.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 iter = list_.erase(iter); 126 iter = list_.erase(iter);
127 deleted = true; 127 deleted = true;
128 } else { 128 } else {
129 ++iter; 129 ++iter;
130 } 130 }
131 } 131 }
132 return deleted; 132 return deleted;
133 } 133 }
134 134
135 void ErrorMap::ExtensionEntry::DeleteAllErrors() { 135 void ErrorMap::ExtensionEntry::DeleteAllErrors() {
136 STLDeleteContainerPointers(list_.begin(), list_.end()); 136 base::STLDeleteContainerPointers(list_.begin(), list_.end());
137 list_.clear(); 137 list_.clear();
138 } 138 }
139 139
140 const ExtensionError* ErrorMap::ExtensionEntry::AddError( 140 const ExtensionError* ErrorMap::ExtensionEntry::AddError(
141 std::unique_ptr<ExtensionError> error) { 141 std::unique_ptr<ExtensionError> error) {
142 for (ErrorList::iterator iter = list_.begin(); iter != list_.end(); ++iter) { 142 for (ErrorList::iterator iter = list_.begin(); iter != list_.end(); ++iter) {
143 // If we find a duplicate error, remove the old error and add the new one, 143 // If we find a duplicate error, remove the old error and add the new one,
144 // incrementing the occurrence count of the error. We use the new error 144 // incrementing the occurrence count of the error. We use the new error
145 // for runtime errors, so we can link to the latest context, inspectable 145 // for runtime errors, so we can link to the latest context, inspectable
146 // view, etc. 146 // view, etc.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 void ErrorMap::RemoveAllErrors() { 211 void ErrorMap::RemoveAllErrors() {
212 for (EntryMap::iterator iter = map_.begin(); iter != map_.end(); ++iter) 212 for (EntryMap::iterator iter = map_.begin(); iter != map_.end(); ++iter)
213 delete iter->second; 213 delete iter->second;
214 map_.clear(); 214 map_.clear();
215 } 215 }
216 216
217 } // namespace extensions 217 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/content_verify_job.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698