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" |
(...skipping 12 matching lines...) Expand all Loading... | |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 namespace chrome { | 26 namespace chrome { |
27 | 27 |
28 void RegisterBrowserViewLocalPrefs(PrefRegistrySimple* registry) { | 28 void RegisterBrowserViewLocalPrefs(PrefRegistrySimple* registry) { |
29 registry->RegisterIntegerPref(kTabStripLayoutType, 0); | 29 registry->RegisterIntegerPref(kTabStripLayoutType, 0); |
30 registry->RegisterBooleanPref(prefs::kTabStripStackedLayout, false); | 30 registry->RegisterBooleanPref(prefs::kTabStripStackedLayout, false); |
31 } | 31 } |
32 | 32 |
33 void RegisterBrowserViewProfilePrefs( | 33 void RegisterBrowserViewProfilePrefs( |
Matt Giuca
2016/06/08 01:29:03
Just to be clear (for my own benefit): this means
Peter Kasting
2016/06/09 19:49:31
Yes.
Matt Giuca
2016/06/10 01:07:05
Acknowledged.
| |
34 user_prefs::PrefRegistrySyncable* registry) { | 34 user_prefs::PrefRegistrySyncable* registry) { |
35 bool custom_frame_default = false; | 35 bool custom_frame_default = false; |
36 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 36 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
37 custom_frame_default = ui::GetCustomFramePrefDefault(); | 37 custom_frame_default = ui::GetCustomFramePrefDefault(); |
38 #endif | 38 #endif |
39 | |
40 registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, | 39 registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, |
Matt Giuca
2016/06/08 01:29:03
nit: Any reason to delete the above line? If anyth
Peter Kasting
2016/06/09 19:49:31
The code above is closely tied to this line: it's
Matt Giuca
2016/06/10 01:07:05
Acknowledged.
| |
41 custom_frame_default); | 40 custom_frame_default); |
41 | |
42 registry->RegisterIntegerPref(prefs::kBackShortcutBubbleShownCount, 0); | |
Matt Giuca
2016/06/08 01:29:03
I think we should have separate counters for the B
Peter Kasting
2016/06/09 19:49:31
My instinct is that one counter for both is the wa
Matt Giuca
2016/06/10 01:07:05
Not particularly :)
| |
42 } | 43 } |
43 | 44 |
44 void MigrateBrowserTabStripPrefs(PrefService* prefs) { | 45 void MigrateBrowserTabStripPrefs(PrefService* prefs) { |
45 if (prefs->HasPrefPath(kTabStripLayoutType)) { | 46 if (prefs->HasPrefPath(kTabStripLayoutType)) { |
46 prefs->SetBoolean(prefs::kTabStripStackedLayout, | 47 prefs->SetBoolean(prefs::kTabStripStackedLayout, |
47 prefs->GetInteger(kTabStripLayoutType) != 0); | 48 prefs->GetInteger(kTabStripLayoutType) != 0); |
48 prefs->ClearPref(kTabStripLayoutType); | 49 prefs->ClearPref(kTabStripLayoutType); |
49 } | 50 } |
50 } | 51 } |
51 | 52 |
52 } // namespace chrome | 53 } // namespace chrome |
OLD | NEW |