| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 virtual bool DisassociateModels(); | 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 // Not implemented. | 74 // Not implemented. |
| 75 virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id) { | 75 virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id); |
| 76 return NULL; | |
| 77 } | |
| 78 | 76 |
| 79 // Not implemented. | 77 // Not implemented. |
| 80 virtual bool InitSyncNodeFromChromeId(const std::string& node_id, | 78 virtual bool InitSyncNodeFromChromeId(const std::string& node_id, |
| 81 sync_api::BaseNode* sync_node) { | 79 sync_api::BaseNode* sync_node); |
| 82 return false; | |
| 83 } | |
| 84 | 80 |
| 85 // Returns the sync id for the given password name, or sync_api::kInvalidId | 81 // Returns the sync id for the given password name, or sync_api::kInvalidId |
| 86 // if the password name is not associated to any sync id. | 82 // if the password name is not associated to any sync id. |
| 87 virtual int64 GetSyncIdFromChromeId(const std::string& node_id); | 83 virtual int64 GetSyncIdFromChromeId(const std::string& node_id); |
| 88 | 84 |
| 89 // Associates the given password name with the given sync id. | 85 // Associates the given password name with the given sync id. |
| 90 virtual void Associate(const std::string* node, int64 sync_id); | 86 virtual void Associate(const std::string* node, int64 sync_id); |
| 91 | 87 |
| 92 // Remove the association that corresponds to the given sync id. | 88 // Remove the association that corresponds to the given sync id. |
| 93 virtual void Disassociate(int64 sync_id); | 89 virtual void Disassociate(int64 sync_id); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 139 |
| 144 PasswordToSyncIdMap id_map_; | 140 PasswordToSyncIdMap id_map_; |
| 145 SyncIdToPasswordMap id_map_inverse_; | 141 SyncIdToPasswordMap id_map_inverse_; |
| 146 | 142 |
| 147 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); | 143 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); |
| 148 }; | 144 }; |
| 149 | 145 |
| 150 } // namespace browser_sync | 146 } // namespace browser_sync |
| 151 | 147 |
| 152 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ | 148 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |