OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/browser_view_prefs.h" | 5 #include "chrome/browser/ui/browser_view_prefs.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
9 #include "components/pref_registry/pref_registry_syncable.h" | 9 #include "components/pref_registry/pref_registry_syncable.h" |
10 #include "components/prefs/pref_registry_simple.h" | 10 #include "components/prefs/pref_registry_simple.h" |
11 #include "components/prefs/pref_service.h" | 11 #include "components/prefs/pref_service.h" |
12 | 12 |
13 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 13 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
14 #include "ui/base/x/x11_util.h" | 14 #include "ui/base/x/x11_util.h" // nogncheck |
15 #endif | 15 #endif |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // DEPRECATED: this is replaced by kTabStripStackedLayout and exists for | 19 // DEPRECATED: this is replaced by kTabStripStackedLayout and exists for |
20 // backwards compatibility. | 20 // backwards compatibility. |
21 // Old values: 0 = SHRINK (default), 1 = STACKED. | 21 // Old values: 0 = SHRINK (default), 1 = STACKED. |
22 const char kTabStripLayoutType[] = "tab_strip_layout_type"; | 22 const char kTabStripLayoutType[] = "tab_strip_layout_type"; |
23 | 23 |
24 } // namespace | 24 } // namespace |
(...skipping 19 matching lines...) Expand all Loading... |
44 | 44 |
45 void MigrateBrowserTabStripPrefs(PrefService* prefs) { | 45 void MigrateBrowserTabStripPrefs(PrefService* prefs) { |
46 if (prefs->HasPrefPath(kTabStripLayoutType)) { | 46 if (prefs->HasPrefPath(kTabStripLayoutType)) { |
47 prefs->SetBoolean(prefs::kTabStripStackedLayout, | 47 prefs->SetBoolean(prefs::kTabStripStackedLayout, |
48 prefs->GetInteger(kTabStripLayoutType) != 0); | 48 prefs->GetInteger(kTabStripLayoutType) != 0); |
49 prefs->ClearPref(kTabStripLayoutType); | 49 prefs->ClearPref(kTabStripLayoutType); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 } // namespace chrome | 53 } // namespace chrome |
OLD | NEW |