| Index: ui/file_manager/file_manager/common/js/metrics_events.js
|
| diff --git a/ui/file_manager/file_manager/common/js/metrics_events.js b/ui/file_manager/file_manager/common/js/metrics_events.js
|
| index 5b3bdbeb46b1cd54630af0825252de2608dcef5b..a25dc1e9b774593c1f407555dee1116c347e2b59 100644
|
| --- a/ui/file_manager/file_manager/common/js/metrics_events.js
|
| +++ b/ui/file_manager/file_manager/common/js/metrics_events.js
|
| @@ -18,7 +18,8 @@ var metrics = metrics || metricsBase;
|
|
|
| /** @enum {string} */
|
| metrics.Categories = {
|
| - ACQUISITION: 'Acquisition'
|
| + ACQUISITION: 'Acquisition',
|
| + INTERNALS: 'Internals'
|
| };
|
|
|
| /**
|
| @@ -32,6 +33,32 @@ metrics.Dimension_ = {
|
| };
|
|
|
| /**
|
| + * Enumeration of known FSPs used to qualify "provided" extensions
|
| + * "screens" on analytics. All FSPs NOT present in this list
|
| + * will be reported to analytics as 'provided-unknown'.
|
| + *
|
| + * NOTE: When an unknown provider is encountered, a separate event will be
|
| + * sent to analytics with the id. Consulation of that event will provided
|
| + * an indication when an extension is popular enough to be added to the
|
| + * whitelist.
|
| + *
|
| + * @enum {string}
|
| + */
|
| +metrics.FileSystemProviders = {
|
| + oedeeodfidgoollimchfdnbmhcpnklnd: 'ZipUnpacker'
|
| +};
|
| +
|
| +/**
|
| + * Returns a new "screen" name for a provided file system type.
|
| + * @param {string|undefined} extensionId The FSP provider extension ID.
|
| + * @param {string} defaultName
|
| + * @return {string} Name or undefined if extension is unrecognized.
|
| + */
|
| +metrics.getFileSystemProviderName = function(extensionId, defaultName) {
|
| + return metrics.FileSystemProviders[extensionId] || defaultName;
|
| +};
|
| +
|
| +/**
|
| * @enum {!analytics.EventBuilder.Dimension}
|
| */
|
| metrics.Dimensions = {
|
| @@ -70,12 +97,12 @@ metrics.event = metrics.event || {};
|
| */
|
| metrics.event.Builders_ = {
|
| IMPORT: analytics.EventBuilder.builder()
|
| - .category(metrics.Categories.ACQUISITION)
|
| + .category(metrics.Categories.ACQUISITION),
|
| + INTERNALS: analytics.EventBuilder.builder()
|
| + .category(metrics.Categories.INTERNALS)
|
| };
|
|
|
| -/**
|
| - * @enum {!analytics.EventBuilder}
|
| - */
|
| +/** @enum {!analytics.EventBuilder} */
|
| metrics.ImportEvents = {
|
| DEVICE_YANKED: metrics.event.Builders_.IMPORT
|
| .action('Device Yanked'),
|
| @@ -104,6 +131,12 @@ metrics.ImportEvents = {
|
| .dimension(metrics.Dimensions.CONSUMER_TYPE_IMPORTER)
|
| };
|
|
|
| +/** @enum {!analytics.EventBuilder} */
|
| +metrics.Internals = {
|
| + UNRECOGNIZED_FILE_SYSTEM_PROVIDER: metrics.event.Builders_.INTERNALS
|
| + .action('Unrecognized File System Provider')
|
| +};
|
| +
|
| // namespace
|
| metrics.timing = metrics.timing || {};
|
|
|
|
|