| 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/webui/flags_ui.h" | 5 #include "chrome/browser/ui/webui/flags_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 supported_experiments.get(), | 179 supported_experiments.get(), |
| 180 unsupported_experiments.get()); | 180 unsupported_experiments.get()); |
| 181 results.Set("supportedExperiments", supported_experiments.release()); | 181 results.Set("supportedExperiments", supported_experiments.release()); |
| 182 results.Set("unsupportedExperiments", unsupported_experiments.release()); | 182 results.Set("unsupportedExperiments", unsupported_experiments.release()); |
| 183 results.SetBoolean("needsRestart", | 183 results.SetBoolean("needsRestart", |
| 184 about_flags::IsRestartNeededToCommitChanges()); | 184 about_flags::IsRestartNeededToCommitChanges()); |
| 185 results.SetBoolean("showOwnerWarning", | 185 results.SetBoolean("showOwnerWarning", |
| 186 access_ == about_flags::kGeneralAccessFlagsOnly); | 186 access_ == about_flags::kGeneralAccessFlagsOnly); |
| 187 | 187 |
| 188 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 188 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 189 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 189 version_info::Channel channel = chrome::VersionInfo::GetChannel(); |
| 190 results.SetBoolean("showBetaChannelPromotion", | 190 results.SetBoolean("showBetaChannelPromotion", |
| 191 channel == chrome::VersionInfo::CHANNEL_STABLE); | 191 channel == version_info::Channel::STABLE); |
| 192 results.SetBoolean("showDevChannelPromotion", | 192 results.SetBoolean("showDevChannelPromotion", |
| 193 channel == chrome::VersionInfo::CHANNEL_BETA); | 193 channel == version_info::Channel::BETA); |
| 194 #else | 194 #else |
| 195 results.SetBoolean("showBetaChannelPromotion", false); | 195 results.SetBoolean("showBetaChannelPromotion", false); |
| 196 results.SetBoolean("showDevChannelPromotion", false); | 196 results.SetBoolean("showDevChannelPromotion", false); |
| 197 #endif | 197 #endif |
| 198 web_ui()->CallJavascriptFunction("returnFlagsExperiments", results); | 198 web_ui()->CallJavascriptFunction("returnFlagsExperiments", results); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void FlagsDOMHandler::HandleEnableFlagsExperimentMessage( | 201 void FlagsDOMHandler::HandleEnableFlagsExperimentMessage( |
| 202 const base::ListValue* args) { | 202 const base::ListValue* args) { |
| 203 DCHECK(flags_storage_); | 203 DCHECK(flags_storage_); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 registry->RegisterListPref(prefs::kEnabledLabsExperiments); | 330 registry->RegisterListPref(prefs::kEnabledLabsExperiments); |
| 331 } | 331 } |
| 332 | 332 |
| 333 #if defined(OS_CHROMEOS) | 333 #if defined(OS_CHROMEOS) |
| 334 // static | 334 // static |
| 335 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 335 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 336 registry->RegisterListPref(prefs::kEnabledLabsExperiments); | 336 registry->RegisterListPref(prefs::kEnabledLabsExperiments); |
| 337 } | 337 } |
| 338 | 338 |
| 339 #endif | 339 #endif |
| OLD | NEW |