Index: components/password_manager/core/browser/password_syncable_service.cc |
diff --git a/components/password_manager/core/browser/password_syncable_service.cc b/components/password_manager/core/browser/password_syncable_service.cc |
index 255e70d97a8ad6c783a3197e6c398b35a20497ad..27eae58b29276cbf33b1141e40b2e3f88aa4d08d 100644 |
--- a/components/password_manager/core/browser/password_syncable_service.cc |
+++ b/components/password_manager/core/browser/password_syncable_service.cc |
@@ -278,9 +278,18 @@ syncer::SyncError PasswordSyncableService::ProcessSyncChanges( |
void PasswordSyncableService::ActOnPasswordStoreChanges( |
const PasswordStoreChangeList& local_changes) { |
DCHECK(CalledOnValidThread()); |
+ |
+ if (!sync_processor_) { |
+ if (!flare_.is_null()) { |
+ flare_.Run(syncer::PASSWORDS); |
+ flare_.Reset(); |
+ } |
+ return; |
+ } |
+ |
// ActOnPasswordStoreChanges() can be called from ProcessSyncChanges(). Do |
// nothing in this case. |
- if (!sync_processor_ || is_processing_sync_changes_) |
+ if (is_processing_sync_changes_) |
return; |
syncer::SyncChangeList sync_changes; |
for (PasswordStoreChangeList::const_iterator it = local_changes.begin(); |
@@ -294,6 +303,12 @@ void PasswordSyncableService::ActOnPasswordStoreChanges( |
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_changes); |
} |
+void PasswordSyncableService::InjectStartSyncFlare( |
+ const syncer::SyncableService::StartSyncFlare& flare) { |
+ DCHECK(CalledOnValidThread()); |
+ flare_ = flare; |
+} |
+ |
bool PasswordSyncableService::ReadFromPasswordStore( |
ScopedVector<autofill::PasswordForm>* password_entries, |
PasswordEntryMap* passwords_entry_map) const { |