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

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

Issue 860273006: Wait for pending extensions before launching kiosk app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | 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/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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 FROM_HERE, 265 FROM_HERE,
266 base::Bind(&StartupAppLauncher::MaybeInitializeNetwork, AsWeakPtr())); 266 base::Bind(&StartupAppLauncher::MaybeInitializeNetwork, AsWeakPtr()));
267 return; 267 return;
268 } 268 }
269 OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_LAUNCH); 269 OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_LAUNCH);
270 } 270 }
271 } 271 }
272 272
273 void StartupAppLauncher::OnFinishCrxInstall(const std::string& extension_id, 273 void StartupAppLauncher::OnFinishCrxInstall(const std::string& extension_id,
274 bool success) { 274 bool success) {
275 if (extension_id != app_id_) 275 // Wait for pending updates or dependent extensions to download.
276 if (extensions::ExtensionSystem::Get(profile_)
277 ->extension_service()
278 ->pending_extension_manager()
279 ->HasPendingExtensions()) {
276 return; 280 return;
281 }
277 282
278 extensions::InstallTracker* tracker = 283 extensions::InstallTracker* tracker =
279 extensions::InstallTrackerFactory::GetForBrowserContext(profile_); 284 extensions::InstallTrackerFactory::GetForBrowserContext(profile_);
280 tracker->RemoveObserver(this); 285 tracker->RemoveObserver(this);
281 if (delegate_->IsShowingNetworkConfigScreen()) { 286 if (delegate_->IsShowingNetworkConfigScreen()) {
282 LOG(WARNING) << "Showing network config screen"; 287 LOG(WARNING) << "Showing network config screen";
283 return; 288 return;
284 } 289 }
285 290
286 if (success) { 291 if (success) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 UpdateAppData(); 395 UpdateAppData();
391 delegate_->OnReadyToLaunch(); 396 delegate_->OnReadyToLaunch();
392 } 397 }
393 398
394 void StartupAppLauncher::UpdateAppData() { 399 void StartupAppLauncher::UpdateAppData() {
395 KioskAppManager::Get()->ClearAppData(app_id_); 400 KioskAppManager::Get()->ClearAppData(app_id_);
396 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); 401 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
397 } 402 }
398 403
399 } // namespace chromeos 404 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698