| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/component_updater/supervised_user_whitelist_installer.h
" | 5 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/files/file_enumerator.h" | 12 #include "base/files/file_enumerator.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/files/important_file_writer.h" | 15 #include "base/files/important_file_writer.h" |
| 16 #include "base/location.h" | 16 #include "base/location.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/metrics/user_metrics.h" | 19 #include "base/metrics/user_metrics.h" |
| 20 #include "base/metrics/user_metrics_action.h" | 20 #include "base/metrics/user_metrics_action.h" |
| 21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
| 22 #include "base/prefs/pref_registry_simple.h" | |
| 23 #include "base/prefs/pref_service.h" | |
| 24 #include "base/prefs/scoped_user_pref_update.h" | |
| 25 #include "base/scoped_observer.h" | 22 #include "base/scoped_observer.h" |
| 26 #include "base/sequenced_task_runner.h" | 23 #include "base/sequenced_task_runner.h" |
| 27 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
| 28 #include "base/thread_task_runner_handle.h" | 25 #include "base/thread_task_runner_handle.h" |
| 29 #include "chrome/browser/profiles/profile_info_cache.h" | 26 #include "chrome/browser/profiles/profile_info_cache.h" |
| 30 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 27 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| 31 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" | 28 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" |
| 32 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 33 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
| 34 #include "components/component_updater/component_updater_paths.h" | 31 #include "components/component_updater/component_updater_paths.h" |
| 35 #include "components/component_updater/component_updater_service.h" | 32 #include "components/component_updater/component_updater_service.h" |
| 36 #include "components/component_updater/default_component_installer.h" | 33 #include "components/component_updater/default_component_installer.h" |
| 37 #include "components/crx_file/id_util.h" | 34 #include "components/crx_file/id_util.h" |
| 35 #include "components/prefs/pref_registry_simple.h" |
| 36 #include "components/prefs/pref_service.h" |
| 37 #include "components/prefs/scoped_user_pref_update.h" |
| 38 #include "components/safe_json/json_sanitizer.h" | 38 #include "components/safe_json/json_sanitizer.h" |
| 39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
| 40 | 40 |
| 41 namespace component_updater { | 41 namespace component_updater { |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 const char kSanitizedWhitelistExtension[] = ".json"; | 45 const char kSanitizedWhitelistExtension[] = ".json"; |
| 46 | 46 |
| 47 const char kWhitelistedContent[] = "whitelisted_content"; | 47 const char kWhitelistedContent[] = "whitelisted_content"; |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 573 |
| 574 // static | 574 // static |
| 575 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( | 575 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( |
| 576 OnDemandUpdater* updater, | 576 OnDemandUpdater* updater, |
| 577 const std::string& crx_id) { | 577 const std::string& crx_id) { |
| 578 const bool result = updater->OnDemandUpdate(crx_id); | 578 const bool result = updater->OnDemandUpdate(crx_id); |
| 579 DCHECK(result); | 579 DCHECK(result); |
| 580 } | 580 } |
| 581 | 581 |
| 582 } // namespace component_updater | 582 } // namespace component_updater |
| OLD | NEW |