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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // AssociateModels method as soon as possible. | 174 // AssociateModels method as soon as possible. |
175 base::Lock abort_association_pending_lock_; | 175 base::Lock abort_association_pending_lock_; |
176 bool abort_association_pending_; | 176 bool abort_association_pending_; |
177 | 177 |
178 int number_of_profiles_created_; | 178 int number_of_profiles_created_; |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(AutofillProfileModelAssociator); | 180 DISALLOW_COPY_AND_ASSIGN(AutofillProfileModelAssociator); |
181 }; | 181 }; |
182 | 182 |
183 struct AutofillProfileModelAssociator::DataBundle { | 183 struct AutofillProfileModelAssociator::DataBundle { |
| 184 DataBundle(); |
| 185 ~DataBundle(); |
| 186 |
184 std::set<std::string> current_profiles; | 187 std::set<std::string> current_profiles; |
185 std::vector<std::string> profiles_to_delete; | 188 std::vector<std::string> profiles_to_delete; |
186 std::vector<AutoFillProfile*> updated_profiles; | 189 std::vector<AutoFillProfile*> updated_profiles; |
187 std::vector<AutoFillProfile*> new_profiles; // We own these pointers. | 190 std::vector<AutoFillProfile*> new_profiles; // We own these pointers. |
188 ~DataBundle() { STLDeleteElements(&new_profiles); } | |
189 }; | 191 }; |
190 | 192 |
191 } // namespace browser_sync | 193 } // namespace browser_sync |
192 | 194 |
193 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ | 195 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ |
194 | 196 |
OLD | NEW |