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

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: Nit fixes + merge with TOT + gray out labels for disabled elements Created 8 years, 10 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
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 f2067cdb2431e62cc7b8f1a030834f79bf5e6290..c53c9285aee69dbfb41be911cb97c9acaa301858 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"
@@ -207,6 +208,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(
+ "logged_in_as_guest",
James Hawkins 2012/03/01 20:00:19 loggedInAsGuest.
Denis Kuznetsov (DE-MUC) 2012/03/02 17:32:25 As I could see, Localized values are used both for
James Hawkins 2012/03/02 22:26:17 No, it is a JavaScript variable on injection, thus
Denis Kuznetsov (DE-MUC) 2012/03/05 09:25:58 Done.
+ chromeos::UserManager::Get()->IsLoggedInAsGuest() ?
+ ASCIIToUTF16("true") : ASCIIToUTF16("false"));
+}
+
void CoreChromeOSOptionsHandler::Observe(
int type,
const content::NotificationSource& source,

Powered by Google App Engine
This is Rietveld 408576698