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

Unified Diff: chrome/browser/ui/webui/options/managed_user_settings_handler.cc

Issue 11414294: Add a "managed user settings" page to chrome://settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/managed_user_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/managed_user_settings_handler.cc b/chrome/browser/ui/webui/options/managed_user_settings_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e3c5e2092a948623a849bcabb3b5be04002b8cb9
--- /dev/null
+++ b/chrome/browser/ui/webui/options/managed_user_settings_handler.cc
@@ -0,0 +1,55 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/options/managed_user_settings_handler.h"
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "base/values.h"
+#include "chrome/common/chrome_switches.h"
+#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
+
+namespace options {
+
+ManagedUserSettingsHandler::ManagedUserSettingsHandler() {
+}
+
+ManagedUserSettingsHandler::~ManagedUserSettingsHandler() {
+}
+
+void ManagedUserSettingsHandler::GetLocalizedValues(
+ base::DictionaryValue* localized_strings) {
+ DCHECK(localized_strings);
+
+ static OptionsStringResource resources[] = {
+ // Installed content packs.
+ { "installedContentPacks", IDS_INSTALLED_CONTENT_PACKS_LABEL },
+ { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON },
+ { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL },
+ // Content pack restriction options.
+ { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL },
+ { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO },
+ { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO },
+ { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO },
+ // Other managed user settings
+ { "advancedManagedUserSettings", IDS_ADVANCED_MANAGED_USER_LABEL },
+ { "enableSafeSearch", IDS_SAFE_SEARCH_ENABLED },
+ { "disableProfileSignIn", IDS_SIGNIN_SYNC_DISABLED },
+ { "disableHistoryDeletion", IDS_HISTORY_DELETION_DISABLED },
+ { "usePassphrase", IDS_USE_PASSPHRASE_LABEL },
+ { "setPassphrase", IDS_SET_PASSPHRASE_BUTTON }
+ };
+
+ RegisterStrings(localized_strings, resources, arraysize(resources));
+ RegisterTitle(localized_strings, "managedUserSettingsPage",
+ IDS_MANAGED_USER_SETTINGS_TITLE);
+
+ localized_strings->SetBoolean(
+ "managedUsersEnabled",
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableManagedUsers));
+}
+
+} // namespace options
« no previous file with comments | « chrome/browser/ui/webui/options/managed_user_settings_handler.h ('k') | chrome/browser/ui/webui/options/options_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698