| Index: chrome/browser/chromeos/settings/cros_settings.cc
|
| diff --git a/chrome/browser/chromeos/settings/cros_settings.cc b/chrome/browser/chromeos/settings/cros_settings.cc
|
| index 96427d23116413128ad79a0fae00779608dec10e..016b33a5ce0be0e84813a2d53273e96651a3d929 100644
|
| --- a/chrome/browser/chromeos/settings/cros_settings.cc
|
| +++ b/chrome/browser/chromeos/settings/cros_settings.cc
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h"
|
| #include "chrome/browser/chromeos/settings/system_settings_provider.h"
|
| #include "chromeos/chromeos_switches.h"
|
| +#include "chromeos/settings/cros_settings_names.h"
|
| #include "google_apis/gaia/gaia_auth_util.h"
|
|
|
| namespace chromeos {
|
| @@ -45,6 +46,24 @@ CrosSettings* CrosSettings::Get() {
|
| return g_cros_settings;
|
| }
|
|
|
| +// static
|
| +bool CrosSettings::IsWhitelisted(const std::string& username,
|
| + bool* wildcard_match) {
|
| + // Skip whitelist check for tests.
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kOobeSkipPostLogin)) {
|
| + return true;
|
| + }
|
| +
|
| + CrosSettings* cros_settings = CrosSettings::Get();
|
| + bool allow_new_user = false;
|
| + cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
|
| + if (allow_new_user)
|
| + return true;
|
| + return cros_settings->FindEmailInList(kAccountsPrefUsers, username,
|
| + wildcard_match);
|
| +}
|
| +
|
| CrosSettings::CrosSettings(DeviceSettingsService* device_settings_service) {
|
| CrosSettingsProvider::NotifyObserversCallback notify_cb(
|
| base::Bind(&CrosSettings::FireObservers,
|
|
|