| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // See ModelAssociator interface. | 72 // See ModelAssociator interface. |
| 73 virtual void AbortAssociation(); | 73 virtual void AbortAssociation(); |
| 74 | 74 |
| 75 // Not implemented. | 75 // Not implemented. |
| 76 virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id) { | 76 virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id) { |
| 77 return NULL; | 77 return NULL; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Not implemented. | 80 // Not implemented. |
| 81 virtual bool InitSyncNodeFromChromeId(std::string node_id, | 81 virtual bool InitSyncNodeFromChromeId(const std::string& node_id, |
| 82 sync_api::BaseNode* sync_node) { | 82 sync_api::BaseNode* sync_node) { |
| 83 return false; | 83 return false; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Returns the sync id for the given password name, or sync_api::kInvalidId | 86 // Returns the sync id for the given password name, or sync_api::kInvalidId |
| 87 // if the password name is not associated to any sync id. | 87 // if the password name is not associated to any sync id. |
| 88 virtual int64 GetSyncIdFromChromeId(std::string node_id); | 88 virtual int64 GetSyncIdFromChromeId(const std::string& node_id); |
| 89 | 89 |
| 90 // Associates the given password name with the given sync id. | 90 // Associates the given password name with the given sync id. |
| 91 virtual void Associate(const std::string* node, int64 sync_id); | 91 virtual void Associate(const std::string* node, int64 sync_id); |
| 92 | 92 |
| 93 // Remove the association that corresponds to the given sync id. | 93 // Remove the association that corresponds to the given sync id. |
| 94 virtual void Disassociate(int64 sync_id); | 94 virtual void Disassociate(int64 sync_id); |
| 95 | 95 |
| 96 // Returns whether a node with the given permanent tag was found and update | 96 // Returns whether a node with the given permanent tag was found and update |
| 97 // |sync_id| with that node's id. | 97 // |sync_id| with that node's id. |
| 98 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id); | 98 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 PasswordToSyncIdMap id_map_; | 145 PasswordToSyncIdMap id_map_; |
| 146 SyncIdToPasswordMap id_map_inverse_; | 146 SyncIdToPasswordMap id_map_inverse_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); | 148 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace browser_sync | 151 } // namespace browser_sync |
| 152 | 152 |
| 153 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ | 153 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |