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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2850123002: M58: arc: Set migration success notification pref. (Closed)
Patch Set: Fix some comment for M58 Created 3 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12 matching lines...) Expand all
23 #include "base/sys_info.h" 23 #include "base/sys_info.h"
24 #include "base/task_scheduler/post_task.h" 24 #include "base/task_scheduler/post_task.h"
25 #include "base/threading/thread_task_runner_handle.h" 25 #include "base/threading/thread_task_runner_handle.h"
26 #include "chrome/browser/about_flags.h" 26 #include "chrome/browser/about_flags.h"
27 #include "chrome/browser/app_mode/app_mode_utils.h" 27 #include "chrome/browser/app_mode/app_mode_utils.h"
28 #include "chrome/browser/browser_process.h" 28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/browser_process_platform_part_chromeos.h" 29 #include "chrome/browser/browser_process_platform_part_chromeos.h"
30 #include "chrome/browser/browser_shutdown.h" 30 #include "chrome/browser/browser_shutdown.h"
31 #include "chrome/browser/chrome_notification_types.h" 31 #include "chrome/browser/chrome_notification_types.h"
32 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 32 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
33 #include "chrome/browser/chromeos/arc/arc_migration_guide_notification.h"
33 #include "chrome/browser/chromeos/arc/arc_service_launcher.h" 34 #include "chrome/browser/chromeos/arc/arc_service_launcher.h"
35 #include "chrome/browser/chromeos/arc/arc_util.h"
34 #include "chrome/browser/chromeos/base/locale_util.h" 36 #include "chrome/browser/chromeos/base/locale_util.h"
35 #include "chrome/browser/chromeos/boot_times_recorder.h" 37 #include "chrome/browser/chromeos/boot_times_recorder.h"
36 #include "chrome/browser/chromeos/first_run/first_run.h" 38 #include "chrome/browser/chromeos/first_run/first_run.h"
37 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" 39 #include "chrome/browser/chromeos/first_run/goodies_displayer.h"
38 #include "chrome/browser/chromeos/input_method/input_method_util.h" 40 #include "chrome/browser/chromeos/input_method/input_method_util.h"
39 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" 41 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h"
40 #include "chrome/browser/chromeos/login/chrome_restart_request.h" 42 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
41 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 43 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
42 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 44 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
43 #include "chrome/browser/chromeos/login/existing_user_controller.h" 45 #include "chrome/browser/chromeos/login/existing_user_controller.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 CreateUserSession(user_context, has_auth_cookies); 507 CreateUserSession(user_context, has_auth_cookies);
506 508
507 if (!has_active_session) 509 if (!has_active_session)
508 StartCrosSession(); 510 StartCrosSession();
509 511
510 if (!user_context.GetDeviceId().empty()) { 512 if (!user_context.GetDeviceId().empty()) {
511 user_manager::known_user::SetDeviceId(user_context.GetAccountId(), 513 user_manager::known_user::SetDeviceId(user_context.GetAccountId(),
512 user_context.GetDeviceId()); 514 user_context.GetDeviceId());
513 } 515 }
514 516
515 PrepareProfile(); 517 arc::UpdateArcFileSystemCompatibilityPrefIfNeeded(
518 user_context_.GetAccountId(),
519 ProfileHelper::GetProfilePathByUserIdHash(user_context_.GetUserIDHash()),
520 base::Bind(&UserSessionManager::PrepareProfile, AsWeakPtr()));
516 } 521 }
517 522
518 void UserSessionManager::DelegateDeleted(UserSessionManagerDelegate* delegate) { 523 void UserSessionManager::DelegateDeleted(UserSessionManagerDelegate* delegate) {
519 if (delegate_ == delegate) 524 if (delegate_ == delegate)
520 delegate_ = nullptr; 525 delegate_ = nullptr;
521 } 526 }
522 527
523 void UserSessionManager::PerformPostUserLoggedInActions() { 528 void UserSessionManager::PerformPostUserLoggedInActions() {
524 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 529 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
525 if (user_manager->GetLoggedInUsers().size() == 1) { 530 if (user_manager->GetLoggedInUsers().size() == 1) {
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 if (login_host) 1804 if (login_host)
1800 login_host->Finalize(); 1805 login_host->Finalize();
1801 session_manager::SessionManager::Get()->SessionStarted(); 1806 session_manager::SessionManager::Get()->SessionStarted();
1802 chromeos::BootTimesRecorder::Get()->LoginDone( 1807 chromeos::BootTimesRecorder::Get()->LoginDone(
1803 user_manager::UserManager::Get()->IsCurrentUserNew()); 1808 user_manager::UserManager::Get()->IsCurrentUserNew());
1804 1809
1805 // Check to see if this profile should show EndOfLife Notification and show 1810 // Check to see if this profile should show EndOfLife Notification and show
1806 // the message accordingly. 1811 // the message accordingly.
1807 if (ShouldShowEolNotification(profile)) 1812 if (ShouldShowEolNotification(profile))
1808 CheckEolStatus(profile); 1813 CheckEolStatus(profile);
1814
1815 // Show the one-time notification and update the relevant pref about the
1816 // completion of the file system migration necessary for ARC, when needed.
1817 arc::ShowArcMigrationSuccessNotificationIfNeeded(profile);
1809 } 1818 }
1810 1819
1811 void UserSessionManager::RespectLocalePreferenceWrapper( 1820 void UserSessionManager::RespectLocalePreferenceWrapper(
1812 Profile* profile, 1821 Profile* profile,
1813 const base::Closure& callback) { 1822 const base::Closure& callback) {
1814 if (browser_shutdown::IsTryingToQuit()) 1823 if (browser_shutdown::IsTryingToQuit())
1815 return; 1824 return;
1816 1825
1817 const user_manager::User* const user = 1826 const user_manager::User* const user =
1818 ProfileHelper::Get()->GetUserByProfile(profile); 1827 ProfileHelper::Get()->GetUserByProfile(profile);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 ->browser_policy_connector_chromeos() 1933 ->browser_policy_connector_chromeos()
1925 ->IsEnterpriseManaged()) { 1934 ->IsEnterpriseManaged()) {
1926 return false; 1935 return false;
1927 } 1936 }
1928 1937
1929 // Do not show end of life notification if this is a guest session 1938 // Do not show end of life notification if this is a guest session
1930 return !profile->IsGuestSession(); 1939 return !profile->IsGuestSession();
1931 } 1940 }
1932 1941
1933 } // namespace chromeos 1942 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698