| 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" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/autofill/autofill_manager.h" | 13 #include "chrome/browser/autofill/autofill_manager.h" |
| 14 #include "chrome/browser/autofill/autofill_field.h" | 14 #include "chrome/browser/autofill/autofill_field.h" |
| 15 #include "chrome/browser/autofill/form_structure.h" | 15 #include "chrome/browser/autofill/form_structure.h" |
| 16 #include "chrome/browser/autofill/phone_number.h" | 16 #include "chrome/browser/autofill/phone_number.h" |
| 17 #include "chrome/browser/chrome_thread.h" | 17 #include "chrome/browser/chrome_thread.h" |
| 18 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 19 #include "chrome/browser/webdata/web_data_service.h" | 19 #include "chrome/browser/webdata/web_data_service.h" |
| 20 #include "chrome/browser/pref_service.h" | 20 #include "chrome/browser/prefs/pref_service.h" |
| 21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // The minimum number of fields that must contain user data and have known types | 25 // The minimum number of fields that must contain user data and have known types |
| 26 // before AutoFill will attempt to import the data into a profile. | 26 // before AutoFill will attempt to import the data into a profile. |
| 27 const int kMinImportSize = 3; | 27 const int kMinImportSize = 3; |
| 28 | 28 |
| 29 const char kUnlabeled[] = "Unlabeled"; | 29 const char kUnlabeled[] = "Unlabeled"; |
| 30 | 30 |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 } | 738 } |
| 739 | 739 |
| 740 creditcards.push_back(**iter); | 740 creditcards.push_back(**iter); |
| 741 } | 741 } |
| 742 | 742 |
| 743 if (!merged) | 743 if (!merged) |
| 744 creditcards.push_back(*imported_credit_card_); | 744 creditcards.push_back(*imported_credit_card_); |
| 745 | 745 |
| 746 SetCreditCards(&creditcards); | 746 SetCreditCards(&creditcards); |
| 747 } | 747 } |
| OLD | NEW |