gaia_auth_consumer.cc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.
  4. #include "google_apis/gaia/gaia_auth_consumer.h"
  5. GaiaAuthConsumer::ClientLoginResult::ClientLoginResult() = default;
  6. GaiaAuthConsumer::ClientLoginResult::ClientLoginResult(
  7. const std::string& new_sid,
  8. const std::string& new_lsid,
  9. const std::string& new_token,
  10. const std::string& new_data)
  11. : sid(new_sid), lsid(new_lsid), token(new_token), data(new_data) {}
  12. GaiaAuthConsumer::ClientLoginResult::ClientLoginResult(
  13. const ClientLoginResult& other) = default;
  14. GaiaAuthConsumer::ClientLoginResult::~ClientLoginResult() {}
  15. bool GaiaAuthConsumer::ClientLoginResult::operator==(
  16. const ClientLoginResult &b) const {
  17. return sid == b.sid && lsid == b.lsid && token == b.token && data == b.data;
  18. }
  19. GaiaAuthConsumer::ClientOAuthResult::ClientOAuthResult(
  20. const std::string& new_refresh_token,
  21. const std::string& new_access_token,
  22. int new_expires_in_secs,
  23. bool new_is_child_account,
  24. bool new_is_under_advanced_protection)
  25. : refresh_token(new_refresh_token),
  26. access_token(new_access_token),
  27. expires_in_secs(new_expires_in_secs),
  28. is_child_account(new_is_child_account),
  29. is_under_advanced_protection(new_is_under_advanced_protection) {}
  30. GaiaAuthConsumer::ClientOAuthResult::ClientOAuthResult(
  31. const ClientOAuthResult& other) = default;
  32. GaiaAuthConsumer::ClientOAuthResult::~ClientOAuthResult() = default;
  33. bool GaiaAuthConsumer::ClientOAuthResult::operator==(
  34. const ClientOAuthResult &b) const {
  35. return refresh_token == b.refresh_token &&
  36. access_token == b.access_token &&
  37. expires_in_secs == b.expires_in_secs;
  38. }