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

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

Issue 2665313002: Add a counter for clicking on Form-Not-Secure warnings (Closed)
Patch Set: rebase fixup again Created 3 years, 10 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_external_delegate.h" 5 #include "components/autofill/core/browser/autofill_external_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } else if (identifier == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY) { 223 } else if (identifier == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY) {
224 // User selected an Autocomplete, so we fill directly. 224 // User selected an Autocomplete, so we fill directly.
225 driver_->RendererShouldFillFieldWithValue(value); 225 driver_->RendererShouldFillFieldWithValue(value);
226 AutofillMetrics::LogAutocompleteSuggestionAcceptedIndex(position); 226 AutofillMetrics::LogAutocompleteSuggestionAcceptedIndex(position);
227 } else if (identifier == POPUP_ITEM_ID_SCAN_CREDIT_CARD) { 227 } else if (identifier == POPUP_ITEM_ID_SCAN_CREDIT_CARD) {
228 manager_->client()->ScanCreditCard(base::Bind( 228 manager_->client()->ScanCreditCard(base::Bind(
229 &AutofillExternalDelegate::OnCreditCardScanned, GetWeakPtr())); 229 &AutofillExternalDelegate::OnCreditCardScanned, GetWeakPtr()));
230 } else if (identifier == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) { 230 } else if (identifier == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) {
231 manager_->client()->StartSigninFlow(); 231 manager_->client()->StartSigninFlow();
232 } else if (identifier == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) { 232 } else if (identifier == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) {
233 AutofillMetrics::LogShowedHttpNotSecureExplanation();
233 manager_->client()->ShowHttpNotSecureExplanation(); 234 manager_->client()->ShowHttpNotSecureExplanation();
234 } else { 235 } else {
235 if (identifier > 0) // Denotes an Autofill suggestion. 236 if (identifier > 0) // Denotes an Autofill suggestion.
236 AutofillMetrics::LogAutofillSuggestionAcceptedIndex(position); 237 AutofillMetrics::LogAutofillSuggestionAcceptedIndex(position);
237 238
238 FillAutofillFormData(identifier, false); 239 FillAutofillFormData(identifier, false);
239 } 240 }
240 241
241 if (should_show_scan_credit_card_) { 242 if (should_show_scan_credit_card_) {
242 AutofillMetrics::LogScanCreditCardPromptMetric( 243 AutofillMetrics::LogScanCreditCardPromptMetric(
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const { 390 const {
390 if (IsKeyboardAccessoryEnabled()) { 391 if (IsKeyboardAccessoryEnabled()) {
391 return l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION); 392 return l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION);
392 } 393 }
393 return l10n_util::GetStringUTF16(is_credit_card_popup_ ? 394 return l10n_util::GetStringUTF16(is_credit_card_popup_ ?
394 IDS_AUTOFILL_CREDIT_CARD_OPTIONS_POPUP : 395 IDS_AUTOFILL_CREDIT_CARD_OPTIONS_POPUP :
395 IDS_AUTOFILL_OPTIONS_POPUP); 396 IDS_AUTOFILL_OPTIONS_POPUP);
396 } 397 }
397 398
398 } // namespace autofill 399 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698