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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" | 44 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" |
45 #include "chrome/browser/chromeos/login/parallel_authenticator.h" | 45 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
46 #include "chrome/browser/chromeos/login/profile_auth_data.h" | 46 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
47 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" | 47 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
48 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory .h" | 48 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory .h" |
49 #include "chrome/browser/chromeos/login/screen_locker.h" | 49 #include "chrome/browser/chromeos/login/screen_locker.h" |
50 #include "chrome/browser/chromeos/login/startup_utils.h" | 50 #include "chrome/browser/chromeos/login/startup_utils.h" |
51 #include "chrome/browser/chromeos/login/supervised_user_manager.h" | 51 #include "chrome/browser/chromeos/login/supervised_user_manager.h" |
52 #include "chrome/browser/chromeos/login/user.h" | 52 #include "chrome/browser/chromeos/login/user.h" |
53 #include "chrome/browser/chromeos/login/user_manager.h" | 53 #include "chrome/browser/chromeos/login/user_manager.h" |
54 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | |
54 #include "chrome/browser/chromeos/settings/cros_settings.h" | 55 #include "chrome/browser/chromeos/settings/cros_settings.h" |
55 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
56 #include "chrome/browser/first_run/first_run.h" | 57 #include "chrome/browser/first_run/first_run.h" |
57 #include "chrome/browser/google/google_util_chromeos.h" | 58 #include "chrome/browser/google/google_util_chromeos.h" |
58 #include "chrome/browser/lifetime/application_lifetime.h" | 59 #include "chrome/browser/lifetime/application_lifetime.h" |
59 #include "chrome/browser/pref_service_flags_storage.h" | 60 #include "chrome/browser/pref_service_flags_storage.h" |
60 #include "chrome/browser/profiles/profile.h" | 61 #include "chrome/browser/profiles/profile.h" |
61 #include "chrome/browser/profiles/profile_manager.h" | 62 #include "chrome/browser/profiles/profile_manager.h" |
62 #include "chrome/browser/rlz/rlz.h" | 63 #include "chrome/browser/rlz/rlz.h" |
63 #include "chrome/browser/signin/signin_manager_factory.h" | 64 #include "chrome/browser/signin/signin_manager_factory.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? | 342 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? |
342 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; | 343 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; |
343 | 344 |
344 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 345 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
345 profile, | 346 profile, |
346 base::FilePath(), | 347 base::FilePath(), |
347 chrome::startup::IS_PROCESS_STARTUP, | 348 chrome::startup::IS_PROCESS_STARTUP, |
348 first_run, | 349 first_run, |
349 &return_code); | 350 &return_code); |
350 | 351 |
352 if (UserManager::Get()->IsCurrentUserNew() && | |
353 UserManager::Get()->IsLoggedInAsRegularUser() && | |
bshe
2014/04/09 14:32:15
Do you mind to add a short comment about why GetLo
Harry McCleave
2014/04/10 02:42:29
Done.
| |
354 UserManager::Get()->GetLoggedInUsers().size() == 1) { | |
bshe
2014/04/09 14:32:15
nit: indent is off
Harry McCleave
2014/04/10 02:42:29
Done.
| |
355 WallpaperManager::Get()->EnableSurpriseMe(); | |
356 } | |
357 | |
351 // Triggers app launcher start page service to load start page web contents. | 358 // Triggers app launcher start page service to load start page web contents. |
352 app_list::StartPageService::Get(profile); | 359 app_list::StartPageService::Get(profile); |
353 | 360 |
354 // Mark login host for deletion after browser starts. This | 361 // Mark login host for deletion after browser starts. This |
355 // guarantees that the message loop will be referenced by the | 362 // guarantees that the message loop will be referenced by the |
356 // browser before it is dereferenced by the login host. | 363 // browser before it is dereferenced by the login host. |
357 if (login_host) | 364 if (login_host) |
358 login_host->Finalize(); | 365 login_host->Finalize(); |
359 UserManager::Get()->SessionStarted(); | 366 UserManager::Get()->SessionStarted(); |
360 } | 367 } |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
948 CrosSettings* cros_settings = CrosSettings::Get(); | 955 CrosSettings* cros_settings = CrosSettings::Get(); |
949 bool allow_new_user = false; | 956 bool allow_new_user = false; |
950 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 957 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
951 if (allow_new_user) | 958 if (allow_new_user) |
952 return true; | 959 return true; |
953 return cros_settings->FindEmailInList( | 960 return cros_settings->FindEmailInList( |
954 kAccountsPrefUsers, username, wildcard_match); | 961 kAccountsPrefUsers, username, wildcard_match); |
955 } | 962 } |
956 | 963 |
957 } // namespace chromeos | 964 } // namespace chromeos |
OLD | NEW |