| Index: ash/wm/power_button_controller.cc
|
| diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
|
| index 5d70803b134f82e10f7fd829e49349aaedc48a6b..5899b8a472675b02d1666dccbfb391b118a7f9a7 100644
|
| --- a/ash/wm/power_button_controller.cc
|
| +++ b/ash/wm/power_button_controller.cc
|
| @@ -145,12 +145,11 @@ void PowerButtonController::OnDisplayModeChanged(
|
| const ui::DisplayConfigurator::DisplayStateList& display_states) {
|
| bool internal_display_off = false;
|
| bool external_display_on = false;
|
| - for (size_t i = 0; i < display_states.size(); ++i) {
|
| - const ui::DisplayConfigurator::DisplayState& state = display_states[i];
|
| - if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
|
| - if (!state.display->current_mode())
|
| + for (const ui::DisplaySnapshot* display : display_states) {
|
| + if (display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
|
| + if (!display->current_mode())
|
| internal_display_off = true;
|
| - } else if (state.display->current_mode()) {
|
| + } else if (display->current_mode()) {
|
| external_display_on = true;
|
| }
|
| }
|
|
|