| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/policy_ui_handler.h" | 5 #include "chrome/browser/ui/webui/policy_ui_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/json/json_writer.h" | 15 #include "base/json/json_writer.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/policy/profile_policy_connector.h" | 25 #include "chrome/browser/policy/profile_policy_connector.h" |
| 26 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 26 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| 27 #include "chrome/browser/policy/schema_registry_service.h" | 27 #include "chrome/browser/policy/schema_registry_service.h" |
| 28 #include "chrome/browser/policy/schema_registry_service_factory.h" | 28 #include "chrome/browser/policy/schema_registry_service_factory.h" |
| 29 #include "chrome/browser/profiles/profile.h" | 29 #include "chrome/browser/profiles/profile.h" |
| 30 #include "chrome/grit/policy_resources.h" | |
| 31 #include "chrome/grit/policy_resources_map.h" | |
| 32 #include "components/policy/core/browser/browser_policy_connector.h" | 30 #include "components/policy/core/browser/browser_policy_connector.h" |
| 33 #include "components/policy/core/browser/cloud/message_util.h" | 31 #include "components/policy/core/browser/cloud/message_util.h" |
| 34 #include "components/policy/core/browser/configuration_policy_handler_list.h" | 32 #include "components/policy/core/browser/configuration_policy_handler_list.h" |
| 35 #include "components/policy/core/common/cloud/cloud_policy_client.h" | 33 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 36 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 34 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 37 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 35 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 38 #include "components/policy/core/common/cloud/cloud_policy_manager.h" | 36 #include "components/policy/core/common/cloud/cloud_policy_manager.h" |
| 39 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h" | 37 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h" |
| 40 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 38 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 41 #include "components/policy/core/common/cloud/cloud_policy_validator.h" | 39 #include "components/policy/core/common/cloud/cloud_policy_validator.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 } | 813 } |
| 816 | 814 |
| 817 void PolicyUIHandler::OnRefreshPoliciesDone() const { | 815 void PolicyUIHandler::OnRefreshPoliciesDone() const { |
| 818 web_ui()->CallJavascriptFunctionUnsafe("policy.Page.reloadPoliciesDone"); | 816 web_ui()->CallJavascriptFunctionUnsafe("policy.Page.reloadPoliciesDone"); |
| 819 } | 817 } |
| 820 | 818 |
| 821 policy::PolicyService* PolicyUIHandler::GetPolicyService() const { | 819 policy::PolicyService* PolicyUIHandler::GetPolicyService() const { |
| 822 return policy::ProfilePolicyConnectorFactory::GetForBrowserContext( | 820 return policy::ProfilePolicyConnectorFactory::GetForBrowserContext( |
| 823 web_ui()->GetWebContents()->GetBrowserContext())->policy_service(); | 821 web_ui()->GetWebContents()->GetBrowserContext())->policy_service(); |
| 824 } | 822 } |
| OLD | NEW |