diff options
author | cmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 20:04:27 +0000 |
---|---|---|
committer | cmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 20:04:27 +0000 |
commit | 992848f4eb2e39e73b0bc2932253e9396eaf0369 (patch) | |
tree | 9baaf4ebffd17658e84ebcef2919c5aa36ece9fd /chrome/common/net | |
parent | 553b4aa96db130c0cc8c9b2d2134febcb4a3aac3 (diff) | |
download | chromium_src-992848f4eb2e39e73b0bc2932253e9396eaf0369.zip chromium_src-992848f4eb2e39e73b0bc2932253e9396eaf0369.tar.gz chromium_src-992848f4eb2e39e73b0bc2932253e9396eaf0369.tar.bz2 |
[CHrome OS] HOSTED accounts will not be allowed to log in
Instead of allowing HOSTED accounts to log in, but be flagged, we are instead detecting them and blocking them.
Now, when a HOSTED account tries to log in, AuthenticateToLogin will call OnLoginFailure with USER_NOT_SIGNED_UP, indicating that the account in question is not allowed to use this device.
BUG=chromium-os:7867
TEST=unit tests, install on device and attempt to log in with a HOSTED account. See that it fails.
Review URL: http://codereview.chromium.org/3973010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/net')
-rw-r--r-- | chrome/common/net/gaia/gaia_auth_consumer.h | 20 | ||||
-rw-r--r-- | chrome/common/net/gaia/google_service_auth_error.h | 4 |
2 files changed, 7 insertions, 17 deletions
diff --git a/chrome/common/net/gaia/gaia_auth_consumer.h b/chrome/common/net/gaia/gaia_auth_consumer.h index d063c8c..429ab7f 100644 --- a/chrome/common/net/gaia/gaia_auth_consumer.h +++ b/chrome/common/net/gaia/gaia_auth_consumer.h @@ -15,37 +15,23 @@ class GoogleServiceAuthError; class GaiaAuthConsumer { public: struct ClientLoginResult { - inline ClientLoginResult() - : is_hosted(false) {} + inline ClientLoginResult() {} inline ClientLoginResult(const std::string& new_sid, const std::string& new_lsid, const std::string& new_token, const std::string& new_data) - : is_hosted(false), - sid(new_sid), - lsid(new_lsid), - token(new_token), - data(new_data) {} - inline ClientLoginResult(const bool hosted, - const std::string& new_sid, - const std::string& new_lsid, - const std::string& new_token, - const std::string& new_data) - : is_hosted(hosted), - sid(new_sid), + : sid(new_sid), lsid(new_lsid), token(new_token), data(new_data) {} inline bool operator==(const ClientLoginResult &b) const { - return is_hosted == b.is_hosted && - sid == b.sid && + return sid == b.sid && lsid == b.lsid && token == b.token && data == b.data; } - bool is_hosted; std::string sid; std::string lsid; std::string token; diff --git a/chrome/common/net/gaia/google_service_auth_error.h b/chrome/common/net/gaia/google_service_auth_error.h index fa6f76b..032f59f 100644 --- a/chrome/common/net/gaia/google_service_auth_error.h +++ b/chrome/common/net/gaia/google_service_auth_error.h @@ -71,6 +71,10 @@ class GoogleServiceAuthError { // The requestor of the authentication step cancelled the request // prior to completion. REQUEST_CANCELED = 9, + + // The user has provided a HOSTED account, when this service requires + // a GOOGLE account. + HOSTED_NOT_ALLOWED = 10, }; // Additional data for CAPTCHA_REQUIRED errors. |