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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 954033003: Kiosk mode: SetFirstLoginPrefs() should be called for kiosk sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | 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/users/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <set> 8 #include <set>
9 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 device_local_account_type); 714 device_local_account_type);
715 715
716 active_user_ = user_manager::User::CreateKioskAppUser(app_id); 716 active_user_ = user_manager::User::CreateKioskAppUser(app_id);
717 active_user_->SetStubImage( 717 active_user_->SetStubImage(
718 user_manager::UserImage( 718 user_manager::UserImage(
719 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 719 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
720 IDR_PROFILE_PICTURE_LOADING)), 720 IDR_PROFILE_PICTURE_LOADING)),
721 user_manager::User::USER_IMAGE_INVALID, 721 user_manager::User::USER_IMAGE_INVALID,
722 false); 722 false);
723 723
724 SetIsCurrentUserNew(true);
xiyuan 2015/02/25 20:18:43 KioskAppLoggedIn is called on every kiosk app laun
Alexander Alekseev 2015/02/25 20:48:47 We only need to call SetFirstLoginPrefs for the fi
xiyuan 2015/02/25 21:20:50 Think we can use Profile::IsNewProfile to check wh
724 WallpaperManager::Get()->SetUserWallpaperNow(app_id); 725 WallpaperManager::Get()->SetUserWallpaperNow(app_id);
725 726
726 // TODO(bartfab): Add KioskAppUsers to the users_ list and keep metadata like 727 // TODO(bartfab): Add KioskAppUsers to the users_ list and keep metadata like
727 // the kiosk_app_id in these objects, removing the need to re-parse the 728 // the kiosk_app_id in these objects, removing the need to re-parse the
728 // device-local account list here to extract the kiosk_app_id. 729 // device-local account list here to extract the kiosk_app_id.
729 const std::vector<policy::DeviceLocalAccount> device_local_accounts = 730 const std::vector<policy::DeviceLocalAccount> device_local_accounts =
730 policy::GetDeviceLocalAccounts(cros_settings_); 731 policy::GetDeviceLocalAccounts(cros_settings_);
731 const policy::DeviceLocalAccount* account = NULL; 732 const policy::DeviceLocalAccount* account = NULL;
732 for (std::vector<policy::DeviceLocalAccount>::const_iterator it = 733 for (std::vector<policy::DeviceLocalAccount>::const_iterator it =
733 device_local_accounts.begin(); 734 device_local_accounts.begin();
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 1082
1082 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && 1083 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) &&
1083 !system::HasSystemTimezonePolicy()) { 1084 !system::HasSystemTimezonePolicy()) {
1084 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); 1085 g_browser_process->platform_part()->GetTimezoneResolver()->Start();
1085 } else { 1086 } else {
1086 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); 1087 g_browser_process->platform_part()->GetTimezoneResolver()->Stop();
1087 } 1088 }
1088 } 1089 }
1089 1090
1090 } // namespace chromeos 1091 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698