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_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); | 68 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); |
69 | 69 |
70 // See ModelAssociator interface. | 70 // See ModelAssociator interface. |
71 virtual void AbortAssociation(); | 71 virtual void AbortAssociation(); |
72 | 72 |
73 virtual const std::string* GetChromeNodeFromSyncId( | 73 virtual const std::string* GetChromeNodeFromSyncId( |
74 int64 sync_id) { | 74 int64 sync_id) { |
75 return NULL; | 75 return NULL; |
76 } | 76 } |
77 | 77 |
78 virtual bool InitSyncNodeFromChromeId(std::string node_id, | 78 virtual bool InitSyncNodeFromChromeId(const std::string& node_id, |
79 sync_api::BaseNode* sync_node) { | 79 sync_api::BaseNode* sync_node) { |
80 return false; | 80 return false; |
81 } | 81 } |
82 | 82 |
83 // Returns the sync id for the given autofill name, or sync_api::kInvalidId | 83 // Returns the sync id for the given autofill name, or sync_api::kInvalidId |
84 // if the autofill name is not associated to any sync id. | 84 // if the autofill name is not associated to any sync id. |
85 virtual int64 GetSyncIdFromChromeId(std::string node_id); | 85 virtual int64 GetSyncIdFromChromeId(const std::string& node_id); |
86 | 86 |
87 // Associates the given autofill name with the given sync id. | 87 // Associates the given autofill name with the given sync id. |
88 virtual void Associate(const std::string* node, int64 sync_id); | 88 virtual void Associate(const std::string* node, int64 sync_id); |
89 | 89 |
90 // Remove the association that corresponds to the given sync id. | 90 // Remove the association that corresponds to the given sync id. |
91 virtual void Disassociate(int64 sync_id); | 91 virtual void Disassociate(int64 sync_id); |
92 | 92 |
93 // TODO(lipalani) Bug 64111. Returns whether a node with the | 93 // TODO(lipalani) Bug 64111. Returns whether a node with the |
94 // given permanent tag was found and update | 94 // given permanent tag was found and update |
95 // |sync_id| with that node's id. No current use. To Implement | 95 // |sync_id| with that node's id. No current use. To Implement |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 std::set<std::string> current_profiles; | 189 std::set<std::string> current_profiles; |
190 std::vector<std::string> profiles_to_delete; | 190 std::vector<std::string> profiles_to_delete; |
191 std::vector<AutoFillProfile*> updated_profiles; | 191 std::vector<AutoFillProfile*> updated_profiles; |
192 std::vector<AutoFillProfile*> new_profiles; // We own these pointers. | 192 std::vector<AutoFillProfile*> new_profiles; // We own these pointers. |
193 ~DataBundle() { STLDeleteElements(&new_profiles); } | 193 ~DataBundle() { STLDeleteElements(&new_profiles); } |
194 }; | 194 }; |
195 | 195 |
196 } // namespace browser_sync | 196 } // namespace browser_sync |
197 | 197 |
198 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ | 198 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ |
199 | |
OLD | NEW |