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

Unified Diff: base/memory/scoped_vector.h

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: base/memory/scoped_vector.h
diff --git a/base/memory/scoped_vector.h b/base/memory/scoped_vector.h
index 1b30f635ca11128f50333ede00deddd462082d69..173ea5a1d63d1ac793730a4cfdce665016a52f8b 100644
--- a/base/memory/scoped_vector.h
+++ b/base/memory/scoped_vector.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
#include "base/move.h"
#include "base/stl_util.h"
@@ -64,6 +65,7 @@ class ScopedVector {
reference back() { return v_.back(); }
void push_back(T* elem) { v_.push_back(elem); }
+ void push_back(scoped_ptr<T> elem) { v_.push_back(elem.release()); }
void pop_back() {
DCHECK(!empty());

Powered by Google App Engine
This is Rietveld 408576698