Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Issue 2799963003: Fix errors in display resolution change notifications (Closed)

Created:
3 years, 8 months ago by afakhry
Modified:
3 years, 8 months ago
Reviewers:
stevenjb, oshima, Devlin
CC:
chromium-reviews, dbeam+watch-options_chromium.org, chromium-apps-reviews_chromium.org, michaelpg+watch-options_chromium.org, oshima+watch_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix errors in display resolution change notifications We used to prepare the resolution change notification after we change the resolution by setting the mode. This resulted in erronous messages reporting wrong resolutions or even failures that didn't happen, when updating the displays (which triggers the actual creation of the notification) happens synchronously when SetDisplayMode() is called. This CL: - Makes sure that always the notification data is prepared first before the display mode is set. If the display mode change fails, the prepared notification data is discarded. - Makes sure updating the displays doesn't happen synchronously in SetDisplayMode() when there is a resolution change. BUG=701389 TEST=manually Review-Url: https://codereview.chromium.org/2799963003 Cr-Commit-Position: refs/heads/master@{#464607} Committed: https://chromium.googlesource.com/chromium/src/+/d5fd8d945a7e131d8dc9d64c6e6334f831d5cacc

Patch Set 1 #

Total comments: 2

Patch Set 2 : API change + prevent synchronous display update when resolution changes #

Patch Set 3 : Rebase + Fix crash #

Patch Set 4 : Fix compile errors on non-cros systems #

Total comments: 3

Patch Set 5 : Rebase on https://codereview.chromium.org/2810843003/ #

Patch Set 6 : Update commit message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -48 lines) Patch
M ash/display/resolution_notification_controller.h View 1 2 3 4 1 chunk +22 lines, -11 lines 0 comments Download
M ash/display/resolution_notification_controller.cc View 1 2 3 4 3 chunks +18 lines, -2 lines 0 comments Download
M ash/display/resolution_notification_controller_unittest.cc View 1 2 3 4 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/display/display_preferences_unittest.cc View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/display_info_provider_chromeos.cc View 1 2 3 4 1 chunk +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/display_options_handler.cc View 1 2 3 4 1 chunk +11 lines, -8 lines 0 comments Download
M ui/display/manager/display_manager.cc View 1 2 3 4 1 chunk +17 lines, -7 lines 0 comments Download

Messages

Total messages: 39 (25 generated)
afakhry
Steven, could you please take a look? Thanks!
3 years, 8 months ago (2017-04-06 21:23:06 UTC) #2
stevenjb
https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc File chrome/browser/extensions/display_info_provider_chromeos.cc (right): https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc#newcode347 chrome/browser/extensions/display_info_provider_chromeos.cc:347: // crbug.com/701389. This is all kind of awkward. It ...
3 years, 8 months ago (2017-04-06 22:10:53 UTC) #3
afakhry
https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc File chrome/browser/extensions/display_info_provider_chromeos.cc (right): https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc#newcode347 chrome/browser/extensions/display_info_provider_chromeos.cc:347: // crbug.com/701389. On 2017/04/06 22:10:53, stevenjb wrote: > This ...
3 years, 8 months ago (2017-04-07 00:04:58 UTC) #4
stevenjb
On 2017/04/07 00:04:58, afakhry wrote: > https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc > File chrome/browser/extensions/display_info_provider_chromeos.cc (right): > > https://codereview.chromium.org/2799963003/diff/1/chrome/browser/extensions/display_info_provider_chromeos.cc#newcode347 > ...
3 years, 8 months ago (2017-04-07 00:12:13 UTC) #5
afakhry
+Oshima-san. Please take a look at the display related changes. Thanks!
3 years, 8 months ago (2017-04-08 03:10:24 UTC) #15
stevenjb
https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h File ash/display/resolution_notification_controller.h (right): https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h#newcode61 ash/display/resolution_notification_controller.h:61: const base::Closure& accept_callback) WARN_UNUSED_RESULT; I like this change and ...
3 years, 8 months ago (2017-04-10 17:33:52 UTC) #22
oshima
lgtm https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h File ash/display/resolution_notification_controller.h (right): https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h#newcode61 ash/display/resolution_notification_controller.h:61: const base::Closure& accept_callback) WARN_UNUSED_RESULT; On 2017/04/10 17:33:52, stevenjb ...
3 years, 8 months ago (2017-04-10 17:46:18 UTC) #23
oshima
lgtm
3 years, 8 months ago (2017-04-10 17:46:19 UTC) #24
afakhry
https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h File ash/display/resolution_notification_controller.h (right): https://codereview.chromium.org/2799963003/diff/60001/ash/display/resolution_notification_controller.h#newcode61 ash/display/resolution_notification_controller.h:61: const base::Closure& accept_callback) WARN_UNUSED_RESULT; On 2017/04/10 17:46:18, oshima wrote: ...
3 years, 8 months ago (2017-04-10 23:26:21 UTC) #25
stevenjb
If oshima is OK with this as-is, lgtm. Maybe we can consider further cleanup in ...
3 years, 8 months ago (2017-04-10 23:33:43 UTC) #26
afakhry
Devlin for chrome/browser/extensions/display_info_provider_chromeos.cc. Thanks!
3 years, 8 months ago (2017-04-13 01:25:03 UTC) #32
Devlin
chrome/browser/extensions/display_info_provider_chromeos.cc lgtm
3 years, 8 months ago (2017-04-13 22:00:57 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799963003/100001
3 years, 8 months ago (2017-04-13 22:32:51 UTC) #36
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 23:35:06 UTC) #39
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/d5fd8d945a7e131d8dc9d64c6e63...

Powered by Google App Engine
This is Rietveld 408576698