Commit 5e9770ac authored by Jinyoung Hur's avatar Jinyoung Hur Committed by Commit Bot

Add UMA for Firefox passwords import

This CL add the following UMA:
1. If password is selected by user when importing Firefox profiles.
2. How many passwords are imported from Firefox.

R=isherman@chromium.org, vabr@chromium.org

Bug: 776664
Change-Id: Ife7b1079502d4c4f0ebd2fb473bceb5feec7ddbc
Reviewed-on: https://chromium-review.googlesource.com/744061
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515407}
parent 8dc39741
...@@ -892,6 +892,7 @@ Jan Rucka <ruckajan10@gmail.com> ...@@ -892,6 +892,7 @@ Jan Rucka <ruckajan10@gmail.com>
Yannic Bonenberger <contact@yannic-bonenberger.com> Yannic Bonenberger <contact@yannic-bonenberger.com>
Kyoungdeok Kwon <kkd927@gmail.com> Kyoungdeok Kwon <kkd927@gmail.com>
Kyungyoung Heo <bbvch13531@gmail.com> Kyungyoung Heo <bbvch13531@gmail.com>
Jinyoung Hur <hurims@gmail.com>
ACCESS CO., LTD. <*@access-company.com> ACCESS CO., LTD. <*@access-company.com>
BlackBerry Limited <*@blackberry.com> BlackBerry Limited <*@blackberry.com>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -102,6 +103,9 @@ FirefoxImporter::~FirefoxImporter() { ...@@ -102,6 +103,9 @@ FirefoxImporter::~FirefoxImporter() {
void FirefoxImporter::StartImport(const importer::SourceProfile& source_profile, void FirefoxImporter::StartImport(const importer::SourceProfile& source_profile,
uint16_t items, uint16_t items,
ImporterBridge* bridge) { ImporterBridge* bridge) {
UMA_HISTOGRAM_BOOLEAN("Import.IncludesPasswords.Firefox",
!!(items & importer::PASSWORDS));
bridge_ = bridge; bridge_ = bridge;
source_path_ = source_profile.source_path; source_path_ = source_profile.source_path;
app_path_ = source_profile.app_path; app_path_ = source_profile.app_path;
...@@ -374,6 +378,8 @@ void FirefoxImporter::ImportPasswords() { ...@@ -374,6 +378,8 @@ void FirefoxImporter::ImportPasswords() {
} }
if (!cancelled()) { if (!cancelled()) {
UMA_HISTOGRAM_COUNTS_10000("Import.NumberOfImportedPasswords.Firefox",
forms.size());
for (size_t i = 0; i < forms.size(); ++i) { for (size_t i = 0; i < forms.size(); ++i) {
if (!forms[i].username_value.empty() || if (!forms[i].username_value.empty() ||
!forms[i].password_value.empty() || !forms[i].password_value.empty() ||
......
...@@ -28274,6 +28274,28 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -28274,6 +28274,28 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="Import.IncludesPasswords.Firefox" enum="BooleanChecked">
<owner>vabr@chromium.org</owner>
<owner>hurims@gmail.com</owner>
<summary>
Whether or not the password checkbox is checked when importing a profile of
Firefox. Note that canceled imports could be counted also.
</summary>
</histogram>
<histogram name="Import.NumberOfImportedPasswords.Firefox">
<owner>vabr@chromium.org</owner>
<owner>hurims@gmail.com</owner>
<summary>
The number of passwords that are imported from Firefox. This is recorded
when importing a profile of Firefox with the password checkbox checked. Note
that the reported number of password could be slightly bigger than the
actual number of imported passwords because some incomplete or blacklisted
passwords that are dropped while importing might be included in the reported
value.
</summary>
</histogram>
<histogram name="Import.ShowDialog.FromBookmarkBarView" units="seconds"> <histogram name="Import.ShowDialog.FromBookmarkBarView" units="seconds">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary> <summary>
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