summaryrefslogtreecommitdiffstats
path: root/chromeos/login/user_names.cc
blob: 52ed05362e23881db9dc346df670f19346ac9562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2014 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 "chromeos/login/user_names.h"

#include "google_apis/gaia/gaia_auth_util.h"

namespace chromeos {

namespace login {

const char* kStubUser = "stub-user@example.com";

const char* kSignInUser = "sign-in-user-id";

// Should match cros constant in platform/libchromeos/chromeos/cryptohome.h
const char* kGuestUserName = "$guest";

const char* kSupervisedUserDomain = "locally-managed.localhost";

std::string CanonicalizeUserID(const std::string& user_id) {
  if (user_id == chromeos::login::kGuestUserName)
    return user_id;
  return gaia::CanonicalizeEmail(user_id);
}

}  // namespace login

}  // namespace chromeos