OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <limits> | 11 #include <limits> |
12 #include <map> | 12 #include <map> |
13 #include <set> | 13 #include <set> |
14 #include <utility> | 14 #include <utility> |
15 #include <vector> | |
16 | 15 |
17 #include "base/bind.h" | 16 #include "base/bind.h" |
18 #include "base/command_line.h" | 17 #include "base/command_line.h" |
19 #include "base/containers/adapters.h" | 18 #include "base/containers/adapters.h" |
20 #include "base/feature_list.h" | 19 #include "base/feature_list.h" |
21 #include "base/files/file_util.h" | 20 #include "base/files/file_util.h" |
22 #include "base/guid.h" | 21 #include "base/guid.h" |
23 #include "base/logging.h" | 22 #include "base/logging.h" |
24 #include "base/message_loop/message_loop.h" | 23 #include "base/message_loop/message_loop.h" |
25 #include "base/path_service.h" | 24 #include "base/path_service.h" |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 | 1122 |
1124 // Upload also requires recently used or modified addresses that meet the | 1123 // Upload also requires recently used or modified addresses that meet the |
1125 // client-side validation rules. | 1124 // client-side validation rules. |
1126 if (!GetProfilesForCreditCardUpload(*imported_credit_card, | 1125 if (!GetProfilesForCreditCardUpload(*imported_credit_card, |
1127 &upload_request_.profiles, | 1126 &upload_request_.profiles, |
1128 submitted_form.source_url())) { | 1127 submitted_form.source_url())) { |
1129 return; | 1128 return; |
1130 } | 1129 } |
1131 | 1130 |
1132 // All required data is available, start the upload process. | 1131 // All required data is available, start the upload process. |
1133 payments_client_->GetUploadDetails(upload_request_.profiles, app_locale_); | 1132 payments_client_->GetUploadDetails(app_locale_); |
1134 } | 1133 } |
1135 } | 1134 } |
1136 | 1135 |
1137 bool AutofillManager::GetProfilesForCreditCardUpload( | 1136 bool AutofillManager::GetProfilesForCreditCardUpload( |
1138 const CreditCard& card, | 1137 const CreditCard& card, |
1139 std::vector<AutofillProfile>* profiles, | 1138 std::vector<AutofillProfile>* profiles, |
1140 const GURL& source_url) const { | 1139 const GURL& source_url) const { |
1141 std::vector<AutofillProfile> candidate_profiles; | 1140 std::vector<AutofillProfile> candidate_profiles; |
1142 const base::Time now = base::Time::Now(); | 1141 const base::Time now = base::Time::Now(); |
1143 const base::TimeDelta fifteen_minutes = base::TimeDelta::FromMinutes(15); | 1142 const base::TimeDelta fifteen_minutes = base::TimeDelta::FromMinutes(15); |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 if (i > 0) | 2075 if (i > 0) |
2077 fputs("Next oldest form:\n", file); | 2076 fputs("Next oldest form:\n", file); |
2078 } | 2077 } |
2079 fputs("\n", file); | 2078 fputs("\n", file); |
2080 | 2079 |
2081 fclose(file); | 2080 fclose(file); |
2082 } | 2081 } |
2083 #endif // ENABLE_FORM_DEBUG_DUMP | 2082 #endif // ENABLE_FORM_DEBUG_DUMP |
2084 | 2083 |
2085 } // namespace autofill | 2084 } // namespace autofill |
OLD | NEW |