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

Side by Side Diff: components/autofill/core/browser/personal_data_manager.h

Issue 2077003002: [Autofill] Fix profiles with bad |use_date| values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 1line fix Created 4 years, 6 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 protected: 250 protected:
251 // Only PersonalDataManagerFactory and certain tests can create instances of 251 // Only PersonalDataManagerFactory and certain tests can create instances of
252 // PersonalDataManager. 252 // PersonalDataManager.
253 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast); 253 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast);
254 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup); 254 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup);
255 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, 255 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest,
256 FindAndMergeDuplicateProfiles_ProfilesToDelete); 256 FindAndMergeDuplicateProfiles_ProfilesToDelete);
257 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, 257 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest,
258 FindAndMergeDuplicateProfiles_MergedProfileValues); 258 FindAndMergeDuplicateProfiles_MergedProfileValues);
259 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, ApplyProfileUseDatesFix);
260 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest,
261 ApplyProfileUseDatesFix_NotAppliedTwice);
259 friend class autofill::AutofillInteractiveTest; 262 friend class autofill::AutofillInteractiveTest;
260 friend class autofill::AutofillTest; 263 friend class autofill::AutofillTest;
261 friend class autofill::PersonalDataManagerFactory; 264 friend class autofill::PersonalDataManagerFactory;
262 friend class PersonalDataManagerTest; 265 friend class PersonalDataManagerTest;
263 #if defined(OS_IOS) 266 #if defined(OS_IOS)
264 // TODO(crbug.com/513344): Remove this once Chrome on iOS is unforked. 267 // TODO(crbug.com/513344): Remove this once Chrome on iOS is unforked.
265 friend class ::PersonalDataManagerFactory; 268 friend class ::PersonalDataManagerFactory;
266 #endif 269 #endif
267 friend class ProfileSyncServiceAutofillTest; 270 friend class ProfileSyncServiceAutofillTest;
268 friend class ::RemoveAutofillTester; 271 friend class ::RemoveAutofillTester;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 // end of |existing_profiles| is reached. 433 // end of |existing_profiles| is reached.
431 // 434 //
432 // Note: This method is exposed for testability and should not be called 435 // Note: This method is exposed for testability and should not be called
433 // directly in the code except in FindMergeAndDeleteDuplicateProfiles. Please 436 // directly in the code except in FindMergeAndDeleteDuplicateProfiles. Please
434 // use that method instead. 437 // use that method instead.
435 void FindAndMergeDuplicateProfiles( 438 void FindAndMergeDuplicateProfiles(
436 const std::vector<AutofillProfile*>& existing_profiles, 439 const std::vector<AutofillProfile*>& existing_profiles,
437 AutofillProfile* profile_to_merge, 440 AutofillProfile* profile_to_merge,
438 std::vector<std::string>* profile_guids_to_delete); 441 std::vector<std::string>* profile_guids_to_delete);
439 442
443 // Runs the Autofill use date fix routine if it's never been done. Returns
444 // whether the routine was run.
445 void ApplyProfileUseDatesFix();
446
440 const std::string app_locale_; 447 const std::string app_locale_;
441 448
442 // The default country code for new addresses. 449 // The default country code for new addresses.
443 mutable std::string default_country_code_; 450 mutable std::string default_country_code_;
444 451
445 // The PrefService that this instance uses. Must outlive this instance. 452 // The PrefService that this instance uses. Must outlive this instance.
446 PrefService* pref_service_; 453 PrefService* pref_service_;
447 454
448 // The AccountTrackerService that this instance uses. Must outlive this 455 // The AccountTrackerService that this instance uses. Must outlive this
449 // instance. 456 // instance.
(...skipping 18 matching lines...) Expand all
468 475
469 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. 476 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled.
470 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; 477 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_;
471 478
472 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); 479 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
473 }; 480 };
474 481
475 } // namespace autofill 482 } // namespace autofill
476 483
477 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 484 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698