| 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 2f67c0e956d69c9900ab30d31ef02949219e422b..3eb88a0c07944b6c1c12d78e9c0db8010f39e455 100644
|
| --- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
|
| +++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
|
| @@ -269,7 +269,8 @@ void StartupAppLauncher::MaybeCheckExtensionUpdate() {
|
| extensions::ExtensionSystem::Get(profile_)
|
| ->extension_service()
|
| ->updater();
|
| - if (!delegate_->IsNetworkReady() || !updater) {
|
| + if (!delegate_->IsNetworkReady() || !updater ||
|
| + PrimaryAppHasPendingUpdate()) {
|
| MaybeLaunchApp();
|
| return;
|
| }
|
| @@ -405,6 +406,12 @@ bool StartupAppLauncher::HasSecondaryApps() const {
|
| return extensions::KioskModeInfo::HasSecondaryApps(extension);
|
| }
|
|
|
| +bool StartupAppLauncher::PrimaryAppHasPendingUpdate() const {
|
| + return !!extensions::ExtensionSystem::Get(profile_)
|
| + ->extension_service()
|
| + ->GetPendingExtensionUpdate(app_id_);
|
| +}
|
| +
|
| bool StartupAppLauncher::DidPrimaryOrSecondaryAppFailedToInstall(
|
| bool success,
|
| const std::string& id) const {
|
| @@ -536,11 +543,16 @@ void StartupAppLauncher::MaybeInstallSecondaryApps() {
|
|
|
| void StartupAppLauncher::OnReadyToLaunch() {
|
| ready_to_launch_ = true;
|
| - UpdateAppData();
|
| + MaybeUpdateAppData();
|
| delegate_->OnReadyToLaunch();
|
| }
|
|
|
| -void StartupAppLauncher::UpdateAppData() {
|
| +void StartupAppLauncher::MaybeUpdateAppData() {
|
| + // Skip copying meta data from the current installed primary app when
|
| + // there is a pending update.
|
| + if (PrimaryAppHasPendingUpdate())
|
| + return;
|
| +
|
| KioskAppManager::Get()->ClearAppData(app_id_);
|
| KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
|
| }
|
|
|