Chromium Code Reviews| Index: chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
| diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
| index e69c3be9b24689d69114d9982e419c3ae669bd60..fe4e1af6192d0b7fed7cd43176c5021d5d107c20 100644 |
| --- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
| +++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
| @@ -32,6 +32,7 @@ |
| #include "content/public/browser/notification_service.h" |
| #include "extensions/browser/extension_system.h" |
| #include "extensions/common/extension.h" |
| +#include "extensions/common/manifest_constants.h" |
| #include "extensions/common/manifest_handlers/kiosk_mode_info.h" |
| #include "extensions/common/manifest_handlers/offline_enabled_info.h" |
| #include "google_apis/gaia/gaia_auth_consumer.h" |
| @@ -148,7 +149,14 @@ void StartupAppLauncher::OnOAuthFileLoaded(KioskOAuthParams* auth_params) { |
| void StartupAppLauncher::MaybeInitializeNetwork() { |
| const Extension* extension = extensions::ExtensionSystem::Get(profile_)-> |
| extension_service()->GetInstalledExtension(app_id_); |
| + // Kiosk apps are platform apps and platform apps default to be |
| + // offline enabled if "offline_enabled" key is not provided. However, |
| + // network check should be performed in that case. The only case the check |
| + // should be skipped is the kiosk app explicitly declares "offline_enabled" |
| + // true in its manifest. |
|
miket_OOO
2014/03/05 18:32:22
Is this a good idea? It's giving a lot of subtlety
xiyuan
2014/03/05 18:44:18
Agree that having a new key would be more straight
|
| const bool requires_network = !extension || |
| + !extension->manifest()->HasKey( |
| + extensions::manifest_keys::kOfflineEnabled) || |
| !extensions::OfflineEnabledInfo::IsOfflineEnabled(extension); |
| if (requires_network) { |