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 #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_field.h" | 13 #include "chrome/browser/autofill/autofill_field.h" |
14 #include "chrome/browser/autofill/autofill-inl.h" | 14 #include "chrome/browser/autofill/autofill-inl.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/browser_thread.h" | |
18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/webdata/web_data_service.h" | 18 #include "chrome/browser/webdata/web_data_service.h" |
20 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "content/browser/browser_thread.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" |
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // The minimum number of fields that must contain user data and have known types | 27 // The minimum number of fields that must contain user data and have known types |
28 // before AutoFill will attempt to import the data into a profile or a credit | 28 // before AutoFill will attempt to import the data into a profile or a credit |
29 // card. | 29 // card. |
30 const int kMinProfileImportSize = 3; | 30 const int kMinProfileImportSize = 3; |
31 const int kMinCreditCardImportSize = 2; | 31 const int kMinCreditCardImportSize = 2; |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 } | 793 } |
794 | 794 |
795 creditcards.push_back(**iter); | 795 creditcards.push_back(**iter); |
796 } | 796 } |
797 | 797 |
798 if (!merged) | 798 if (!merged) |
799 creditcards.push_back(imported_credit_card); | 799 creditcards.push_back(imported_credit_card); |
800 | 800 |
801 SetCreditCards(&creditcards); | 801 SetCreditCards(&creditcards); |
802 } | 802 } |
OLD | NEW |