| Index: chrome/browser/chromeos/display/display_preferences.cc
|
| diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
|
| index c6175250be6380c485d7671d25c612f86863555b..4beac908b985c2208c833d42d8c60d080f6c6f1c 100644
|
| --- a/chrome/browser/chromeos/display/display_preferences.cc
|
| +++ b/chrome/browser/chromeos/display/display_preferences.cc
|
| @@ -328,6 +328,15 @@ void StoreCurrentDisplayLayoutPrefs() {
|
| display::DisplayIdList list = display_manager->GetCurrentDisplayIdList();
|
| const display::DisplayLayout& display_layout =
|
| display_manager->layout_store()->GetRegisteredDisplayLayout(list);
|
| +
|
| + if (!display::DisplayLayout::Validate(list, display_layout)) {
|
| + // We should never apply an invalid layout, if we do, it persists and the
|
| + // user has no way of fixing it except by deleting the local state.
|
| + LOG(ERROR) << "Attempting to store an invalid display layout in the local"
|
| + << " state. Skipping.";
|
| + return;
|
| + }
|
| +
|
| StoreDisplayLayoutPref(list, display_layout);
|
| }
|
|
|
|
|