| Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| index 6e9d92935909db74aad370fc41fe152672c5a09b..b7a720c2ac5e5c013aca9316e5cb3d0949b29be9 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| @@ -14,13 +14,13 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_shutdown.h"
|
| #include "chrome/browser/io_thread.h"
|
| +#include "chrome/browser/chromeos/cros_settings.h"
|
| #include "chrome/browser/chromeos/cros/cros_library.h"
|
| #include "chrome/browser/chromeos/cros/network_library.h"
|
| #include "chrome/browser/chromeos/cros/power_library.h"
|
| #include "chrome/browser/chromeos/login/user_manager.h"
|
| #include "chrome/browser/chromeos/login/webui_login_display.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/chromeos/user_cros_settings_provider.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/net/gaia/gaia_urls.h"
|
| @@ -388,12 +388,17 @@ void SigninScreenHandler::ShowSigninScreenIfReady() {
|
| if (!app_locale.empty())
|
| params.SetString("hl", app_locale);
|
|
|
| - params.SetBoolean("createAccount",
|
| - UserCrosSettingsProvider::cached_allow_new_user());
|
| - params.SetBoolean("guestSignin",
|
| - UserCrosSettingsProvider::cached_allow_guest());
|
| + // TODO(pastarmovj): Observe for changes of this variables to update the UI
|
| + // properly when the policy has been fetched on sign-on screen.
|
| + bool allow_new_user;
|
| + CrosSettings::Get()->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
|
| + params.SetBoolean("createAccount", allow_new_user);
|
| + bool allow_guest;
|
| + CrosSettings::Get()->GetBoolean(kAccountsPrefAllowGuest, &allow_guest);
|
| + params.SetBoolean("guestSignin", allow_guest);
|
| params.SetString("gaiaOrigin", GaiaUrls::GetInstance()->gaia_origin_url());
|
|
|
| +
|
| // Test automation data:
|
| const CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| if (command_line->HasSwitch(switches::kAuthExtensionPath)) {
|
| @@ -513,7 +518,9 @@ void SigninScreenHandler::SendUserList(bool animated) {
|
| for (UserVector::const_iterator it = users.begin();
|
| it != users.end(); ++it) {
|
| const std::string& email = it->email();
|
| - bool is_owner = email == UserCrosSettingsProvider::cached_owner();
|
| + std::string owner;
|
| + chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner);
|
| + bool is_owner = (email == owner);
|
|
|
| if (non_owner_count < max_non_owner_users || is_owner) {
|
| DictionaryValue* user_dict = new DictionaryValue();
|
|
|