Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1733 // Triggers app launcher start page service to load start page web contents. | 1733 // Triggers app launcher start page service to load start page web contents. |
| 1734 app_list::StartPageService::Get(profile); | 1734 app_list::StartPageService::Get(profile); |
| 1735 } else { | 1735 } else { |
| 1736 LOG(WARNING) << "Browser hasn't been launched, should_launch_browser_" | 1736 LOG(WARNING) << "Browser hasn't been launched, should_launch_browser_" |
| 1737 << " is false. This is normal in some tests."; | 1737 << " is false. This is normal in some tests."; |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 if (HatsNotificationController::ShouldShowSurveyToProfile(profile)) | 1740 if (HatsNotificationController::ShouldShowSurveyToProfile(profile)) |
| 1741 hats_notification_controller_ = new HatsNotificationController(profile); | 1741 hats_notification_controller_ = new HatsNotificationController(profile); |
| 1742 | 1742 |
| 1743 if (QuickUnlockNotificationController::ShouldShow(profile)) { | |
| 1744 if (quick_unlock_notification_handler_.find(profile) == | |
|
jdufault
2016/07/11 18:03:49
Instead of two ifs just use an &&
malaykeshav
2016/07/11 18:38:00
Done
| |
| 1745 quick_unlock_notification_handler_.end()) { | |
| 1746 auto* qu_feature_notification_controller = | |
| 1747 new QuickUnlockNotificationController(profile); | |
| 1748 quick_unlock_notification_handler_.insert( | |
| 1749 std::make_pair(profile, qu_feature_notification_controller)); | |
| 1750 } | |
| 1751 } | |
| 1752 | |
| 1743 // Mark login host for deletion after browser starts. This | 1753 // Mark login host for deletion after browser starts. This |
| 1744 // guarantees that the message loop will be referenced by the | 1754 // guarantees that the message loop will be referenced by the |
| 1745 // browser before it is dereferenced by the login host. | 1755 // browser before it is dereferenced by the login host. |
| 1746 if (login_host) | 1756 if (login_host) |
| 1747 login_host->Finalize(); | 1757 login_host->Finalize(); |
| 1748 user_manager::UserManager::Get()->SessionStarted(); | 1758 user_manager::UserManager::Get()->SessionStarted(); |
| 1749 chromeos::BootTimesRecorder::Get()->LoginDone( | 1759 chromeos::BootTimesRecorder::Get()->LoginDone( |
| 1750 user_manager::UserManager::Get()->IsCurrentUserNew()); | 1760 user_manager::UserManager::Get()->IsCurrentUserNew()); |
| 1751 | 1761 |
| 1752 // Check to see if this profile should show EndOfLife Notification and show | 1762 // Check to see if this profile should show EndOfLife Notification and show |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1884 ->browser_policy_connector_chromeos() | 1894 ->browser_policy_connector_chromeos() |
| 1885 ->IsEnterpriseManaged()) { | 1895 ->IsEnterpriseManaged()) { |
| 1886 return false; | 1896 return false; |
| 1887 } | 1897 } |
| 1888 | 1898 |
| 1889 // Do not show end of life notification if this is a guest session | 1899 // Do not show end of life notification if this is a guest session |
| 1890 return !profile->IsGuestSession(); | 1900 return !profile->IsGuestSession(); |
| 1891 } | 1901 } |
| 1892 | 1902 |
| 1893 } // namespace chromeos | 1903 } // namespace chromeos |
| OLD | NEW |