Commit f52470bf authored by Eugene But's avatar Eugene But Committed by Commit Bot

Updated Download.IOSDownloadedFileAction histogram value name and comments.

iOS apps are not notified if the user opened a file in Extension via
Open In.. menu. So the old metric name (No action) was not correct,
because this value was reported if the user discarded download or opened
in extension.

This CL renames the enum and histogram values to "No action or opened
via extension".

Bug: 791806
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I6eea112f9016a46a3a91d094e4dd1b1364b20c2e
Reviewed-on: https://chromium-review.googlesource.com/986714
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547523}
parent 39d5daaa
...@@ -13,8 +13,9 @@ enum class DownloadedFileAction { ...@@ -13,8 +13,9 @@ enum class DownloadedFileAction {
// Downloaded file was open in the app other than Google Drive. // Downloaded file was open in the app other than Google Drive.
OpenedInOtherApp = 1, OpenedInOtherApp = 1,
// Downloaded file was discarded (the user closed the app, tab, or download // Downloaded file was discarded (the user closed the app, tab, or download
// manager UI). // manager UI) or opened via Extension (Chrome is not notified if the download
NoAction = 2, // was open in the extension).
NoActionOrOpenedViaExtension = 2,
Count, Count,
}; };
......
...@@ -67,9 +67,10 @@ class UnopenedDownloadsTracker : public web::DownloadTaskObserver { ...@@ -67,9 +67,10 @@ class UnopenedDownloadsTracker : public web::DownloadTaskObserver {
} }
if (task->IsDone() && task->GetErrorCode() == net::OK) { if (task->IsDone() && task->GetErrorCode() == net::OK) {
UMA_HISTOGRAM_ENUMERATION("Download.IOSDownloadedFileAction", UMA_HISTOGRAM_ENUMERATION(
DownloadedFileAction::NoAction, "Download.IOSDownloadedFileAction",
DownloadedFileAction::Count); DownloadedFileAction::NoActionOrOpenedViaExtension,
DownloadedFileAction::Count);
} }
} }
}; };
......
...@@ -418,7 +418,8 @@ TEST_F(DownloadManagerCoordinatorTest, OpenIn) { ...@@ -418,7 +418,8 @@ TEST_F(DownloadManagerCoordinatorTest, OpenIn) {
1); 1);
histogram_tester_.ExpectUniqueSample( histogram_tester_.ExpectUniqueSample(
"Download.IOSDownloadedFileAction", "Download.IOSDownloadedFileAction",
static_cast<base::HistogramBase::Sample>(DownloadedFileAction::NoAction), static_cast<base::HistogramBase::Sample>(
DownloadedFileAction::NoActionOrOpenedViaExtension),
1); 1);
} }
......
...@@ -9983,7 +9983,7 @@ Called by update_net_error_codes.py.--> ...@@ -9983,7 +9983,7 @@ Called by update_net_error_codes.py.-->
<enum name="DownloadedFileAction"> <enum name="DownloadedFileAction">
<int value="0" label="Opened in Drive"/> <int value="0" label="Opened in Drive"/>
<int value="1" label="Opened in another app"/> <int value="1" label="Opened in another app"/>
<int value="2" label="No action"/> <int value="2" label="No action or opened via extension"/>
</enum> </enum>
<enum name="DownloadFilePickerResult"> <enum name="DownloadFilePickerResult">
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