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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 2187713005: [Merge M53] Apply autofill profile use-date fix after sync starts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index ca8413a432ef4f842d226054c8e7c8ef5980355e..d00c39fa3cd49bcfc45b6aeb5f4b0996af45d4e1 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -318,7 +318,12 @@ void PersonalDataManager::OnSyncServiceInitialized(
return;
}
- // Otherwise, run the de-duplication now.
+ // This runs as a one-time fix, tracked in syncable prefs. If it has already
+ // run, it is a NOP (other than checking the pref).
+ ApplyProfileUseDatesFix();
+
+ // This runs at most once per major version, tracked in syncable prefs. If it
+ // has already run for this version, it's a NOP, other than checking the pref.
ApplyDedupingRoutine();
}
@@ -349,7 +354,6 @@ void PersonalDataManager::OnWebDataServiceRequestDone(
ReceiveLoadedDbValues(h, result, &pending_profiles_query_,
&web_profiles_);
LogProfileCount(); // This only logs local profiles.
- ApplyProfileUseDatesFix();
} else {
ReceiveLoadedDbValues(h, result, &pending_server_profiles_query_,
&server_profiles_);
@@ -404,8 +408,14 @@ void PersonalDataManager::AutofillMultipleChanged() {
}
void PersonalDataManager::SyncStarted(syncer::ModelType model_type) {
- if (model_type == syncer::AUTOFILL_PROFILE &&
- is_autofill_profile_dedupe_pending_) {
+ if (model_type == syncer::AUTOFILL_PROFILE) {
+ // This runs as a one-time fix, tracked in syncable prefs. If it has already
+ // run, it is a NOP (other than checking the pref).
+ ApplyProfileUseDatesFix();
+
+ // This runs at most once per major version, tracked in syncable prefs. If
+ // it has already run for this version, it's a NOP, other than checking the
+ // pref.
ApplyDedupingRoutine();
}
}
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698