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

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

Issue 2588133002: Make form-not-secure controllable as its own separate Finch feature (Closed)
Patch Set: elawrence, mathp comments; update histograms.xml Created 4 years 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "components/autofill/core/common/autofill_pref_names.h" 55 #include "components/autofill/core/common/autofill_pref_names.h"
56 #include "components/autofill/core/common/autofill_util.h" 56 #include "components/autofill/core/common/autofill_util.h"
57 #include "components/autofill/core/common/form_data.h" 57 #include "components/autofill/core/common/form_data.h"
58 #include "components/autofill/core/common/form_data_predictions.h" 58 #include "components/autofill/core/common/form_data_predictions.h"
59 #include "components/autofill/core/common/form_field_data.h" 59 #include "components/autofill/core/common/form_field_data.h"
60 #include "components/autofill/core/common/password_form_fill_data.h" 60 #include "components/autofill/core/common/password_form_fill_data.h"
61 #include "components/pref_registry/pref_registry_syncable.h" 61 #include "components/pref_registry/pref_registry_syncable.h"
62 #include "components/prefs/pref_service.h" 62 #include "components/prefs/pref_service.h"
63 #include "components/rappor/public/rappor_utils.h" 63 #include "components/rappor/public/rappor_utils.h"
64 #include "components/rappor/rappor_service_impl.h" 64 #include "components/rappor/rappor_service_impl.h"
65 #include "components/security_state/core/security_state.h"
65 #include "google_apis/gaia/identity_provider.h" 66 #include "google_apis/gaia/identity_provider.h"
66 #include "grit/components_strings.h" 67 #include "grit/components_strings.h"
67 #include "ui/base/l10n/l10n_util.h" 68 #include "ui/base/l10n/l10n_util.h"
68 #include "ui/gfx/geometry/rect.h" 69 #include "ui/gfx/geometry/rect.h"
69 #include "url/gurl.h" 70 #include "url/gurl.h"
70 71
71 #if defined(OS_IOS) 72 #if defined(OS_IOS)
72 #include "components/autofill/core/browser/keyboard_accessory_metrics_logger.h" 73 #include "components/autofill/core/browser/keyboard_accessory_metrics_logger.h"
73 #endif 74 #endif
74 75
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 // Replace the suggestion content with a warning message explaining why 593 // Replace the suggestion content with a warning message explaining why
593 // Autofill is disabled for a website. 594 // Autofill is disabled for a website.
594 Suggestion warning_suggestion(l10n_util::GetStringUTF16( 595 Suggestion warning_suggestion(l10n_util::GetStringUTF16(
595 IDS_AUTOFILL_WARNING_INSECURE_CONNECTION)); 596 IDS_AUTOFILL_WARNING_INSECURE_CONNECTION));
596 warning_suggestion.frontend_id = 597 warning_suggestion.frontend_id =
597 POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE; 598 POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE;
598 suggestions.assign(1, warning_suggestion); 599 suggestions.assign(1, warning_suggestion);
599 600
600 // On top of the explanation message, first show a "Payment not secure" 601 // On top of the explanation message, first show a "Payment not secure"
601 // message. 602 // message.
602 if (IsCreditCardAutofillHttpWarningEnabled()) { 603 if (security_state::IsHttpWarningInFormEnabled()) {
603 #if !defined(OS_ANDROID) 604 #if !defined(OS_ANDROID)
604 suggestions.insert(suggestions.begin(), Suggestion()); 605 suggestions.insert(suggestions.begin(), Suggestion());
605 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR; 606 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR;
606 #endif 607 #endif
607 suggestions.insert(suggestions.begin(), 608 suggestions.insert(suggestions.begin(),
608 CreateHttpWarningMessageSuggestionItem( 609 CreateHttpWarningMessageSuggestionItem(
609 form_structure->source_url())); 610 form_structure->source_url()));
610 } 611 }
611 } else { 612 } else {
612 bool section_is_autofilled = 613 bool section_is_autofilled =
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 if (i > 0) 2132 if (i > 0)
2132 fputs("Next oldest form:\n", file); 2133 fputs("Next oldest form:\n", file);
2133 } 2134 }
2134 fputs("\n", file); 2135 fputs("\n", file);
2135 2136
2136 fclose(file); 2137 fclose(file);
2137 } 2138 }
2138 #endif // ENABLE_FORM_DEBUG_DUMP 2139 #endif // ENABLE_FORM_DEBUG_DUMP
2139 2140
2140 } // namespace autofill 2141 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698