Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 8289021: chromeos: Change all clients of LoginLibrary to use SessionManagerClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chromeos/boot_times_loader.h" 17 #include "chrome/browser/chromeos/boot_times_loader.h"
18 #include "chrome/browser/chromeos/cros/cros_library.h" 18 #include "chrome/browser/chromeos/cros/cros_library.h"
19 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 19 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
20 #include "chrome/browser/chromeos/cros/login_library.h"
21 #include "chrome/browser/chromeos/cros/network_library.h" 20 #include "chrome/browser/chromeos/cros/network_library.h"
22 #include "chrome/browser/chromeos/customization_document.h" 21 #include "chrome/browser/chromeos/customization_document.h"
22 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
23 #include "chrome/browser/chromeos/dbus/session_manager_client.h"
23 #include "chrome/browser/chromeos/login/helper.h" 24 #include "chrome/browser/chromeos/login/helper.h"
24 #include "chrome/browser/chromeos/login/login_display_host.h" 25 #include "chrome/browser/chromeos/login/login_display_host.h"
25 #include "chrome/browser/chromeos/login/views_login_display.h" 26 #include "chrome/browser/chromeos/login/views_login_display.h"
26 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" 27 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
27 #include "chrome/browser/chromeos/login/wizard_controller.h" 28 #include "chrome/browser/chromeos/login/wizard_controller.h"
28 #include "chrome/browser/chromeos/status/status_area_view.h" 29 #include "chrome/browser/chromeos/status/status_area_view.h"
29 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 30 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
30 #include "chrome/browser/google/google_util.h" 31 #include "chrome/browser/google/google_util.h"
31 #include "chrome/browser/prefs/pref_service.h" 32 #include "chrome/browser/prefs/pref_service.h"
32 #include "chrome/browser/profiles/profile_manager.h" 33 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 // If no user pods are visible, fallback to single new user pod which will 109 // If no user pods are visible, fallback to single new user pod which will
109 // have guest session link. 110 // have guest session link.
110 bool show_guest = UserCrosSettingsProvider::cached_allow_guest() && 111 bool show_guest = UserCrosSettingsProvider::cached_allow_guest() &&
111 !filtered_users.empty(); 112 !filtered_users.empty();
112 bool show_new_user = true; 113 bool show_new_user = true;
113 login_display_->set_parent_window(GetNativeWindow()); 114 login_display_->set_parent_window(GetNativeWindow());
114 login_display_->Init(filtered_users, show_guest, show_new_user); 115 login_display_->Init(filtered_users, show_guest, show_new_user);
115 116
116 LoginUtils::Get()->PrewarmAuthentication(); 117 LoginUtils::Get()->PrewarmAuthentication();
117 if (CrosLibrary::Get()->EnsureLoaded()) 118 DBusThreadManager::Get()->session_manager_client()->EmitLoginPromptReady();
118 CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady();
119 } 119 }
120 120
121 //////////////////////////////////////////////////////////////////////////////// 121 ////////////////////////////////////////////////////////////////////////////////
122 // ExistingUserController, NotificationObserver implementation: 122 // ExistingUserController, NotificationObserver implementation:
123 // 123 //
124 124
125 void ExistingUserController::Observe(int type, 125 void ExistingUserController::Observe(int type,
126 const NotificationSource& source, 126 const NotificationSource& source,
127 const NotificationDetails& details) { 127 const NotificationDetails& details) {
128 if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED) 128 if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED)
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 cryptohomed->AsyncSetOwnerUser( 592 cryptohomed->AsyncSetOwnerUser(
593 UserCrosSettingsProvider::cached_owner(), NULL); 593 UserCrosSettingsProvider::cached_owner(), NULL);
594 594
595 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here 595 // Do not invoke AsyncDoAutomaticFreeDiskSpaceControl(NULL) here
596 // so it does not delay the following mount. Cleanup will be 596 // so it does not delay the following mount. Cleanup will be
597 // started in Cryptohomed by timer. 597 // started in Cryptohomed by timer.
598 } 598 }
599 } 599 }
600 600
601 } // namespace chromeos 601 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698