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

Unified Diff: base/stl_util.h

Issue 2221403002: base: Move all stl utilities to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stl_util.h
diff --git a/base/stl_util.h b/base/stl_util.h
index 12e226a9db9b106b95f9500efe684463d1ecd1f2..8882ac966ad5933461df13427de61ef416562489 100644
--- a/base/stl_util.h
+++ b/base/stl_util.h
@@ -15,6 +15,8 @@
#include "base/logging.h"
+namespace base {
+
// Clears internal memory of an STL object.
// STL clear()/reserve(0) does not always free internal memory allocated
// This function uses swap/destructor to ensure the internal memory is freed.
@@ -198,8 +200,6 @@ bool ContainsValue(const Collection& collection, const Value& value) {
collection.end();
}
-namespace base {
-
// Returns true if the container is sorted.
template <typename Container>
bool STLIsSorted(const Container& cont) {
@@ -259,4 +259,20 @@ bool STLIncludes(const Arg1& a1, const Arg2& a2) {
} // namespace base
+// TODO(skyostil): Remove these global aliases once all call sites have been
+// fixed.
+using base::ContainsKey;
+using base::ContainsValue;
+using base::STLClearObject;
+using base::STLCount;
+using base::STLDeleteContainerPairFirstPointers;
+using base::STLDeleteContainerPairPointers;
+using base::STLDeleteContainerPairSecondPointers;
+using base::STLDeleteContainerPointers;
+using base::STLDeleteElements;
+using base::STLDeleteValues;
+using base::STLElementDeleter;
+using base::STLValueDeleter;
+using base::string_as_array;
+
#endif // BASE_STL_UTIL_H_
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698