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

Side by Side Diff: components/autofill/core/browser/personal_data_manager_unittest.cc

Issue 2740633002: [Autofill] Add upstreaming UKM (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698