| Index: chrome/common/net/gaia/authentication_consumer_oauth.cc
|
| diff --git a/chrome/common/net/gaia/authentication_consumer_oauth.cc b/chrome/common/net/gaia/authentication_consumer_oauth.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b6e1ccdc502aa3609c490eaf1399035f9a9c1380
|
| --- /dev/null
|
| +++ b/chrome/common/net/gaia/authentication_consumer_oauth.cc
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/common/net/gaia/authentication_consumer_oauth.h"
|
| +#include "base/logging.h"
|
| +
|
| +AuthenticationConsumerOAuth::AuthenticationResult::
|
| + AuthenticationResult() {
|
| +}
|
| +
|
| +AuthenticationConsumerOAuth::AuthenticationResult::
|
| + AuthenticationResult(const std::string& new_sid,
|
| + const std::string& new_lsid,
|
| + const std::string& new_token,
|
| + const std::string& new_data)
|
| + : sid(new_sid),
|
| + lsid(new_lsid),
|
| + token(new_token),
|
| + data(new_data),
|
| + two_factor(false) {}
|
| +
|
| +AuthenticationConsumerOAuth::AuthenticationResult::
|
| + ~AuthenticationResult() {}
|
| +
|
| +bool AuthenticationConsumerOAuth::AuthenticationResult::IsValid() const {
|
| + return !lsid.empty() && !sid.empty();
|
| +}
|
| +
|
| +bool AuthenticationConsumerOAuth::AuthenticationResult::operator==(
|
| + const AuthenticationResult &b) const {
|
| + return sid == b.sid &&
|
| + lsid == b.lsid &&
|
| + token == b.token &&
|
| + data == b.data &&
|
| + two_factor == b.two_factor;
|
| +}
|
| +
|
| +// virtual
|
| +void AuthenticationConsumerOAuth::OnIssueTokenFailure(
|
| + const std::string& service,
|
| + const GoogleServiceAuthError& error) {
|
| + OnIssueAuthTokenFailure(service, error);
|
| +}
|
|
|