summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorantrim <antrim@chromium.org>2015-04-09 14:14:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-09 21:15:14 +0000
commit687f1231a1d36d43e20e6c3fc69af87b2618af99 (patch)
tree0eb7d1fb9e94b1f1f16f2ebc7bea933e63552279 /chromeos
parentfc982c6879de1d80e4e958d78baa66e5737a8170 (diff)
downloadchromium_src-687f1231a1d36d43e20e6c3fc69af87b2618af99.zip
chromium_src-687f1231a1d36d43e20e6c3fc69af87b2618af99.tar.gz
chromium_src-687f1231a1d36d43e20e6c3fc69af87b2618af99.tar.bz2
Do not use OnlineAttempt if new GAIA is enabled.
BUG=460249 R=nkostylev@chromium.org Review URL: https://codereview.chromium.org/1077723002 Cr-Commit-Position: refs/heads/master@{#324506}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/login/auth/login_performer.cc12
-rw-r--r--chromeos/login/auth/login_performer.h6
2 files changed, 13 insertions, 5 deletions
diff --git a/chromeos/login/auth/login_performer.cc b/chromeos/login/auth/login_performer.cc
index a773ad6..db963ea 100644
--- a/chromeos/login/auth/login_performer.cc
+++ b/chromeos/login/auth/login_performer.cc
@@ -29,7 +29,8 @@ using base::UserMetricsAction;
namespace chromeos {
LoginPerformer::LoginPerformer(scoped_refptr<base::TaskRunner> task_runner,
- Delegate* delegate)
+ Delegate* delegate,
+ bool disable_client_login)
: delegate_(delegate),
task_runner_(task_runner),
online_attempt_host_(this),
@@ -37,6 +38,7 @@ LoginPerformer::LoginPerformer(scoped_refptr<base::TaskRunner> task_runner,
password_changed_(false),
password_changed_callback_count_(0),
auth_mode_(AUTH_MODE_INTERNAL),
+ disable_client_login_(disable_client_login),
weak_factory_(this) {
}
@@ -292,9 +294,11 @@ void LoginPerformer::StartAuthentication() {
authenticator_.get(),
base::Unretained(browser_context),
user_context_));
- // Make unobtrusive online check. It helps to determine password change
- // state in the case when offline login fails.
- online_attempt_host_.Check(GetSigninRequestContext(), user_context_);
+ if (!disable_client_login_) {
+ // Make unobtrusive online check. It helps to determine password change
+ // state in the case when offline login fails.
+ online_attempt_host_.Check(GetSigninRequestContext(), user_context_);
+ }
} else {
NOTREACHED();
}
diff --git a/chromeos/login/auth/login_performer.h b/chromeos/login/auth/login_performer.h
index 0f81d04..6ee7643 100644
--- a/chromeos/login/auth/login_performer.h
+++ b/chromeos/login/auth/login_performer.h
@@ -61,7 +61,8 @@ class CHROMEOS_EXPORT LoginPerformer : public AuthStatusConsumer,
};
LoginPerformer(scoped_refptr<base::TaskRunner> task_runner,
- Delegate* delegate);
+ Delegate* delegate,
+ bool disable_client_login);
~LoginPerformer() override;
// Performs a login for |user_context|.
@@ -225,6 +226,9 @@ class CHROMEOS_EXPORT LoginPerformer : public AuthStatusConsumer,
// Authorization mode type.
AuthorizationMode auth_mode_;
+ // TODO(antrim): remove once we got rid of /ClientLogin.
+ bool disable_client_login_;
+
base::WeakPtrFactory<LoginPerformer> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(LoginPerformer);
};