| 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/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 !profile->IsGuestSession() && !profile->IsSupervised()) { | 566 !profile->IsGuestSession() && !profile->IsSupervised()) { |
| 567 // Start the error notifier services to show auth/sync notifications. | 567 // Start the error notifier services to show auth/sync notifications. |
| 568 SigninErrorNotifierFactory::GetForProfile(profile); | 568 SigninErrorNotifierFactory::GetForProfile(profile); |
| 569 SyncErrorNotifierFactory::GetForProfile(profile); | 569 SyncErrorNotifierFactory::GetForProfile(profile); |
| 570 } | 570 } |
| 571 // Do not use chrome::NOTIFICATION_PROFILE_ADDED because the | 571 // Do not use chrome::NOTIFICATION_PROFILE_ADDED because the |
| 572 // profile is not fully initialized by user_manager. Use | 572 // profile is not fully initialized by user_manager. Use |
| 573 // chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED instead. | 573 // chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED instead. |
| 574 if (shelf_delegate_) | 574 if (shelf_delegate_) |
| 575 shelf_delegate_->OnUserProfileReadyToSwitch(profile); | 575 shelf_delegate_->OnUserProfileReadyToSwitch(profile); |
| 576 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | |
| 577 break; | 576 break; |
| 578 } | 577 } |
| 579 case chrome::NOTIFICATION_SESSION_STARTED: | 578 case chrome::NOTIFICATION_SESSION_STARTED: |
| 580 // InitAfterFirstSessionStart() should only be called once upon system | 579 // InitAfterFirstSessionStart() should only be called once upon system |
| 581 // start. | 580 // start. |
| 582 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2) | 581 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2) |
| 583 InitAfterFirstSessionStart(); | 582 InitAfterFirstSessionStart(); |
| 584 ash::WmShell::Get()->ShowShelf(); | |
| 585 break; | 583 break; |
| 586 default: | 584 default: |
| 587 NOTREACHED() << "Unexpected notification " << type; | 585 NOTREACHED() << "Unexpected notification " << type; |
| 588 } | 586 } |
| 589 } | 587 } |
| 590 | 588 |
| 591 void ChromeShellDelegate::PlatformInit() { | 589 void ChromeShellDelegate::PlatformInit() { |
| 592 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 590 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 593 content::NotificationService::AllSources()); | 591 content::NotificationService::AllSources()); |
| 594 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 592 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 595 content::NotificationService::AllSources()); | 593 content::NotificationService::AllSources()); |
| 596 } | 594 } |
| OLD | NEW |