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

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: git try works all platforms now. 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..cbb7d0ba6fb03c41ff133dcb9ef3790b5e387b5c 100644
--- a/base/scoped_vector.h
+++ b/base/scoped_vector.h
@@ -54,6 +54,10 @@ class ScopedVector {
}
void reset() { STLDeleteElements(&v); }
+ void reset(const std::vector<T*>& vec) {
James Hawkins 2011/03/16 22:39:35 You're essentially adding operator= by another nam
Sheridan Rawlins 2011/03/18 15:45:48 Ok, discussing alternative as you know on chromium
Sheridan Rawlins 2011/03/20 08:13:11 I'd like to tackle the idea of moving ScopedVector
+ reset();
+ v = vec;
+ }
stuartmorgan 2011/03/16 23:25:20 I don't feel comfortable being the reviewer for ad
Sheridan Rawlins 2011/03/18 15:45:48 This may be moot if I take alternative. o/w I'll
Sheridan Rawlins 2011/03/20 08:13:11 Nico seems to have some commits in base/scoped_vec
void reserve(size_t capacity) { v.reserve(capacity); }
void resize(size_t new_size) { v.resize(new_size); }
« 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