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

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

Issue 12378055: Make autofill stop depending on InfoBarService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_metrics_unittest.cc
diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc
index cbbffd6ac3e1f057f4ec876cbb93f8d47ef222a3..58d286b0a8326699c4c19b551e9c67d1946e7b36 100644
--- a/chrome/browser/autofill/autofill_metrics_unittest.cc
+++ b/chrome/browser/autofill/autofill_metrics_unittest.cc
@@ -9,6 +9,8 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autocheckout_page_meta_data.h"
+#include "chrome/browser/autofill/autofill_cc_import_confirmation_delegate.h"
+#include "chrome/browser/autofill/autofill_cc_import_confirmation_handler.h"
#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_common_test.h"
#include "chrome/browser/autofill/autofill_manager.h"
@@ -28,6 +30,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
+using autofill::AutofillCCImportConfirmationDelegate;
+using autofill::AutofillCCImportConfirmationHandler;
using content::BrowserThread;
using ::testing::_;
using ::testing::AnyNumber;
@@ -350,8 +354,13 @@ scoped_ptr<ConfirmInfoBarDelegate> AutofillMetricsTest::CreateDelegate(
CreditCard* credit_card = new CreditCard();
if (created_card)
*created_card = credit_card;
- return AutofillCCInfoBarDelegate::Create(credit_card, &personal_data_,
- metric_logger);
+
+ scoped_ptr<AutofillCCImportConfirmationDelegate> confirmation_delegate(
+ new AutofillCCImportConfirmationHandler(
+ scoped_ptr<const CreditCard>(credit_card),
+ &personal_data_,
+ metric_logger));
+ return AutofillCCInfoBarDelegate::Create(confirmation_delegate.Pass());
}
// Test that we log quality metrics appropriately.

Powered by Google App Engine
This is Rietveld 408576698