Chromium Code Reviews| 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 e4c84e699a9efe1312f81f28ab2f1ae8303c182c..0235d1c0785e76f3f9d80c4ee7f543448fd5af7c 100644 |
| --- a/chrome/browser/password_manager/password_syncable_service.h |
| +++ b/chrome/browser/password_manager/password_syncable_service.h |
| @@ -31,6 +31,10 @@ class PasswordSyncableService : public syncer::SyncableService { |
| virtual ~PasswordSyncableService(); |
| typedef std::vector<autofill::PasswordForm*> PasswordVector; |
| + typedef std::map<std::string, |
| + std::pair<syncer::SyncChange::SyncChangeType, |
| + std::vector<autofill::PasswordForm*>::iterator > > |
| + PasswordEntryMap; |
| // syncer::SyncableServiceImplementations |
| virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
| @@ -55,14 +59,27 @@ class PasswordSyncableService : public syncer::SyncableService { |
| const std::string& username_value, |
| const std::string& password_element, |
| const std::string& signon_realm); |
| + // Static |
|
Nicolas Zea
2013/10/15 22:04:10
Rebase onto your other patch?
lipalani1
2013/10/18 23:33:03
Done.
|
| + static syncer::SyncData PasswordSyncableService::CreateSyncData( |
| + const autofill::PasswordForm& password); |
| + // Static |
| + static void ExtractPasswordFromSpecifics( |
| + const sync_pb::PasswordSpecificsData& password, |
| + autofill::PasswordForm* new_password); |
| private: |
| bool PasswordSyncableService::WriteToPasswordStore( |
| PasswordVector* new_entries, |
| PasswordVector* udpated_entries); |
| - syncer::SyncData PasswordSyncableService::CreateSyncData( |
| - const autofill::PasswordForm& password); |
| + void CreateOrUpdateEntry( |
| + const syncer::SyncData& data, |
| + PasswordEntryMap* loaded_data, |
| + std::vector<autofill::PasswordForm*>* new_entries, |
| + std::vector<autofill::PasswordForm*>* udpated_entries); |
| + |
| + // Virtual so tests can override. |
| + virtual void NotifyPasswordStore(); |
| scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; |
| scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; |