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

Unified Diff: chrome/browser/chromeos/display/display_preferences.cc

Issue 1638413007: Use list instead of pair to represent the set of displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build error Created 4 years, 11 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
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 fe969f66477a24ff06a37d4c37b97681abbf0d49..e6cb81306f14f0caedb80fc0a56cc8c468ad2322 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -134,7 +134,7 @@ void LoadDisplayLayouts() {
id2 == gfx::Display::kInvalidDisplayID) {
continue;
}
- layout_store->RegisterLayoutForDisplayIdPair(id1, id2, layout);
+ layout_store->RegisterLayoutForDisplayIdList(id1, id2, layout);
}
}
}
@@ -210,10 +210,9 @@ void LoadDisplayRotationState() {
static_cast<gfx::Display::Rotation>(rotation));
}
-void StoreDisplayLayoutPref(const ash::DisplayIdPair& pair,
+void StoreDisplayLayoutPref(const ash::DisplayIdList& list,
const ash::DisplayLayout& display_layout) {
- std::string name =
- base::Int64ToString(pair.first) + "," + base::Int64ToString(pair.second);
+ std::string name = ash::DisplayIdListToString(list);
PrefService* local_state = g_browser_process->local_state();
DictionaryPrefUpdate update(local_state, prefs::kSecondaryDisplays);
@@ -235,7 +234,7 @@ void StoreCurrentDisplayLayoutPrefs() {
return;
}
- ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair();
+ ash::DisplayIdList pair = display_manager->GetCurrentDisplayIdList();
ash::DisplayLayout display_layout =
display_manager->layout_store()->GetRegisteredDisplayLayout(pair);
StoreDisplayLayoutPref(pair, display_layout);
@@ -393,7 +392,7 @@ void LoadDisplayPreferences(bool first_run_after_boot) {
void StoreDisplayLayoutPrefForTest(int64_t id1,
int64_t id2,
const ash::DisplayLayout& layout) {
- StoreDisplayLayoutPref(ash::CreateDisplayIdPair(id1, id2), layout);
+ StoreDisplayLayoutPref(ash::CreateDisplayIdList(id1, id2), layout);
}
// Stores the given |power_state|.

Powered by Google App Engine
This is Rietveld 408576698