Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2422363002: Trigger HTTP-bad warning when querying credit card autofill (Closed)
Patch Set: add missing blank line Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 FormStructure* form_structure = NULL; 521 FormStructure* form_structure = NULL;
522 AutofillField* autofill_field = NULL; 522 AutofillField* autofill_field = NULL;
523 bool got_autofillable_form = 523 bool got_autofillable_form =
524 GetCachedFormAndField(form, field, &form_structure, &autofill_field) && 524 GetCachedFormAndField(form, field, &form_structure, &autofill_field) &&
525 // Don't send suggestions or track forms that should not be parsed. 525 // Don't send suggestions or track forms that should not be parsed.
526 form_structure->ShouldBeParsed(); 526 form_structure->ShouldBeParsed();
527 527
528 // Logging interactions of forms that are autofillable. 528 // Logging interactions of forms that are autofillable.
529 if (got_autofillable_form) { 529 if (got_autofillable_form) {
530 if (autofill_field->Type().group() == CREDIT_CARD) 530 if (autofill_field->Type().group() == CREDIT_CARD) {
531 driver_->DidInteractWithCreditCardForm();
531 credit_card_form_event_logger_->OnDidInteractWithAutofillableForm(); 532 credit_card_form_event_logger_->OnDidInteractWithAutofillableForm();
532 else 533 } else {
533 address_form_event_logger_->OnDidInteractWithAutofillableForm(); 534 address_form_event_logger_->OnDidInteractWithAutofillableForm();
535 }
534 } 536 }
535 537
536 if (is_autofill_possible && 538 if (is_autofill_possible &&
537 driver_->RendererIsAvailable() && 539 driver_->RendererIsAvailable() &&
538 got_autofillable_form) { 540 got_autofillable_form) {
539 AutofillType type = autofill_field->Type(); 541 AutofillType type = autofill_field->Type();
540 bool is_filling_credit_card = (type.group() == CREDIT_CARD); 542 bool is_filling_credit_card = (type.group() == CREDIT_CARD);
541 // On desktop, don't return non credit card related suggestions for forms or 543 // On desktop, don't return non credit card related suggestions for forms or
542 // fields that have the "autocomplete" attribute set to off. 544 // fields that have the "autocomplete" attribute set to off.
543 if (IsDesktopPlatform() && !is_filling_credit_card && 545 if (IsDesktopPlatform() && !is_filling_credit_card &&
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 if (i > 0) 2084 if (i > 0)
2083 fputs("Next oldest form:\n", file); 2085 fputs("Next oldest form:\n", file);
2084 } 2086 }
2085 fputs("\n", file); 2087 fputs("\n", file);
2086 2088
2087 fclose(file); 2089 fclose(file);
2088 } 2090 }
2089 #endif // ENABLE_FORM_DEBUG_DUMP 2091 #endif // ENABLE_FORM_DEBUG_DUMP
2090 2092
2091 } // namespace autofill 2093 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_driver.h ('k') | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698