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

Unified Diff: chrome/browser/chromeos/contacts/contact_test_util.cc

Issue 10829144: contacts: Add GoogleContactStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix leaked contacts in GoogleContactStore::MergeContacts() Created 8 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
Index: chrome/browser/chromeos/contacts/contact_test_util.cc
diff --git a/chrome/browser/chromeos/contacts/contact_test_util.cc b/chrome/browser/chromeos/contacts/contact_test_util.cc
index a7186fb518247b5aeb358189d3cdfb214cc88a5f..9a1ceae7f6d0ae43dd3723191db6327add075776 100644
--- a/chrome/browser/chromeos/contacts/contact_test_util.cc
+++ b/chrome/browser/chromeos/contacts/contact_test_util.cc
@@ -138,11 +138,8 @@ void CopyContacts(const ContactPointers& source,
ScopedVector<Contact>* dest) {
DCHECK(dest);
dest->clear();
- for (size_t i = 0; i < source.size(); ++i) {
- Contact* contact = new Contact;
- *contact = *source[i];
- dest->push_back(contact);
- }
+ for (size_t i = 0; i < source.size(); ++i)
+ dest->push_back(new Contact(*source[i]));
}
void CopyContacts(const ScopedVector<Contact>& source,
« no previous file with comments | « chrome/browser/chromeos/contacts/contact_store_observer.h ('k') | chrome/browser/chromeos/contacts/google_contact_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698