blob: 848228c4d91dbe4d46b6450e6d75678c1b0a1426 [file] [log] [blame]
// Copyright (c) 2012 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 <string>
class GURL;
namespace gaia {
// Perform basic canonicalization of |email_address|, taking into account that
// gmail does not consider '.' or caps inside a username to matter. It also
// ignores everything after a '+'. For example, ==
//, per
std::string CanonicalizeEmail(const std::string& email_address);
// Returns the canonical form of the given domain.
std::string CanonicalizeDomain(const std::string& domain);
// Sanitize emails. Currently, it only ensures all emails have a domain by
// adding if no domain is present.
std::string SanitizeEmail(const std::string& email_address);
// Extract the domain part from the canonical form of the given email.
std::string ExtractDomainName(const std::string& email);
bool IsGaiaSignonRealm(const GURL& url);
} // namespace gaia