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/personal_data_manager.h" | 5 #include "components/autofill/core/browser/personal_data_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 account_tracker_->Shutdown(); | 169 account_tracker_->Shutdown(); |
170 account_tracker_.reset(); | 170 account_tracker_.reset(); |
171 signin_client_.reset(); | 171 signin_client_.reset(); |
172 | 172 |
173 test::DisableSystemServices(prefs_.get()); | 173 test::DisableSystemServices(prefs_.get()); |
174 OSCryptMocker::TearDown(); | 174 OSCryptMocker::TearDown(); |
175 } | 175 } |
176 | 176 |
177 void ResetPersonalDataManager(UserMode user_mode) { | 177 void ResetPersonalDataManager(UserMode user_mode) { |
178 bool is_incognito = (user_mode == USER_MODE_INCOGNITO); | 178 bool is_incognito = (user_mode == USER_MODE_INCOGNITO); |
179 personal_data_.reset(new PersonalDataManager("en")); | 179 personal_data_.reset( |
| 180 new PersonalDataManager("en", nullptr /* ukm_service */)); |
180 personal_data_->Init( | 181 personal_data_->Init( |
181 scoped_refptr<AutofillWebDataService>(autofill_database_service_), | 182 scoped_refptr<AutofillWebDataService>(autofill_database_service_), |
182 prefs_.get(), | 183 prefs_.get(), |
183 account_tracker_.get(), | 184 account_tracker_.get(), |
184 signin_manager_.get(), | 185 signin_manager_.get(), |
185 is_incognito); | 186 is_incognito); |
186 personal_data_->AddObserver(&personal_data_observer_); | 187 personal_data_->AddObserver(&personal_data_observer_); |
187 personal_data_->OnSyncServiceInitialized(nullptr); | 188 personal_data_->OnSyncServiceInitialized(nullptr); |
188 | 189 |
189 // Verify that the web database has been updated and the notification sent. | 190 // Verify that the web database has been updated and the notification sent. |
(...skipping 5810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6000 | 6001 |
6001 // Make sure that the billing address id of the two cards now point to the | 6002 // Make sure that the billing address id of the two cards now point to the |
6002 // converted profile. | 6003 // converted profile. |
6003 EXPECT_EQ(profiles[0]->guid(), | 6004 EXPECT_EQ(profiles[0]->guid(), |
6004 personal_data_->GetCreditCards()[0]->billing_address_id()); | 6005 personal_data_->GetCreditCards()[0]->billing_address_id()); |
6005 EXPECT_EQ(profiles[0]->guid(), | 6006 EXPECT_EQ(profiles[0]->guid(), |
6006 personal_data_->GetCreditCards()[1]->billing_address_id()); | 6007 personal_data_->GetCreditCards()[1]->billing_address_id()); |
6007 } | 6008 } |
6008 | 6009 |
6009 } // namespace autofill | 6010 } // namespace autofill |
OLD | NEW |