OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/labs.h" | 5 #include "chrome/browser/labs.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 kOsWin, | 67 kOsWin, |
68 switches::kEnableVerticalTabs | 68 switches::kEnableVerticalTabs |
69 }, | 69 }, |
70 { | 70 { |
71 "tabbed-options", // Do not change; see above. | 71 "tabbed-options", // Do not change; see above. |
72 IDS_LABS_TABBED_OPTIONS_NAME, | 72 IDS_LABS_TABBED_OPTIONS_NAME, |
73 IDS_LABS_TABBED_OPTIONS_DESCRIPTION, | 73 IDS_LABS_TABBED_OPTIONS_DESCRIPTION, |
74 kOsAll, | 74 kOsAll, |
75 switches::kEnableTabbedOptions | 75 switches::kEnableTabbedOptions |
76 }, | 76 }, |
| 77 { |
| 78 "match-preview", // Do not change; see above. |
| 79 IDS_LABS_INSTANT_NAME, |
| 80 IDS_LABS_INSTANT_DESCRIPTION, |
| 81 kOsWin, |
| 82 switches::kEnableMatchPreview |
| 83 }, |
77 }; | 84 }; |
78 | 85 |
79 // Extracts the list of enabled lab experiments from a profile and stores them | 86 // Extracts the list of enabled lab experiments from a profile and stores them |
80 // in a set. | 87 // in a set. |
81 void GetEnabledLabs(const PrefService* prefs, std::set<std::string>* result) { | 88 void GetEnabledLabs(const PrefService* prefs, std::set<std::string>* result) { |
82 const ListValue* enabled_experiments = prefs->GetList( | 89 const ListValue* enabled_experiments = prefs->GetList( |
83 prefs::kEnabledLabsExperiments); | 90 prefs::kEnabledLabsExperiments); |
84 if (!enabled_experiments) | 91 if (!enabled_experiments) |
85 return; | 92 return; |
86 | 93 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 238 |
232 if (enable) | 239 if (enable) |
233 enabled_experiments.insert(internal_name); | 240 enabled_experiments.insert(internal_name); |
234 else | 241 else |
235 enabled_experiments.erase(internal_name); | 242 enabled_experiments.erase(internal_name); |
236 | 243 |
237 SetEnabledLabs(profile->GetPrefs(), enabled_experiments); | 244 SetEnabledLabs(profile->GetPrefs(), enabled_experiments); |
238 } | 245 } |
239 | 246 |
240 } // namespace Labs | 247 } // namespace Labs |
OLD | NEW |