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

Unified Diff: ash/display/display_layout_store.cc

Issue 1823913002: Allow moving cursors between connected displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/display/display_manager_unittest.cc » ('j') | ash/display/display_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_layout_store.cc
diff --git a/ash/display/display_layout_store.cc b/ash/display/display_layout_store.cc
index 1deb3a4d67b8202f08f2c4d4df5e773e7a6061ce..faec7abe2ccc287fa14808d307d399634a3dddba 100644
--- a/ash/display/display_layout_store.cc
+++ b/ash/display/display_layout_store.cc
@@ -50,6 +50,10 @@ void DisplayLayoutStore::SetDefaultDisplayPlacement(
void DisplayLayoutStore::RegisterLayoutForDisplayIdList(
const DisplayIdList& list,
scoped_ptr<DisplayLayout> layout) {
+ // A dev/beta channel may have a bad layout data saved in local state.
stevenjb 2016/03/24 18:08:29 nit: s/a bad/bad/
oshima 2016/03/24 20:37:19 Done.
+ // TODO(oshima): Consider removing this a coulpe of milestones later.
stevenjb 2016/03/24 18:08:29 nit: /a couple of milestones later/after M52/ (or
oshima 2016/03/24 20:37:19 Done.
+ if (list.size() == 2 && layout->placement_list.size() > 1)
+ return;
// Do not overwrite the valid data with old invalid date.
if (layouts_.count(list) && !CompareDisplayIds(list[0], list[1]))
@@ -67,7 +71,9 @@ void DisplayLayoutStore::RegisterLayoutForDisplayIdList(
layout->placement_list[0].parent_display_id = list[0];
}
}
- DCHECK(DisplayLayout::Validate(list, *layout.get())) << layout->ToString();
+ DCHECK(DisplayLayout::Validate(list, *layout.get()))
+ << "ids=" << DisplayIdListToString(list)
+ << ", layout=" << layout->ToString();
layouts_[list] = std::move(layout);
}
« no previous file with comments | « no previous file | ash/display/display_manager_unittest.cc » ('j') | ash/display/display_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698