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

Unified Diff: trunk/src/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 437563004: Revert 287212 "Create a policy for controlling whether or not de..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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: trunk/src/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
===================================================================
--- trunk/src/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (revision 287219)
+++ trunk/src/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (working copy)
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
#include "base/bind.h"
-#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/value_conversions.h"
#include "base/values.h"
@@ -22,7 +21,6 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/singleton_tabs.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
@@ -145,12 +143,6 @@
profile);
}
-bool IsGuestModeEnabled() {
- PrefService* service = g_browser_process->local_state();
- DCHECK(service);
- return service->GetBoolean(prefs::kBrowserGuestModeEnabled);
-}
-
} // namespace
// ProfileUpdateObserver ------------------------------------------------------
@@ -291,8 +283,7 @@
void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) {
SendUserList();
- web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen",
- base::FundamentalValue(IsGuestModeEnabled()));
+ web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen");
desktop_type_ = chrome::GetHostDesktopTypeForNativeView(
web_ui()->GetWebContents()->GetNativeView());
@@ -379,15 +370,9 @@
}
void UserManagerScreenHandler::HandleLaunchGuest(const base::ListValue* args) {
- if (IsGuestModeEnabled()) {
- profiles::SwitchToGuestProfile(desktop_type_,
- base::Bind(&OnSwitchToProfileComplete));
- ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST);
- } else {
- // The UI should have prevented the user from allowing the selection of
- // guest mode.
- NOTREACHED();
- }
+ profiles::SwitchToGuestProfile(desktop_type_,
+ base::Bind(&OnSwitchToProfileComplete));
+ ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST);
}
void UserManagerScreenHandler::HandleLaunchUser(const base::ListValue* args) {
@@ -645,7 +630,7 @@
}
web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers",
- users_list, base::FundamentalValue(IsGuestModeEnabled()));
+ users_list, base::FundamentalValue(true));
}
void UserManagerScreenHandler::ReportAuthenticationResult(
« no previous file with comments | « trunk/src/chrome/browser/resources/user_manager/user_manager.js ('k') | trunk/src/chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698