| 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/kiosk_app_manager.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 416 |
| 417 void KioskAppManager::UpdateExternalCache() { | 417 void KioskAppManager::UpdateExternalCache() { |
| 418 UpdateAppData(); | 418 UpdateAppData(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void KioskAppManager::OnKioskAppCacheUpdated(const std::string& app_id) { | 421 void KioskAppManager::OnKioskAppCacheUpdated(const std::string& app_id) { |
| 422 FOR_EACH_OBSERVER( | 422 FOR_EACH_OBSERVER( |
| 423 KioskAppManagerObserver, observers_, OnKioskAppCacheUpdated(app_id)); | 423 KioskAppManagerObserver, observers_, OnKioskAppCacheUpdated(app_id)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 void KioskAppManager::OnKioskAppExternalUpdateComplete(bool success) { |
| 427 FOR_EACH_OBSERVER(KioskAppManagerObserver, |
| 428 observers_, |
| 429 OnKioskAppExternalUpdateComplete(success)); |
| 430 } |
| 431 |
| 426 void KioskAppManager::PutValidatedExternalExtension( | 432 void KioskAppManager::PutValidatedExternalExtension( |
| 427 const std::string& app_id, | 433 const std::string& app_id, |
| 428 const base::FilePath& crx_path, | 434 const base::FilePath& crx_path, |
| 429 const std::string& version, | 435 const std::string& version, |
| 430 const ExternalCache::PutExternalExtensionCallback& callback) { | 436 const ExternalCache::PutExternalExtensionCallback& callback) { |
| 431 external_cache_->PutExternalExtension(app_id, crx_path, version, callback); | 437 external_cache_->PutExternalExtension(app_id, crx_path, version, callback); |
| 432 } | 438 } |
| 433 | 439 |
| 434 KioskAppManager::KioskAppManager() | 440 KioskAppManager::KioskAppManager() |
| 435 : ownership_established_(false), external_loader_created_(false) { | 441 : ownership_established_(false), external_loader_created_(false) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir); | 626 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir); |
| 621 } | 627 } |
| 622 | 628 |
| 623 void KioskAppManager::GetCrxUnpackDir(base::FilePath* unpack_dir) { | 629 void KioskAppManager::GetCrxUnpackDir(base::FilePath* unpack_dir) { |
| 624 base::FilePath temp_dir; | 630 base::FilePath temp_dir; |
| 625 base::GetTempDir(&temp_dir); | 631 base::GetTempDir(&temp_dir); |
| 626 *unpack_dir = temp_dir.AppendASCII(kCrxUnpackDir); | 632 *unpack_dir = temp_dir.AppendASCII(kCrxUnpackDir); |
| 627 } | 633 } |
| 628 | 634 |
| 629 } // namespace chromeos | 635 } // namespace chromeos |
| OLD | NEW |