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

Unified Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT (solved merging conflict). Created 9 years, 1 month 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/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 619c42f08aab5a86bc3ec9cad16b6f8dcc0c2b2c..f87be31cbd4757941740d63fab1eaf0219439059 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -13,6 +13,7 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.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/dbus/dbus_thread_manager.h"
@@ -22,7 +23,6 @@
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/webui_login_display.h"
-#include "chrome/browser/chromeos/user_cros_settings_provider.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
@@ -471,10 +471,14 @@ void SigninScreenHandler::LoadAuthExtension(bool force, bool silent_load) {
params.SetString("email", email_);
email_.clear();
- 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
Mattias Nissler (ping if slow) 2011/11/18 14:12:00 "Watch for" or "Observe". I have never heard of "o
pastarmovj 2011/11/18 15:01:38 Done.
+ // properly when the policy has been fetched on sign-on screen.
+ bool allow_new_user;
Mattias Nissler (ping if slow) 2011/11/18 14:12:00 Properly initialize these variables (also below) i
pastarmovj 2011/11/18 15:01:38 done.
+ 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);
const std::string app_locale = g_browser_process->GetApplicationLocale();
if (!app_locale.empty())
@@ -602,7 +606,9 @@ void SigninScreenHandler::SendUserList(bool animated) {
bool single_user = users.size() == 1;
for (UserList::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);
bool signed_in = UserManager::Get()->user_is_logged_in() &&
email == UserManager::Get()->logged_in_user().email();

Powered by Google App Engine
This is Rietveld 408576698