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 #include "chrome/browser/autofill/personal_data_manager.h" | 5 #include "chrome/browser/autofill/personal_data_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 if (importable_credit_card_fields == 0) | 205 if (importable_credit_card_fields == 0) |
206 imported_credit_card_.reset(); | 206 imported_credit_card_.reset(); |
207 | 207 |
208 { | 208 { |
209 // We're now done with the unique IDs, and SaveImportedProfile() needs the | 209 // We're now done with the unique IDs, and SaveImportedProfile() needs the |
210 // lock, so release it. | 210 // lock, so release it. |
211 AutoUnlock unlock(unique_ids_lock_); | 211 AutoUnlock unlock(unique_ids_lock_); |
212 | 212 |
213 // We always save imported profiles. | 213 // We always save imported profiles. |
214 SaveImportedProfile(); | 214 SaveImportedProfile(); |
| 215 |
| 216 // We never save an imported credit card at this point. If there was one we |
| 217 // found, we'll be asked to save it later once the user gives their OK. |
215 } | 218 } |
216 | 219 |
217 return true; | 220 return true; |
218 } | 221 } |
219 | 222 |
220 void PersonalDataManager::GetImportedFormData(AutoFillProfile** profile, | 223 void PersonalDataManager::GetImportedFormData(AutoFillProfile** profile, |
221 CreditCard** credit_card) { | 224 CreditCard** credit_card) { |
222 DCHECK(profile); | 225 DCHECK(profile); |
223 DCHECK(credit_card); | 226 DCHECK(credit_card); |
224 | 227 |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 } | 641 } |
639 | 642 |
640 profiles.push_back(**iter); | 643 profiles.push_back(**iter); |
641 } | 644 } |
642 | 645 |
643 if (!merged) | 646 if (!merged) |
644 profiles.push_back(*imported_profile_); | 647 profiles.push_back(*imported_profile_); |
645 | 648 |
646 SetProfiles(&profiles); | 649 SetProfiles(&profiles); |
647 } | 650 } |
| 651 |
| 652 void PersonalDataManager::SaveImportedCreditCard() { |
| 653 // http://crbug.com/47428 |
| 654 } |
OLD | NEW |