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

Unified Diff: components/password_manager/core/browser/password_syncable_service.cc

Issue 183223003: Add StartSyncFlare to PasswordSyncableService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk Created 6 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 side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698