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

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

Issue 1808253004: Refactor JSONValueConverter Out of DisplayLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up some Includes 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
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 e9d21c78bca0fb8f4accbc957437aa96acef65c3..bb2a063177e6b107edbd039e57cb4ae27053bd21 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -10,6 +10,7 @@
#include "ash/display/display_manager.h"
#include "ash/display/display_pref_util.h"
#include "ash/display/display_util.h"
+#include "ash/display/json_converter.h"
#include "ash/shell.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
@@ -118,7 +119,7 @@ void LoadDisplayLayouts() {
for (base::DictionaryValue::Iterator it(*layouts);
!it.IsAtEnd(); it.Advance()) {
scoped_ptr<ash::DisplayLayout> layout(new ash::DisplayLayout);
- if (!ash::DisplayLayout::ConvertFromValue(it.value(), layout.get())) {
+ if (!ash::JsonToDisplayLayout(it.value(), layout.get())) {
LOG(WARNING) << "Invalid preference value for " << it.key();
continue;
}
@@ -226,7 +227,7 @@ void StoreDisplayLayoutPref(const ash::DisplayIdList& list,
if (pref_data->Get(name, &value) && value != nullptr)
layout_value.reset(value->DeepCopy());
}
- if (ash::DisplayLayout::ConvertToValue(display_layout, layout_value.get()))
+ if (ash::DisplayLayoutToJson(display_layout, layout_value.get()))
pref_data->Set(name, layout_value.release());
}
« no previous file with comments | « ash/display/json_converter_unittest.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698