chromium/google_apis/gaia/core_account_id.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "google_apis/gaia/core_account_id.h"

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/containers/to_vector.h"
#include "google_apis/gaia/gaia_auth_util.h"

namespace {
// Returns whether the string looks like an email (the test is
// crude an only checks whether it includes an '@').
bool IsEmailString(const std::string& string) {}
}  // anonymous namespace

CoreAccountId::CoreAccountId() = default;

CoreAccountId::CoreAccountId(const CoreAccountId&) = default;

CoreAccountId::CoreAccountId(CoreAccountId&&) noexcept = default;

CoreAccountId::~CoreAccountId() = default;

CoreAccountId& CoreAccountId::operator=(const CoreAccountId&) = default;

CoreAccountId& CoreAccountId::operator=(CoreAccountId&&) noexcept = default;

// static
CoreAccountId CoreAccountId::FromGaiaId(const std::string& gaia_id) {}

// static
CoreAccountId CoreAccountId::FromRobotEmail(const std::string& robot_email) {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
// static
CoreAccountId CoreAccountId::FromEmail(const std::string& email) {
  if (email.empty())
    return CoreAccountId();

  DCHECK(IsEmailString(email))
      << "Expected an email [actual = " << email << "]";
  return CoreAccountId::FromString(email);
}
#endif

// static
CoreAccountId CoreAccountId::FromString(const std::string& value) {}

bool CoreAccountId::empty() const {}

bool CoreAccountId::IsEmail() const {}

const std::string& CoreAccountId::ToString() const {}

bool operator<(const CoreAccountId& lhs, const CoreAccountId& rhs) {}

bool operator==(const CoreAccountId& lhs, const CoreAccountId& rhs) {}

bool operator!=(const CoreAccountId& lhs, const CoreAccountId& rhs) {}

std::ostream& operator<<(std::ostream& out, const CoreAccountId& a) {}

std::vector<std::string> ToStringList(
    const std::vector<CoreAccountId>& account_ids) {}