Commit 036d8169 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Fix ApplicationBreadcrumbsLoggerTest.orientation in multiwindow

For an unknow reason, UIDevice orientation always returns unknown in
unittests when scenes are enabled.
Breadcrumbs ignore orientation when it is unknown in the first report.
This is a result of the class initialization.
But there is no real reason to ignore unknown as an histogram value
as it is a valid value.

Change-Id: Id33db23db1755907292e23bdd89e3d6379f303e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398660Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805709}
parent a7b84876
......@@ -52,10 +52,8 @@ class ApplicationBreadcrumbsLogger {
// Observes device orientation.
id<NSObject> orientation_observer_;
// Used to avoid logging the same orientation twice as well as logging
// UIDeviceOrientationUnknown on startup (the only place where "unknown"
// shows up). Fewer logs leave more room for more useful logs.
UIDeviceOrientation last_orientation_ = UIDeviceOrientationUnknown;
// Used to avoid logging the same orientation twice.
base::Optional<UIDeviceOrientation> last_orientation_;
};
#endif // IOS_CHROME_BROWSER_CRASH_REPORT_BREADCRUMBS_APPLICATION_BREADCRUMBS_LOGGER_H_
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