We are adding a SafeDialDeviceDescriptionParser to parse device description xml in utility process. We would like to add an enum describing the reason why parsing failed, and probably want to add an UMA histogram tracking failure reasons. Code review comments from: https://codereview.chromium.org/2745653008/diff/60001/chrome/browser/media/router/discovery/safe_dial_device_description_parser.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8021f6deda694196c9f527dfd2c65e39d3c6c4df commit 8021f6deda694196c9f527dfd2c65e39d3c6c4df Author: Bin Zhao <zhaobin@chromium.org> Date: Wed Jul 26 22:09:08 2017 [Media Router] Record why utility process fails to parse DIAL device description - Remove validation in utility process and pass invalid device description object to browser - Move ErrorType in device_description_service.cc to media_router_metrics.h - Add MediaRouterMetrics::RecordDialParsingError() function, update histograms.xml and enums.xml Bug: 702766 Change-Id: Ic684f1a644e97b0dd0cc824c35fd45b3a7d3b853 Reviewed-on: https://chromium-review.googlesource.com/578190 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Robert Kaplow <rkaplow@chromium.org> Reviewed-by: Takumi Fujimoto <takumif@chromium.org> Reviewed-by: Derek Cheng <imcheng@chromium.org> Commit-Queue: Bin Zhao <zhaobin@chromium.org> Cr-Commit-Position: refs/heads/master@{#489773} [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/discovery/dial/device_description_service.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/discovery/dial/device_description_service.h [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser.h [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/media_router_metrics.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/media_router_metrics.h [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/browser/media/router/media_router_metrics_unittest.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/common/media_router/mojo/dial_device_description_parser.mojom [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/utility/media_router/dial_device_description_parser_impl.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/utility/media_router/dial_device_description_parser_impl.h [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/chrome/utility/media_router/dial_device_description_parser_impl_unittest.cc [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/tools/metrics/histograms/enums.xml [modify] https://crrev.com/8021f6deda694196c9f527dfd2c65e39d3c6c4df/tools/metrics/histograms/histograms.xml
Comment 1 by sko...@chromium.org
, Apr 19 2017