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 "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Format of command line switch. | 111 // Format of command line switch. |
112 const char kSwitchFormatString[] = " --%s=\"%s\""; | 112 const char kSwitchFormatString[] = " --%s=\"%s\""; |
113 | 113 |
114 // User name which is used in the Guest session. | 114 // User name which is used in the Guest session. |
115 const char kGuestUserName[] = ""; | 115 const char kGuestUserName[] = ""; |
116 | 116 |
117 | 117 |
118 #if defined(ENABLE_RLZ) | 118 #if defined(ENABLE_RLZ) |
119 // Flag file that disables RLZ tracking, when present. | 119 // Flag file that disables RLZ tracking, when present. |
120 const char kRLZDisabledFlagName[] = FILE_PATH_LITERAL(".rlz_disabled"); | 120 const base::FilePath::CharType kRLZDisabledFlagName[] = |
| 121 FILE_PATH_LITERAL(".rlz_disabled"); |
121 | 122 |
122 base::FilePath GetRlzDisabledFlagPath() { | 123 base::FilePath GetRlzDisabledFlagPath() { |
123 return file_util::GetHomeDir().Append(kRLZDisabledFlagName); | 124 return file_util::GetHomeDir().Append(kRLZDisabledFlagName); |
124 } | 125 } |
125 #endif | 126 #endif |
126 | 127 |
127 } // namespace | 128 } // namespace |
128 | 129 |
129 // Used to request a restart to switch to the guest mode. | 130 // Used to request a restart to switch to the guest mode. |
130 class JobRestartRequest | 131 class JobRestartRequest |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 bool LoginUtils::IsWhitelisted(const std::string& username) { | 1056 bool LoginUtils::IsWhitelisted(const std::string& username) { |
1056 CrosSettings* cros_settings = CrosSettings::Get(); | 1057 CrosSettings* cros_settings = CrosSettings::Get(); |
1057 bool allow_new_user = false; | 1058 bool allow_new_user = false; |
1058 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 1059 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
1059 if (allow_new_user) | 1060 if (allow_new_user) |
1060 return true; | 1061 return true; |
1061 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 1062 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
1062 } | 1063 } |
1063 | 1064 |
1064 } // namespace chromeos | 1065 } // namespace chromeos |
OLD | NEW |