| 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" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/prefs/pref_registry_simple.h" | 14 #include "base/prefs/pref_registry_simple.h" |
| 15 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
| 16 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
| 17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" | 20 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" |
| 21 #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h" | 21 #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h" |
| 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" | 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" |
| 23 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 24 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 25 #include "chrome/browser/chromeos/policy/device_local_account.h" | 24 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 26 #include "chrome/browser/chromeos/settings/cros_settings.h" | 25 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 27 #include "chrome/browser/chromeos/settings/owner_key_util.h" | 26 #include "chrome/browser/chromeos/settings/owner_key_util.h" |
| 28 #include "chrome/browser/extensions/external_loader.h" | 27 #include "chrome/browser/extensions/external_loader.h" |
| 29 #include "chrome/browser/extensions/external_provider_impl.h" | 28 #include "chrome/browser/extensions/external_provider_impl.h" |
| 30 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 31 #include "chrome/common/extensions/extension_constants.h" | 30 #include "chrome/common/extensions/extension_constants.h" |
| 32 #include "chromeos/chromeos_paths.h" | 31 #include "chromeos/chromeos_paths.h" |
| 33 #include "chromeos/cryptohome/async_method_caller.h" | 32 #include "chromeos/cryptohome/async_method_caller.h" |
| 34 #include "chromeos/settings/cros_settings_names.h" | 33 #include "chromeos/settings/cros_settings_names.h" |
| 34 #include "components/user_manager/user_manager.h" |
| 35 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
| 36 | 36 |
| 37 namespace chromeos { | 37 namespace chromeos { |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 // Domain that is used for kiosk-app account IDs. | 41 // Domain that is used for kiosk-app account IDs. |
| 42 const char kKioskAppAccountDomain[] = "kiosk-apps"; | 42 const char kKioskAppAccountDomain[] = "kiosk-apps"; |
| 43 | 43 |
| 44 std::string GenerateKioskAppAccountId(const std::string& app_id) { | 44 std::string GenerateKioskAppAccountId(const std::string& app_id) { |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir); | 587 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir); |
| 588 } | 588 } |
| 589 | 589 |
| 590 bool KioskAppManager::GetCachedCrx(const std::string& app_id, | 590 bool KioskAppManager::GetCachedCrx(const std::string& app_id, |
| 591 base::FilePath* file_path, | 591 base::FilePath* file_path, |
| 592 std::string* version) const { | 592 std::string* version) const { |
| 593 return external_cache_->GetExtension(app_id, file_path, version); | 593 return external_cache_->GetExtension(app_id, file_path, version); |
| 594 } | 594 } |
| 595 | 595 |
| 596 } // namespace chromeos | 596 } // namespace chromeos |
| OLD | NEW |