OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( | 170 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( |
171 "10000000-0000-0000-0000-000000000001", std::string()); | 171 "10000000-0000-0000-0000-000000000001", std::string()); |
172 test::SetCreditCardInfo(credit_card.get(), nullptr, "4111111111111111", | 172 test::SetCreditCardInfo(credit_card.get(), nullptr, "4111111111111111", |
173 "12", "24"); | 173 "12", "24"); |
174 local_credit_cards_.push_back(std::move(credit_card)); | 174 local_credit_cards_.push_back(std::move(credit_card)); |
175 } | 175 } |
176 if (include_masked_server_credit_card) { | 176 if (include_masked_server_credit_card) { |
177 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( | 177 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( |
178 CreditCard::MASKED_SERVER_CARD, "server_id"); | 178 CreditCard::MASKED_SERVER_CARD, "server_id"); |
179 credit_card->set_guid("10000000-0000-0000-0000-000000000002"); | 179 credit_card->set_guid("10000000-0000-0000-0000-000000000002"); |
180 credit_card->SetTypeForMaskedCard(kDiscoverCard); | 180 credit_card->SetNetworkForMaskedCard(kDiscoverCard); |
181 server_credit_cards_.push_back(std::move(credit_card)); | 181 server_credit_cards_.push_back(std::move(credit_card)); |
182 } | 182 } |
183 if (include_full_server_credit_card) { | 183 if (include_full_server_credit_card) { |
184 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( | 184 std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>( |
185 CreditCard::FULL_SERVER_CARD, "server_id"); | 185 CreditCard::FULL_SERVER_CARD, "server_id"); |
186 credit_card->set_guid("10000000-0000-0000-0000-000000000003"); | 186 credit_card->set_guid("10000000-0000-0000-0000-000000000003"); |
187 server_credit_cards_.push_back(std::move(credit_card)); | 187 server_credit_cards_.push_back(std::move(credit_card)); |
188 } | 188 } |
189 Refresh(); | 189 Refresh(); |
190 } | 190 } |
(...skipping 4981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5172 ukm::UkmServiceTestingHarness ukm_service_test_harness; | 5172 ukm::UkmServiceTestingHarness ukm_service_test_harness; |
5173 GURL url("https://www.google.com"); | 5173 GURL url("https://www.google.com"); |
5174 std::vector<std::pair<const char*, int>> metrics = {{"metric", 1}}; | 5174 std::vector<std::pair<const char*, int>> metrics = {{"metric", 1}}; |
5175 | 5175 |
5176 EXPECT_FALSE(AutofillMetrics::LogUkm( | 5176 EXPECT_FALSE(AutofillMetrics::LogUkm( |
5177 ukm_service_test_harness.test_ukm_service(), url, "test_ukm", metrics)); | 5177 ukm_service_test_harness.test_ukm_service(), url, "test_ukm", metrics)); |
5178 EXPECT_EQ(0U, ukm_service_test_harness.test_ukm_service()->sources_count()); | 5178 EXPECT_EQ(0U, ukm_service_test_harness.test_ukm_service()->sources_count()); |
5179 } | 5179 } |
5180 | 5180 |
5181 } // namespace autofill | 5181 } // namespace autofill |
OLD | NEW |