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_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // associating models, and send to the WebDatabase for persistence. | 52 // associating models, and send to the WebDatabase for persistence. |
53 // We do this so we hold the write lock for only a small period. | 53 // We do this so we hold the write lock for only a small period. |
54 // When storing the web db we are out of the write lock. | 54 // When storing the web db we are out of the write lock. |
55 struct DataBundle; | 55 struct DataBundle; |
56 | 56 |
57 static syncable::ModelType model_type() { return syncable::AUTOFILL_PROFILE; } | 57 static syncable::ModelType model_type() { return syncable::AUTOFILL_PROFILE; } |
58 | 58 |
59 // PerDataTypeAssociatorInterface implementation. | 59 // PerDataTypeAssociatorInterface implementation. |
60 // | 60 // |
61 // Iterates through the sync model looking for matched pairs of items. | 61 // Iterates through the sync model looking for matched pairs of items. |
62 virtual bool AssociateModels(SyncError* error); | 62 virtual bool AssociateModels(); |
63 | 63 |
64 // Clears all associations. | 64 // Clears all associations. |
65 virtual bool DisassociateModels(SyncError* error); | 65 virtual bool DisassociateModels(); |
66 | 66 |
67 // TODO(lipalani) Bug 64111. | 67 // TODO(lipalani) Bug 64111. |
68 // The has_nodes out param is true if the sync model has nodes other | 68 // The has_nodes out param is true if the sync model has nodes other |
69 // than the permanent tagged nodes. | 69 // than the permanent tagged nodes. |
70 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); | 70 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); |
71 | 71 |
72 // See ModelAssociator interface. | 72 // See ModelAssociator interface. |
73 virtual void AbortAssociation(); | 73 virtual void AbortAssociation(); |
74 | 74 |
75 // See ModelAssociator interface. | 75 // See ModelAssociator interface. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 std::set<std::string> current_profiles; | 190 std::set<std::string> current_profiles; |
191 std::vector<std::string> profiles_to_delete; | 191 std::vector<std::string> profiles_to_delete; |
192 std::vector<AutofillProfile*> updated_profiles; | 192 std::vector<AutofillProfile*> updated_profiles; |
193 std::vector<AutofillProfile*> new_profiles; // We own these pointers. | 193 std::vector<AutofillProfile*> new_profiles; // We own these pointers. |
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 | 199 |
OLD | NEW |