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

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

Issue 27233003: [Sync] Implementation of model association for passwords using sync API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review.\ Created 7 years, 2 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 dd32b2c323ab774c14fe583990b7c3724055809e..43831bffaa56650871a3b9f799ac79ab4f9df125 100644
--- a/chrome/browser/password_manager/password_syncable_service.h
+++ b/chrome/browser/password_manager/password_syncable_service.h
@@ -60,15 +60,32 @@ class PasswordSyncableService : public syncer::SyncableService {
const std::string& password_element,
const std::string& signon_realm);
+ // Converts the |PasswordForm| to |SyncData| suitable for syncing.
Nicolas Zea 2013/10/21 23:55:14 nit: no need to mention suitable for syncing; that
lipalani1 2013/10/24 00:13:58 Done.
+ static syncer::SyncData CreateSyncData(
+ const autofill::PasswordForm& password);
Nicolas Zea 2013/10/21 23:55:14 nit: fix indent
lipalani1 2013/10/24 00:13:58 Done.
+ static void ExtractPasswordFromSpecifics(
+ const sync_pb::PasswordSpecificsData& password,
+ autofill::PasswordForm* new_password);
+
private:
typedef std::vector<autofill::PasswordForm*> PasswordForms;
+ typedef std::map<std::string,
Nicolas Zea 2013/10/21 23:55:14 nit: remove newline above
lipalani1 2013/10/24 00:13:58 Done.
+ std::pair<syncer::SyncChange::SyncChangeType,
+ std::vector<autofill::PasswordForm*>::iterator > >
+ PasswordEntryMap;
+
// Use the |PasswordStore| APIs to add and update entries.
void WriteToPasswordStore(PasswordForms* new_entries,
PasswordForms* udpated_entries);
-
- // Converts the |PasswordForm| to |SyncData| suitable for syncing.
- syncer::SyncData CreateSyncData(const autofill::PasswordForm& password);
+ void CreateOrUpdateEntry(
Nicolas Zea 2013/10/21 23:55:14 Comment about what function does
lipalani1 2013/10/24 00:13:58 Done.
+ const syncer::SyncData& data,
+ PasswordEntryMap* loaded_data,
+ ScopedVector<autofill::PasswordForm>* new_entries,
+ ScopedVector<autofill::PasswordForm>* udpated_entries);
Nicolas Zea 2013/10/21 23:55:14 udpated -> updated
lipalani1 2013/10/24 00:13:58 Done.
+
+ // Virtual so tests can override.
+ virtual void NotifyPasswordStore();
// The factory that creates sync errors. |SyncError| has rich data
// suitable for debugging.

Powered by Google App Engine
This is Rietveld 408576698