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

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: Added DCHECK() into ProcessSyncChanges() 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_syncable_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ab2b1569872ae45db1de36eab9ae1d0458f4eff8..38e8ef3ea32967017a0944aca8f338ca59e66051 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.
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698