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