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/startup_app_launcher.h" | 5 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 extensions::InstallTracker* tracker = | 285 extensions::InstallTracker* tracker = |
286 extensions::InstallTrackerFactory::GetForBrowserContext(profile_); | 286 extensions::InstallTrackerFactory::GetForBrowserContext(profile_); |
287 tracker->RemoveObserver(this); | 287 tracker->RemoveObserver(this); |
288 if (delegate_->IsShowingNetworkConfigScreen()) { | 288 if (delegate_->IsShowingNetworkConfigScreen()) { |
289 LOG(WARNING) << "Showing network config screen"; | 289 LOG(WARNING) << "Showing network config screen"; |
290 return; | 290 return; |
291 } | 291 } |
292 | 292 |
293 if (success) { | 293 if (success) { |
| 294 ExtensionService* service = |
| 295 extensions::ExtensionSystem::Get(profile_)->extension_service(); |
| 296 if (service->GetPendingExtensionUpdate(app_id_)) |
| 297 service->FinishDelayedInstallation(app_id_); |
| 298 |
294 MaybeLaunchApp(); | 299 MaybeLaunchApp(); |
295 return; | 300 return; |
296 } | 301 } |
297 | 302 |
298 LOG(ERROR) << "Failed to install the kiosk application app_id: " | 303 LOG(ERROR) << "Failed to install the kiosk application app_id: " |
299 << extension_id; | 304 << extension_id; |
300 OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL); | 305 OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL); |
301 } | 306 } |
302 | 307 |
303 void StartupAppLauncher::OnKioskExtensionLoadedInCache( | 308 void StartupAppLauncher::OnKioskExtensionLoadedInCache( |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 UpdateAppData(); | 402 UpdateAppData(); |
398 delegate_->OnReadyToLaunch(); | 403 delegate_->OnReadyToLaunch(); |
399 } | 404 } |
400 | 405 |
401 void StartupAppLauncher::UpdateAppData() { | 406 void StartupAppLauncher::UpdateAppData() { |
402 KioskAppManager::Get()->ClearAppData(app_id_); | 407 KioskAppManager::Get()->ClearAppData(app_id_); |
403 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); | 408 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); |
404 } | 409 } |
405 | 410 |
406 } // namespace chromeos | 411 } // namespace chromeos |
OLD | NEW |