Commit f350cfe2 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF] Adds password related histograms

Bug: 878388
Change-Id: Ia0a6622596753d87888e480401e38f7ef61ae539
Reviewed-on: https://chromium-review.googlesource.com/c/1326013Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606890}
parent 7e4f2a9f
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#import "ios/chrome/browser/ui/autofill/manual_fill/password_view_controller.h" #import "ios/chrome/browser/ui/autofill/manual_fill/password_view_controller.h"
#include "base/ios/ios_util.h" #include "base/ios/ios_util.h"
#include "base/metrics/histogram_macros.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/action_cell.h" #import "ios/chrome/browser/ui/autofill/manual_fill/action_cell.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.h" #import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.h"
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
...@@ -42,8 +43,10 @@ constexpr float PopoverMaxHeight = 250; ...@@ -42,8 +43,10 @@ constexpr float PopoverMaxHeight = 250;
} // namespace } // namespace
@interface PasswordViewController () @interface PasswordViewController ()
// Search controller if any. // Search controller if any.
@property(nonatomic, strong) UISearchController* searchController; @property(nonatomic, strong) UISearchController* searchController;
@end @end
@implementation PasswordViewController @implementation PasswordViewController
...@@ -114,6 +117,13 @@ constexpr float PopoverMaxHeight = 250; ...@@ -114,6 +117,13 @@ constexpr float PopoverMaxHeight = 250;
#pragma mark - ManualFillPasswordConsumer #pragma mark - ManualFillPasswordConsumer
- (void)presentCredentials:(NSArray<ManualFillCredentialItem*>*)credentials { - (void)presentCredentials:(NSArray<ManualFillCredentialItem*>*)credentials {
if (self.searchController) {
UMA_HISTOGRAM_COUNTS_1000("ManualFallback.PresentedOptions.AllPasswords",
credentials.count);
} else {
UMA_HISTOGRAM_COUNTS_100("ManualFallback.PresentedOptions.Passwords",
credentials.count);
}
[self presentItems:credentials inSection:CredentialsSectionIdentifier]; [self presentItems:credentials inSection:CredentialsSectionIdentifier];
} }
......
...@@ -42925,6 +42925,25 @@ uploading your change for review. ...@@ -42925,6 +42925,25 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="ManualFallback.PresentedOptions.AllPasswords"
units="Credentials" expires_after="2019-12-31">
<owner>javierrobles@chromium.org</owner>
<summary>
Tracks the number of credentials presented to the user in the &quot;Use
other password...&quot; view in Manual Fallback. This is logged everytime
the user opens this view.
</summary>
</histogram>
<histogram name="ManualFallback.PresentedOptions.Passwords" units="Credentials"
expires_after="2019-12-31">
<owner>javierrobles@chromium.org</owner>
<summary>
Tracks the number of credentials presented to the user in the Passwords
Manual Fallback view. This is logged everytime the user opens this view.
</summary>
</histogram>
<histogram name="Media.AcceleratedCompositingActive" enum="BooleanSuccess"> <histogram name="Media.AcceleratedCompositingActive" enum="BooleanSuccess">
<obsolete> <obsolete>
Deprecated as of July 21, 2014. Deprecated as of July 21, 2014.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment