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

Unified Diff: base/stl_util.h

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | cc/surfaces/surface.h » ('j') | cc/surfaces/surface.h » ('J')
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 e937d2f3ed9157d433cc62fb71958bd9c71cd6d9..c95af82aaf635e6dcaa8b90e833c2b0022c135c1 100644
--- a/base/stl_util.h
+++ b/base/stl_util.h
@@ -211,6 +211,11 @@ bool ContainsValue(const Collection& collection, const Value& value) {
collection.end();
}
+template <typename Collection, typename Value>
+bool RemoveValue(Collection& collection, const Value& value) {
+ collection.erase(std::remove(collection.begin(), collection.end(), value), collection.end());
+}
+
namespace base {
// Returns true if the container is sorted.
« no previous file with comments | « no previous file | cc/surfaces/surface.h » ('j') | cc/surfaces/surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698