OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/webui/options/managed_user_settings_handler.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" |
| 9 #include "base/values.h" |
| 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "grit/generated_resources.h" |
| 12 #include "grit/locale_settings.h" |
| 13 |
| 14 namespace options { |
| 15 |
| 16 ManagedUserSettingsHandler::ManagedUserSettingsHandler() { |
| 17 } |
| 18 |
| 19 ManagedUserSettingsHandler::~ManagedUserSettingsHandler() { |
| 20 } |
| 21 |
| 22 void ManagedUserSettingsHandler::GetLocalizedValues( |
| 23 base::DictionaryValue* localized_strings) { |
| 24 DCHECK(localized_strings); |
| 25 |
| 26 static OptionsStringResource resources[] = { |
| 27 // Installed content packs. |
| 28 { "installedContentPacks", IDS_INSTALLED_CONTENT_PACKS_LABEL }, |
| 29 { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON }, |
| 30 { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL }, |
| 31 // Content pack restriction options. |
| 32 { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL }, |
| 33 { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO }, |
| 34 { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO }, |
| 35 { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO }, |
| 36 // Other managed user settings |
| 37 { "advancedManagedUserSettings", IDS_ADVANCED_MANAGED_USER_LABEL }, |
| 38 { "enableSafeSearch", IDS_SAFE_SEARCH_ENABLED }, |
| 39 { "disableProfileSignIn", IDS_SIGNIN_SYNC_DISABLED }, |
| 40 { "disableHistoryDeletion", IDS_HISTORY_DELETION_DISABLED }, |
| 41 { "usePassphrase", IDS_USE_PASSPHRASE_LABEL }, |
| 42 { "setPassphrase", IDS_SET_PASSPHRASE_BUTTON } |
| 43 }; |
| 44 |
| 45 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 46 RegisterTitle(localized_strings, "managedUserSettingsPage", |
| 47 IDS_MANAGED_USER_SETTINGS_TITLE); |
| 48 |
| 49 localized_strings->SetBoolean( |
| 50 "managedUsersEnabled", |
| 51 CommandLine::ForCurrentProcess()->HasSwitch( |
| 52 switches::kEnableManagedUsers)); |
| 53 } |
| 54 |
| 55 } // namespace options |
OLD | NEW |