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

Unified Diff: components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm

Issue 1446473002: Enable compilation of //components/autofill on iOS with gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@os_crypt
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm
diff --git a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm b/components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm
deleted file mode 100644
index 9f4bb781681a014f071f702f72f30e9de1477aa5..0000000000000000000000000000000000000000
--- a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "components/autofill/ios/browser/keyboard_accessory_metrics_logger.h"
-
-#import <UIKit/UIKit.h>
-
-#include "base/logging.h"
-#include "base/metrics/histogram_macros.h"
-
-namespace autofill {
-
-namespace {
-
-void Log(KeyboardAccessoryMetricsLogger::ButtonMetric metric) {
- DCHECK_LT(metric, KeyboardAccessoryMetricsLogger::NUM_BUTTON_METRICS);
- if (UIAccessibilityIsVoiceOverRunning()) {
- UMA_HISTOGRAM_ENUMERATION(
- "Autofill.KeyboardAccessoryButtonsIOS_ScreenReaderOn", metric,
- KeyboardAccessoryMetricsLogger::NUM_BUTTON_METRICS);
- } else {
- UMA_HISTOGRAM_ENUMERATION(
- "Autofill.KeyboardAccessoryButtonsIOS_ScreenReaderOff", metric,
- KeyboardAccessoryMetricsLogger::NUM_BUTTON_METRICS);
- }
-}
-
-} // namespace
-
-KeyboardAccessoryMetricsLogger::KeyboardAccessoryMetricsLogger()
- : has_logged_close_button_(false),
- has_logged_next_button_(false),
- has_logged_previous_button_(false) {}
-
-// static
-void KeyboardAccessoryMetricsLogger::OnFormsLoaded() {
- Log(FORMS_LOADED);
-}
-
-// static
-void KeyboardAccessoryMetricsLogger::OnFormSubmitted() {
- Log(SUBMITTED_FORM);
-}
-
-void KeyboardAccessoryMetricsLogger::OnCloseButtonPressed() {
- Log(CLOSE_BUTTON_PRESSED);
- if (!has_logged_close_button_) {
- has_logged_close_button_ = true;
- Log(CLOSE_BUTTON_PRESSED_ONCE);
- }
-}
-
-void KeyboardAccessoryMetricsLogger::OnNextButtonPressed() {
- Log(NEXT_BUTTON_PRESSED);
- if (!has_logged_next_button_) {
- has_logged_next_button_ = true;
- Log(NEXT_BUTTON_PRESSED_ONCE);
- }
-}
-
-void KeyboardAccessoryMetricsLogger::OnPreviousButtonPressed() {
- Log(PREVIOUS_BUTTON_PRESSED);
- if (!has_logged_previous_button_) {
- has_logged_previous_button_ = true;
- Log(PREVIOUS_BUTTON_PRESSED_ONCE);
- }
-}
-
-} // namespace autofill
« no previous file with comments | « components/autofill/ios/browser/keyboard_accessory_metrics_logger.h ('k') | components/password_manager/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698