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

Unified Diff: chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc

Issue 2228713003: mash: Convert ShelfView to wm common types, clean up Shelf access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix control reaches end of non-void function warnings Created 4 years, 4 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/ui/webui/chromeos/first_run/first_run_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
index 03e50bc18cc5652c7a09226979d48485ee2f504e..f7654dd45790984d3de9addb222d335af768ae46 100644
--- a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
@@ -61,9 +61,19 @@ void SetLocalizedStrings(base::DictionaryValue* localized_strings) {
"transitionsEnabled",
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableFirstRunUITransitions));
- const std::string& shelf_alignment =
- ash::Shelf::ForPrimaryDisplay()->SelectValueForShelfAlignment(
- kShelfAlignmentBottom, kShelfAlignmentLeft, kShelfAlignmentRight);
+ std::string shelf_alignment;
+ switch (ash::Shelf::ForPrimaryDisplay()->alignment()) {
+ case ash::SHELF_ALIGNMENT_BOTTOM:
+ case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED:
+ shelf_alignment = kShelfAlignmentBottom;
+ break;
+ case ash::SHELF_ALIGNMENT_LEFT:
+ shelf_alignment = kShelfAlignmentLeft;
+ break;
+ case ash::SHELF_ALIGNMENT_RIGHT:
+ shelf_alignment = kShelfAlignmentRight;
+ break;
+ }
localized_strings->SetString("shelfAlignment", shelf_alignment);
}

Powered by Google App Engine
This is Rietveld 408576698