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

Side by Side Diff: chrome/browser/ui/browser_view_prefs.cc

Issue 291093005: Removes --enable-stacked-tab-strip flag (Stacked Tabs) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes --enable-stacked-tab-strip flag (removed stale header) Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_view_prefs.h ('k') | chrome/browser/ui/tabs/tab_strip_layout_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h"
8 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
9 #include "components/pref_registry/pref_registry_syncable.h" 10 #include "components/pref_registry/pref_registry_syncable.h"
10 11
11 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 12 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
12 #include "ui/base/x/x11_util.h" 13 #include "ui/base/x/x11_util.h"
13 #endif 14 #endif
14 15
15 namespace { 16 namespace {
16 17
17 // How long do we wait before we consider a window hung (in ms). 18 // How long do we wait before we consider a window hung (in ms).
18 const int kDefaultPluginMessageResponseTimeout = 25000; 19 const int kDefaultPluginMessageResponseTimeout = 25000;
19 20
20 // How frequently we check for hung plugin windows. 21 // How frequently we check for hung plugin windows.
21 const int kDefaultHungPluginDetectFrequency = 2000; 22 const int kDefaultHungPluginDetectFrequency = 2000;
22 23
24 // DEPRECATED: this is replaced by kTabStripStackedLayout and exists for
25 // backwards compatibility.
26 // Old values: 0 = SHRINK (default), 1 = STACKED.
27 const char kTabStripLayoutType[] = "tab_strip_layout_type";
28
23 } // namespace 29 } // namespace
24 30
25 namespace chrome { 31 namespace chrome {
26 32
27 void RegisterBrowserViewLocalPrefs(PrefRegistrySimple* registry) { 33 void RegisterBrowserViewLocalPrefs(PrefRegistrySimple* registry) {
28 registry->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout, 34 registry->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout,
29 kDefaultPluginMessageResponseTimeout); 35 kDefaultPluginMessageResponseTimeout);
30 registry->RegisterIntegerPref(prefs::kHungPluginDetectFrequency, 36 registry->RegisterIntegerPref(prefs::kHungPluginDetectFrequency,
31 kDefaultHungPluginDetectFrequency); 37 kDefaultHungPluginDetectFrequency);
38 registry->RegisterIntegerPref(kTabStripLayoutType, 0);
39 registry->RegisterBooleanPref(prefs::kTabStripStackedLayout, false);
32 } 40 }
33 41
34 void RegisterBrowserViewProfilePrefs( 42 void RegisterBrowserViewProfilePrefs(
35 user_prefs::PrefRegistrySyncable* registry) { 43 user_prefs::PrefRegistrySyncable* registry) {
36 bool custom_frame_default = false; 44 bool custom_frame_default = false;
37 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 45 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
38 custom_frame_default = ui::GetCustomFramePrefDefault(); 46 custom_frame_default = ui::GetCustomFramePrefDefault();
39 #endif 47 #endif
40 48
41 registry->RegisterBooleanPref( 49 registry->RegisterBooleanPref(
42 prefs::kUseCustomChromeFrame, 50 prefs::kUseCustomChromeFrame,
43 custom_frame_default, 51 custom_frame_default,
44 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 52 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
45 } 53 }
46 54
55 void MigrateBrowserTabStripPrefs(PrefService* prefs) {
56 if (prefs->HasPrefPath(kTabStripLayoutType)) {
57 prefs->SetBoolean(prefs::kTabStripStackedLayout,
58 prefs->GetInteger(kTabStripLayoutType) != 0);
59 prefs->ClearPref(kTabStripLayoutType);
60 }
61 }
62
47 } // namespace chrome 63 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_view_prefs.h ('k') | chrome/browser/ui/tabs/tab_strip_layout_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698