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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 2625733003: Re-reland: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: rebase, fix conflict with sky Created 3 years, 11 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
OLDNEW
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 !profile->IsGuestSession() && !profile->IsSupervised()) { 558 !profile->IsGuestSession() && !profile->IsSupervised()) {
559 // Start the error notifier services to show auth/sync notifications. 559 // Start the error notifier services to show auth/sync notifications.
560 SigninErrorNotifierFactory::GetForProfile(profile); 560 SigninErrorNotifierFactory::GetForProfile(profile);
561 SyncErrorNotifierFactory::GetForProfile(profile); 561 SyncErrorNotifierFactory::GetForProfile(profile);
562 } 562 }
563 // Do not use chrome::NOTIFICATION_PROFILE_ADDED because the 563 // Do not use chrome::NOTIFICATION_PROFILE_ADDED because the
564 // profile is not fully initialized by user_manager. Use 564 // profile is not fully initialized by user_manager. Use
565 // chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED instead. 565 // chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED instead.
566 if (shelf_delegate_) 566 if (shelf_delegate_)
567 shelf_delegate_->OnUserProfileReadyToSwitch(profile); 567 shelf_delegate_->OnUserProfileReadyToSwitch(profile);
568 ash::Shell::GetInstance()->OnLoginUserProfilePrepared();
569 break; 568 break;
570 } 569 }
571 case chrome::NOTIFICATION_SESSION_STARTED: 570 case chrome::NOTIFICATION_SESSION_STARTED:
572 // InitAfterFirstSessionStart() should only be called once upon system 571 // InitAfterFirstSessionStart() should only be called once upon system
573 // start. 572 // start.
574 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2) 573 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2)
575 InitAfterFirstSessionStart(); 574 InitAfterFirstSessionStart();
576 ash::WmShell::Get()->ShowShelf();
577 break; 575 break;
578 default: 576 default:
579 NOTREACHED() << "Unexpected notification " << type; 577 NOTREACHED() << "Unexpected notification " << type;
580 } 578 }
581 } 579 }
582 580
583 void ChromeShellDelegate::PlatformInit() { 581 void ChromeShellDelegate::PlatformInit() {
584 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 582 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
585 content::NotificationService::AllSources()); 583 content::NotificationService::AllSources());
586 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 584 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
587 content::NotificationService::AllSources()); 585 content::NotificationService::AllSources());
588 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698