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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc

Issue 9464053: Hide/Disable several (meaningless) options in Settings uber-page for Guest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Another merge Created 8 years, 9 months 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
« no previous file with comments | « chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc
index 3ce04aa56b153eb3d038864ca6f47a2d5ec12d9f..06ba4fba11e5c05754ece7787227e8412d7ad118 100644
--- a/chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/cros_settings.h"
#include "chrome/browser/chromeos/login/user_manager.h"
@@ -212,6 +213,17 @@ void CoreChromeOSOptionsHandler::StopObservingPref(const std::string& path) {
::options2::CoreOptionsHandler::StopObservingPref(path);
}
+void CoreChromeOSOptionsHandler::GetLocalizedValues(
+ DictionaryValue* localized_strings) {
+ DCHECK(localized_strings);
+ CoreOptionsHandler::GetLocalizedValues(localized_strings);
+
+ localized_strings->SetString(
+ "loggedInAsGuest",
+ chromeos::UserManager::Get()->IsLoggedInAsGuest() ?
+ ASCIIToUTF16("true") : ASCIIToUTF16("false"));
+}
+
void CoreChromeOSOptionsHandler::Observe(
int type,
const content::NotificationSource& source,
« no previous file with comments | « chrome/browser/ui/webui/options2/chromeos/core_chromeos_options_handler2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698