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

Unified Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 6650014: Autofill extend profiles to include multi-valued fields, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: chrome/browser/autofill/autofill_manager_unittest.cc
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index e3d912bbbf1f5dd22dcf0105cef71cdc5496d341..ed23d54714d2dff060af5b28bc8dff0c1845e7c1 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -672,9 +672,10 @@ TEST_F(AutofillManagerTest, GetProfileSuggestionsWithDuplicates) {
FormsSeen(forms);
// Add a duplicate profile.
- AutoFillProfile* duplicate_profile = static_cast<AutoFillProfile*>(
- autofill_manager_->GetProfileWithGUID(
- "00000000-0000-0000-0000-000000000001")->Clone());
+ AutoFillProfile* duplicate_profile =
+ new AutoFillProfile(
+ *(autofill_manager_->GetProfileWithGUID(
+ "00000000-0000-0000-0000-000000000001")));
Ilya Sherman 2011/03/09 00:50:50 Won't this leak memory? Or did we have a double-f
dhollowa 2011/03/09 01:55:47 No, this AddProfile call takes ownership. It adds
autofill_manager_->AddProfile(duplicate_profile);
const FormField& field = form.fields[0];

Powered by Google App Engine
This is Rietveld 408576698