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

Unified Diff: chrome/browser/password_manager/password_syncable_service.h

Issue 139443004: Password sync refactoring: implemented ProcessSyncChanges() and GetAllSyncData() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: chrome/browser/password_manager/password_syncable_service.h
diff --git a/chrome/browser/password_manager/password_syncable_service.h b/chrome/browser/password_manager/password_syncable_service.h
index 2b32e11a738ed2f1d5de3a5bc0c9cb466fe1d639..8e78d18218aabc3765a1bc6bfb56df5fdd74ae97 100644
--- a/chrome/browser/password_manager/password_syncable_service.h
+++ b/chrome/browser/password_manager/password_syncable_service.h
@@ -56,11 +56,20 @@ class PasswordSyncableService : public syncer::SyncableService {
private:
typedef std::vector<autofill::PasswordForm*> PasswordForms;
+ // Map from password sync tag to password form.
typedef std::map<std::string, autofill::PasswordForm*> PasswordEntryMap;
- // Use the |PasswordStore| APIs to add and update entries.
+ // Helper function to retrieve the entries from password db and fill both
+ // |password_entries| and |passwords_entry_map|. |passwords_entry_map| can be
+ // NULL.
+ bool ReadFromPasswordStore(
+ ScopedVector<autofill::PasswordForm>* password_entries,
+ PasswordEntryMap* passwords_entry_map) const;
+
+ // Uses the |PasswordStore| APIs to change entries.
void WriteToPasswordStore(const PasswordForms& new_entries,
- const PasswordForms& updated_entries);
+ const PasswordForms& updated_entries,
+ const PasswordForms& deleted_entries);
// Notifies password store of a change that was performed by sync.
// Virtual so tests can override.

Powered by Google App Engine
This is Rietveld 408576698