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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc

Issue 2615633010: kiosk: Add kiosk.always_update manifest key (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | extensions/common/api/_manifest_features.json » ('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 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 const extensions::Extension* app) const { 646 const extensions::Extension* app) const {
647 // Compliant if the app is not the auto launched with zero delay app. 647 // Compliant if the app is not the auto launched with zero delay app.
648 if (currently_auto_launched_with_zero_delay_app_ != app->id()) 648 if (currently_auto_launched_with_zero_delay_app_ != app->id())
649 return true; 649 return true;
650 650
651 // Compliant if the app does not specify required platform version. 651 // Compliant if the app does not specify required platform version.
652 const extensions::KioskModeInfo* info = extensions::KioskModeInfo::Get(app); 652 const extensions::KioskModeInfo* info = extensions::KioskModeInfo::Get(app);
653 if (info == nullptr) 653 if (info == nullptr)
654 return true; 654 return true;
655 655
656 // Compliant if the app wants to be always updated.
657 if (info->always_update)
658 return true;
659
656 return IsPlatformCompliant(info->required_platform_version); 660 return IsPlatformCompliant(info->required_platform_version);
657 } 661 }
658 662
659 KioskAppManager::KioskAppManager() 663 KioskAppManager::KioskAppManager()
660 : ownership_established_(false), 664 : ownership_established_(false),
661 external_loader_created_(false), 665 external_loader_created_(false),
662 secondary_app_external_loader_created_(false) { 666 secondary_app_external_loader_created_(false) {
663 base::FilePath cache_dir; 667 base::FilePath cache_dir;
664 GetCrxCacheDir(&cache_dir); 668 GetCrxCacheDir(&cache_dir);
665 external_cache_.reset( 669 external_cache_.reset(
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const { 898 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const {
895 int delay; 899 int delay;
896 if (!CrosSettings::Get()->GetInteger( 900 if (!CrosSettings::Get()->GetInteger(
897 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { 901 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) {
898 return base::TimeDelta(); // Default delay is 0ms. 902 return base::TimeDelta(); // Default delay is 0ms.
899 } 903 }
900 return base::TimeDelta::FromMilliseconds(delay); 904 return base::TimeDelta::FromMilliseconds(delay);
901 } 905 }
902 906
903 } // namespace chromeos 907 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | extensions/common/api/_manifest_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698