| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 public: | 179 public: |
| 180 LoginUtilsImpl() | 180 LoginUtilsImpl() |
| 181 : delegate_(NULL) { | 181 : delegate_(NULL) { |
| 182 } | 182 } |
| 183 | 183 |
| 184 virtual ~LoginUtilsImpl() { | 184 virtual ~LoginUtilsImpl() { |
| 185 } | 185 } |
| 186 | 186 |
| 187 // LoginUtils implementation: | 187 // LoginUtils implementation: |
| 188 virtual void RespectLocalePreference(Profile* profile, | 188 virtual void RespectLocalePreference(Profile* profile, |
| 189 const base::Closure& callback) OVERRIDE; | 189 const base::Closure& callback) override; |
| 190 virtual void DoBrowserLaunch(Profile* profile, | 190 virtual void DoBrowserLaunch(Profile* profile, |
| 191 LoginDisplayHost* login_host) OVERRIDE; | 191 LoginDisplayHost* login_host) override; |
| 192 virtual void PrepareProfile( | 192 virtual void PrepareProfile( |
| 193 const UserContext& user_context, | 193 const UserContext& user_context, |
| 194 bool has_auth_cookies, | 194 bool has_auth_cookies, |
| 195 bool has_active_session, | 195 bool has_active_session, |
| 196 LoginUtils::Delegate* delegate) OVERRIDE; | 196 LoginUtils::Delegate* delegate) override; |
| 197 virtual void DelegateDeleted(LoginUtils::Delegate* delegate) OVERRIDE; | 197 virtual void DelegateDeleted(LoginUtils::Delegate* delegate) override; |
| 198 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE; | 198 virtual void CompleteOffTheRecordLogin(const GURL& start_url) override; |
| 199 virtual scoped_refptr<Authenticator> CreateAuthenticator( | 199 virtual scoped_refptr<Authenticator> CreateAuthenticator( |
| 200 AuthStatusConsumer* consumer) OVERRIDE; | 200 AuthStatusConsumer* consumer) override; |
| 201 virtual bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile, | 201 virtual bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile, |
| 202 bool early_restart) OVERRIDE; | 202 bool early_restart) override; |
| 203 | 203 |
| 204 // UserSessionManager::Delegate implementation: | 204 // UserSessionManager::Delegate implementation: |
| 205 virtual void OnProfilePrepared(Profile* profile) OVERRIDE; | 205 virtual void OnProfilePrepared(Profile* profile) override; |
| 206 #if defined(ENABLE_RLZ) | 206 #if defined(ENABLE_RLZ) |
| 207 virtual void OnRlzInitialized() OVERRIDE; | 207 virtual void OnRlzInitialized() override; |
| 208 #endif | 208 #endif |
| 209 | 209 |
| 210 private: | 210 private: |
| 211 void DoBrowserLaunchInternal(Profile* profile, | 211 void DoBrowserLaunchInternal(Profile* profile, |
| 212 LoginDisplayHost* login_host, | 212 LoginDisplayHost* login_host, |
| 213 bool locale_pref_checked); | 213 bool locale_pref_checked); |
| 214 | 214 |
| 215 static void RunCallbackOnLocaleLoaded( | 215 static void RunCallbackOnLocaleLoaded( |
| 216 const base::Closure& callback, | 216 const base::Closure& callback, |
| 217 InputEventsBlocker* input_events_blocker, | 217 InputEventsBlocker* input_events_blocker, |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 CrosSettings* cros_settings = CrosSettings::Get(); | 518 CrosSettings* cros_settings = CrosSettings::Get(); |
| 519 bool allow_new_user = false; | 519 bool allow_new_user = false; |
| 520 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 520 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 521 if (allow_new_user) | 521 if (allow_new_user) |
| 522 return true; | 522 return true; |
| 523 return cros_settings->FindEmailInList( | 523 return cros_settings->FindEmailInList( |
| 524 kAccountsPrefUsers, username, wildcard_match); | 524 kAccountsPrefUsers, username, wildcard_match); |
| 525 } | 525 } |
| 526 | 526 |
| 527 } // namespace chromeos | 527 } // namespace chromeos |
| OLD | NEW |