Chromium Code Reviews| 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> |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 external_delegate_ = delegate; | 250 external_delegate_ = delegate; |
| 251 autocomplete_history_manager_->SetExternalDelegate(delegate); | 251 autocomplete_history_manager_->SetExternalDelegate(delegate); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void AutofillManager::ShowAutofillSettings() { | 254 void AutofillManager::ShowAutofillSettings() { |
| 255 client_->ShowAutofillSettings(); | 255 client_->ShowAutofillSettings(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 bool AutofillManager::ShouldShowScanCreditCard(const FormData& form, | 258 bool AutofillManager::ShouldShowScanCreditCard(const FormData& form, |
| 259 const FormFieldData& field) { | 259 const FormFieldData& field) { |
| 260 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
|
Mathieu
2016/08/02 20:45:34
do you need to remove autofill_switches.h?
please use gerrit instead
2016/08/02 22:52:21
Done.
| |
| 261 switches::kDisableCreditCardScan)) { | |
| 262 return false; | |
| 263 } | |
| 264 | |
| 265 if (!client_->HasCreditCardScanFeature()) | 260 if (!client_->HasCreditCardScanFeature()) |
| 266 return false; | 261 return false; |
| 267 | 262 |
| 268 AutofillField* autofill_field = GetAutofillField(form, field); | 263 AutofillField* autofill_field = GetAutofillField(form, field); |
| 269 if (!autofill_field || | 264 if (!autofill_field || |
| 270 autofill_field->Type().GetStorableType() != CREDIT_CARD_NUMBER) { | 265 autofill_field->Type().GetStorableType() != CREDIT_CARD_NUMBER) { |
| 271 return false; | 266 return false; |
| 272 } | 267 } |
| 273 | 268 |
| 274 static const int kShowScanCreditCardMaxValueLength = 6; | 269 static const int kShowScanCreditCardMaxValueLength = 6; |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2047 if (i > 0) | 2042 if (i > 0) |
| 2048 fputs("Next oldest form:\n", file); | 2043 fputs("Next oldest form:\n", file); |
| 2049 } | 2044 } |
| 2050 fputs("\n", file); | 2045 fputs("\n", file); |
| 2051 | 2046 |
| 2052 fclose(file); | 2047 fclose(file); |
| 2053 } | 2048 } |
| 2054 #endif // ENABLE_FORM_DEBUG_DUMP | 2049 #endif // ENABLE_FORM_DEBUG_DUMP |
| 2055 | 2050 |
| 2056 } // namespace autofill | 2051 } // namespace autofill |
| OLD | NEW |