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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 10987005: Autohide behavior simplified to always/never (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « chrome/browser/ui/ash/chrome_launcher_prefs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index db97d8b5e76936eda7682006b63950ef0c46d6e3..11a9368472060f0b6289b474ae37046148904286 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -482,9 +482,6 @@ void ChromeLauncherController::SetAutoHideBehavior(
ash::Shell::GetInstance()->SetShelfAutoHideBehavior(behavior);
const char* value = NULL;
switch (behavior) {
- case ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT:
- value = ash::kShelfAutoHideBehaviorDefault;
- break;
case ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS:
value = ash::kShelfAutoHideBehaviorAlways;
break;
@@ -852,13 +849,16 @@ void ChromeLauncherController::UpdateAppLaunchersFromPref() {
}
void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() {
+ // Note: To maintain sync compatibility with old images of chrome/chromeos
+ // the set of values that may be encountered includes the now-extinct
+ // "Default" as well as "Never" and "Always", "Default" should now
+ // be treated as "Never".
+ // (http://code.google.com/p/chromium/issues/detail?id=146773)
const std::string behavior_value(
profile_->GetPrefs()->GetString(prefs::kShelfAutoHideBehavior));
ash::ShelfAutoHideBehavior behavior =
- ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT;
- if (behavior_value == ash::kShelfAutoHideBehaviorNever)
- behavior = ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
- else if (behavior_value == ash::kShelfAutoHideBehaviorAlways)
+ ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
+ if (behavior_value == ash::kShelfAutoHideBehaviorAlways)
behavior = ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
ash::Shell::GetInstance()->SetShelfAutoHideBehavior(behavior);
}
« no previous file with comments | « chrome/browser/ui/ash/chrome_launcher_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698