| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 namespace chromeos { | 85 namespace chromeos { |
| 86 | 86 |
| 87 namespace { | 87 namespace { |
| 88 | 88 |
| 89 #if defined(ENABLE_RLZ) | 89 #if defined(ENABLE_RLZ) |
| 90 // Flag file that disables RLZ tracking, when present. | 90 // Flag file that disables RLZ tracking, when present. |
| 91 const base::FilePath::CharType kRLZDisabledFlagName[] = | 91 const base::FilePath::CharType kRLZDisabledFlagName[] = |
| 92 FILE_PATH_LITERAL(".rlz_disabled"); | 92 FILE_PATH_LITERAL(".rlz_disabled"); |
| 93 | 93 |
| 94 base::FilePath GetRlzDisabledFlagPath() { | 94 base::FilePath GetRlzDisabledFlagPath() { |
| 95 return file_util::GetHomeDir().Append(kRLZDisabledFlagName); | 95 return base::GetHomeDir().Append(kRLZDisabledFlagName); |
| 96 } | 96 } |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 } // namespace | 99 } // namespace |
| 100 | 100 |
| 101 struct DoBrowserLaunchOnLocaleLoadedData; | 101 struct DoBrowserLaunchOnLocaleLoadedData; |
| 102 | 102 |
| 103 class LoginUtilsImpl | 103 class LoginUtilsImpl |
| 104 : public LoginUtils, | 104 : public LoginUtils, |
| 105 public OAuth2LoginManager::Observer, | 105 public OAuth2LoginManager::Observer, |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 bool LoginUtils::IsWhitelisted(const std::string& username) { | 900 bool LoginUtils::IsWhitelisted(const std::string& username) { |
| 901 CrosSettings* cros_settings = CrosSettings::Get(); | 901 CrosSettings* cros_settings = CrosSettings::Get(); |
| 902 bool allow_new_user = false; | 902 bool allow_new_user = false; |
| 903 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 903 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 904 if (allow_new_user) | 904 if (allow_new_user) |
| 905 return true; | 905 return true; |
| 906 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 906 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
| 907 } | 907 } |
| 908 | 908 |
| 909 } // namespace chromeos | 909 } // namespace chromeos |
| OLD | NEW |