Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
index 50289d3b1b62d28035859569b14ddf0acfdef3a8..26a8cb215332693c2b96c9f7b308ca56eead860d 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -540,11 +540,6 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { |
// Pass along sync status early so it will be available during page init. |
values->Set("syncData", GetSyncStateDictionary().release()); |
- // The Reset Profile Settings feature makes no sense for an off-the-record |
- // profile (e.g. in Guest mode on Chrome OS), so hide it. |
- values->SetBoolean("enableResetProfileSettings", |
- !Profile::FromWebUI(web_ui())->IsOffTheRecord()); |
- |
values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); |
values->SetString("doNotTrackLearnMoreURL", chrome::kDoNotTrackLearnMoreURL); |
@@ -600,6 +595,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { |
if (ShouldShowMultiProfilesUserList()) |
values->Set("profilesInfo", GetProfilesInfoList().release()); |
+ values->SetBoolean("profileIsGuest", |
+ Profile::FromWebUI(web_ui())->IsOffTheRecord()); |
+ |
values->SetBoolean("profileIsSupervised", |
Profile::FromWebUI(web_ui())->IsSupervised()); |
@@ -844,6 +842,10 @@ void BrowserOptionsHandler::InitializeHandler() { |
} |
#endif |
+ // No preferences below this point may be modified by guest profiles. |
+ if (Profile::FromWebUI(web_ui())->IsGuestSession()) |
+ return; |
+ |
auto_open_files_.Init( |
prefs::kDownloadExtensionsToOpen, prefs, |
base::Bind(&BrowserOptionsHandler::SetupAutoOpenFileTypes, |