OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "chrome/browser/chromeos/status/status_area_view.h" | 29 #include "chrome/browser/chromeos/status/status_area_view.h" |
30 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 30 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
31 #include "chrome/browser/google/google_util.h" | 31 #include "chrome/browser/google/google_util.h" |
32 #include "chrome/browser/prefs/pref_service.h" | 32 #include "chrome/browser/prefs/pref_service.h" |
33 #include "chrome/browser/profiles/profile_manager.h" | 33 #include "chrome/browser/profiles/profile_manager.h" |
34 #include "chrome/browser/ui/views/window.h" | 34 #include "chrome/browser/ui/views/window.h" |
35 #include "chrome/common/chrome_notification_types.h" | 35 #include "chrome/common/chrome_notification_types.h" |
36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/net/gaia/google_service_auth_error.h" | 37 #include "chrome/common/net/gaia/google_service_auth_error.h" |
38 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
39 #include "content/common/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
40 #include "content/public/browser/notification_types.h" | 40 #include "content/public/browser/notification_types.h" |
41 #include "grit/generated_resources.h" | 41 #include "grit/generated_resources.h" |
42 #include "ui/base/l10n/l10n_util.h" | 42 #include "ui/base/l10n/l10n_util.h" |
43 #include "views/widget/widget.h" | 43 #include "views/widget/widget.h" |
44 | 44 |
45 namespace chromeos { | 45 namespace chromeos { |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 // Url for setting up sync authentication. | 49 // Url for setting up sync authentication. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 user_settings_(new UserCrosSettingsProvider), | 84 user_settings_(new UserCrosSettingsProvider), |
85 weak_factory_(this), | 85 weak_factory_(this), |
86 is_owner_login_(false) { | 86 is_owner_login_(false) { |
87 DCHECK(current_controller_ == NULL); | 87 DCHECK(current_controller_ == NULL); |
88 current_controller_ = this; | 88 current_controller_ = this; |
89 | 89 |
90 login_display_ = host_->CreateLoginDisplay(this); | 90 login_display_ = host_->CreateLoginDisplay(this); |
91 | 91 |
92 registrar_.Add(this, | 92 registrar_.Add(this, |
93 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, | 93 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, |
94 NotificationService::AllSources()); | 94 content::NotificationService::AllSources()); |
95 } | 95 } |
96 | 96 |
97 void ExistingUserController::Init(const UserVector& users) { | 97 void ExistingUserController::Init(const UserVector& users) { |
98 UserVector filtered_users; | 98 UserVector filtered_users; |
99 if (UserCrosSettingsProvider::cached_show_users_on_signin()) { | 99 if (UserCrosSettingsProvider::cached_show_users_on_signin()) { |
100 for (size_t i = 0; i < users.size(); ++i) | 100 for (size_t i = 0; i < users.size(); ++i) |
101 // TODO(xiyuan): Clean user profile whose email is not in whitelist. | 101 // TODO(xiyuan): Clean user profile whose email is not in whitelist. |
102 if (UserCrosSettingsProvider::cached_allow_new_user() || | 102 if (UserCrosSettingsProvider::cached_allow_new_user() || |
103 UserCrosSettingsProvider::IsEmailInCachedWhitelist( | 103 UserCrosSettingsProvider::IsEmailInCachedWhitelist( |
104 users[i].email())) { | 104 users[i].email())) { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 cryptohomed->AsyncSetOwnerUser( | 593 cryptohomed->AsyncSetOwnerUser( |
594 UserCrosSettingsProvider::cached_owner(), NULL); | 594 UserCrosSettingsProvider::cached_owner(), NULL); |
595 | 595 |
596 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here | 596 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here |
597 // so it does not delay the following mount. Cleanup will be | 597 // so it does not delay the following mount. Cleanup will be |
598 // started in Cryptohomed by timer. | 598 // started in Cryptohomed by timer. |
599 } | 599 } |
600 } | 600 } |
601 | 601 |
602 } // namespace chromeos | 602 } // namespace chromeos |
OLD | NEW |