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

Unified Diff: base/scoped_vector.h

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ~ListPopulator ordering. Created 9 years, 9 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/scoped_vector.h
diff --git a/base/scoped_vector.h b/base/scoped_vector.h
index 9d372f33009b613de3584fe12bd69cbface5b391..bb1ab57aebacfd754c44a1735c889b49440e4f91 100644
--- a/base/scoped_vector.h
+++ b/base/scoped_vector.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,6 +62,12 @@ class ScopedVector {
return v.insert(position, x);
}
+ // Lets the ScopedVector take ownership of elements in [first,last).
+ template<typename InputIterator>
+ void insert(iterator position, InputIterator first, InputIterator last) {
+ v.insert(position, first, last);
+ }
+
iterator erase(iterator position) {
delete *position;
return v.erase(position);
« no previous file with comments | « base/base.gyp ('k') | base/scoped_vector_unittest.cc » ('j') | base/scoped_vector_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698