1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "google_apis/gaia/gaia_auth_consumer.h"
7 GaiaAuthConsumer::ClientLoginResult::ClientLoginResult()
11 GaiaAuthConsumer::ClientLoginResult::ClientLoginResult(
12 const std::string
& new_sid
,
13 const std::string
& new_lsid
,
14 const std::string
& new_token
,
15 const std::string
& new_data
)
22 GaiaAuthConsumer::ClientLoginResult::~ClientLoginResult() {}
24 bool GaiaAuthConsumer::ClientLoginResult::operator==(
25 const ClientLoginResult
&b
) const {
26 return sid
== b
.sid
&&
30 two_factor
== b
.two_factor
;
33 GaiaAuthConsumer::ClientOAuthResult::ClientOAuthResult()
34 : expires_in_secs(0) {}
36 GaiaAuthConsumer::ClientOAuthResult::ClientOAuthResult(
37 const std::string
& new_refresh_token
,
38 const std::string
& new_access_token
,
39 int new_expires_in_secs
)
40 : refresh_token(new_refresh_token
),
41 access_token(new_access_token
),
42 expires_in_secs(new_expires_in_secs
) {}
44 GaiaAuthConsumer::ClientOAuthResult::~ClientOAuthResult() {}
46 bool GaiaAuthConsumer::ClientOAuthResult::operator==(
47 const ClientOAuthResult
&b
) const {
48 return refresh_token
== b
.refresh_token
&&
49 access_token
== b
.access_token
&&
50 expires_in_secs
== b
.expires_in_secs
;