| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 typedef std::vector<webkit_glue::PasswordForm> PasswordVector; | 49 typedef std::vector<webkit_glue::PasswordForm> PasswordVector; |
| 50 | 50 |
| 51 static syncable::ModelType model_type() { return syncable::PASSWORDS; } | 51 static syncable::ModelType model_type() { return syncable::PASSWORDS; } |
| 52 PasswordModelAssociator(ProfileSyncService* sync_service, | 52 PasswordModelAssociator(ProfileSyncService* sync_service, |
| 53 PasswordStore* password_store); | 53 PasswordStore* password_store); |
| 54 virtual ~PasswordModelAssociator(); | 54 virtual ~PasswordModelAssociator(); |
| 55 | 55 |
| 56 // PerDataTypeAssociatorInterface implementation. | 56 // PerDataTypeAssociatorInterface implementation. |
| 57 // | 57 // |
| 58 // Iterates through the sync model looking for matched pairs of items. | 58 // Iterates through the sync model looking for matched pairs of items. |
| 59 virtual bool AssociateModels(SyncError* error); | 59 virtual bool AssociateModels(); |
| 60 | 60 |
| 61 // Delete all password nodes. | 61 // Delete all password nodes. |
| 62 bool DeleteAllNodes(sync_api::WriteTransaction* trans); | 62 bool DeleteAllNodes(sync_api::WriteTransaction* trans); |
| 63 | 63 |
| 64 // Clears all associations. | 64 // Clears all associations. |
| 65 virtual bool DisassociateModels(SyncError* error); | 65 virtual bool DisassociateModels(); |
| 66 | 66 |
| 67 // The has_nodes out param is true if the sync model has nodes other | 67 // The has_nodes out param is true if the sync model has nodes other |
| 68 // than the permanent tagged nodes. | 68 // than the permanent tagged nodes. |
| 69 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); | 69 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); |
| 70 | 70 |
| 71 // See ModelAssociator interface. | 71 // See ModelAssociator interface. |
| 72 virtual void AbortAssociation(); | 72 virtual void AbortAssociation(); |
| 73 | 73 |
| 74 // See ModelAssociator interface. | 74 // See ModelAssociator interface. |
| 75 virtual bool CryptoReadyIfNecessary(); | 75 virtual bool CryptoReadyIfNecessary(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 PasswordToSyncIdMap id_map_; | 139 PasswordToSyncIdMap id_map_; |
| 140 SyncIdToPasswordMap id_map_inverse_; | 140 SyncIdToPasswordMap id_map_inverse_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); | 142 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace browser_sync | 145 } // namespace browser_sync |
| 146 | 146 |
| 147 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ | 147 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |