summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-25 19:19:08 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-25 19:19:08 +0000
commitf87fb92014b05be62ca143785f4be0b5d2572065 (patch)
treee9a765ea0f4bcc0b3ec7b316beae0a7017403a76 /chrome/browser/dom_ui
parent626a84f8de401f6d778a315fbab491a7574da234 (diff)
downloadchromium_src-f87fb92014b05be62ca143785f4be0b5d2572065.zip
chromium_src-f87fb92014b05be62ca143785f4be0b5d2572065.tar.gz
chromium_src-f87fb92014b05be62ca143785f4be0b5d2572065.tar.bz2
DOMUI: Add prefs ui for enabling/disabling background mode.
BUG=53337 TEST=out/Debug/chrome --enable-tabbed-options, go to Under the hood, see the Chromium/Google Chrome Web Apps, try to enable or disable the pref (it should works). Try to click in the Learn more link, it should go to the help page. Review URL: http://codereview.chromium.org/3441016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/advanced_options_handler.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/advanced_options_handler.cc b/chrome/browser/dom_ui/advanced_options_handler.cc
index d30b7cf..9c743c4 100644
--- a/chrome/browser/dom_ui/advanced_options_handler.cc
+++ b/chrome/browser/dom_ui/advanced_options_handler.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/dom_ui/options_managed_banner_handler.h"
@@ -22,6 +23,7 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/chrome_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -121,6 +123,21 @@ void AdvancedOptionsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE));
localized_strings->SetString("translateEnableTranslate",
l10n_util::GetStringUTF16(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
+ // Add ChromeApps preferences if background mode is runtime-enabled.
+ bool background_mode_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBackgroundMode);
+ localized_strings->SetString("enable-background-mode",
+ background_mode_enabled ? "true" : "false");
+ localized_strings->SetString("advancedSectionTitleChromeApps",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS));
+ localized_strings->SetString("chromeAppsEnableBackgroundMode",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE));
+ localized_strings->SetString("chromeAppsLearnMoreBackgroundModeLabel",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_LEARN_MORE_LABEL));
+ localized_strings->SetString("chromeAppsLearnMoreBackgroundModeURL",
+ l10n_util::GetStringUTF16(IDS_LEARN_MORE_BACKGROUND_MODE_URL));
localized_strings->SetString("enableLogging",
l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_LOGGING));
localized_strings->SetString("disableServices",