| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_mode/kiosk_app_manager.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 const AccountId account_id(AccountId::FromUserEmail(it->user_id)); | 725 const AccountId account_id(AccountId::FromUserEmail(it->user_id)); |
| 726 auto old_it = old_apps.find(it->kiosk_app_id); | 726 auto old_it = old_apps.find(it->kiosk_app_id); |
| 727 if (old_it != old_apps.end()) { | 727 if (old_it != old_apps.end()) { |
| 728 apps_.push_back(std::move(old_it->second)); | 728 apps_.push_back(std::move(old_it->second)); |
| 729 old_apps.erase(old_it); | 729 old_apps.erase(old_it); |
| 730 } else { | 730 } else { |
| 731 base::FilePath cached_crx; | 731 base::FilePath cached_crx; |
| 732 std::string version; | 732 std::string version; |
| 733 GetCachedCrx(it->kiosk_app_id, &cached_crx, &version); | 733 GetCachedCrx(it->kiosk_app_id, &cached_crx, &version); |
| 734 | 734 |
| 735 apps_.push_back(base::WrapUnique( | 735 apps_.push_back(base::MakeUnique<KioskAppData>( |
| 736 new KioskAppData(this, it->kiosk_app_id, account_id, | 736 this, it->kiosk_app_id, account_id, GURL(it->kiosk_app_update_url), |
| 737 GURL(it->kiosk_app_update_url), cached_crx))); | 737 cached_crx)); |
| 738 apps_.back()->Load(); | 738 apps_.back()->Load(); |
| 739 } | 739 } |
| 740 CancelDelayedCryptohomeRemoval(cryptohome::Identification(account_id)); | 740 CancelDelayedCryptohomeRemoval(cryptohome::Identification(account_id)); |
| 741 } | 741 } |
| 742 | 742 |
| 743 ClearRemovedApps(old_apps); | 743 ClearRemovedApps(old_apps); |
| 744 UpdateExternalCachePrefs(); | 744 UpdateExternalCachePrefs(); |
| 745 RetryFailedAppDataFetch(); | 745 RetryFailedAppDataFetch(); |
| 746 | 746 |
| 747 FOR_EACH_OBSERVER(KioskAppManagerObserver, observers_, | 747 FOR_EACH_OBSERVER(KioskAppManagerObserver, observers_, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const { | 881 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const { |
| 882 int delay; | 882 int delay; |
| 883 if (!CrosSettings::Get()->GetInteger( | 883 if (!CrosSettings::Get()->GetInteger( |
| 884 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { | 884 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { |
| 885 return base::TimeDelta(); // Default delay is 0ms. | 885 return base::TimeDelta(); // Default delay is 0ms. |
| 886 } | 886 } |
| 887 return base::TimeDelta::FromMilliseconds(delay); | 887 return base::TimeDelta::FromMilliseconds(delay); |
| 888 } | 888 } |
| 889 | 889 |
| 890 } // namespace chromeos | 890 } // namespace chromeos |
| OLD | NEW |