OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_material_design_ui.h" | 5 #include "chrome/browser/ui/webui/policy_material_design_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/webui/policy_ui_handler.h" | 12 #include "chrome/browser/ui/webui/policy_ui_handler.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/grit/policy_resources.h" |
| 15 #include "chrome/grit/policy_resources_map.h" |
14 #include "components/policy/core/common/policy_types.h" | 16 #include "components/policy/core/common/policy_types.h" |
15 #include "components/policy/policy_constants.h" | 17 #include "components/policy/policy_constants.h" |
16 #include "components/policy/risk_tag.h" | 18 #include "components/policy/risk_tag.h" |
17 #include "grit/components_strings.h" | 19 #include "components/strings/grit/components_strings.h" |
18 #include "grit/policy_resources.h" | |
19 #include "grit/policy_resources_map.h" | |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Strings that map from policy::RiskTag enum to i18n string keys and their IDs. | 23 // Strings that map from policy::RiskTag enum to i18n string keys and their IDs. |
24 // Their order has to follow the order of the policy::RiskTag enum. | 24 // Their order has to follow the order of the policy::RiskTag enum. |
25 const PolicyStringMap kPolicyRiskTags[policy::RISK_TAG_COUNT] = { | 25 const PolicyStringMap kPolicyRiskTags[policy::RISK_TAG_COUNT] = { |
26 {"fullAdminAccess", IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS}, | 26 {"fullAdminAccess", IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS}, |
27 {"systemSecurity", IDS_POLICY_RISK_TAG_SYSTEM_SECURITY}, | 27 {"systemSecurity", IDS_POLICY_RISK_TAG_SYSTEM_SECURITY}, |
28 {"websiteSharing", IDS_POLICY_RISK_TAG_WEBSITE_SHARING}, | 28 {"websiteSharing", IDS_POLICY_RISK_TAG_WEBSITE_SHARING}, |
29 {"adminSharing", IDS_POLICY_RISK_TAG_ADMIN_SHARING}, | 29 {"adminSharing", IDS_POLICY_RISK_TAG_ADMIN_SHARING}, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 PolicyMaterialDesignUI::PolicyMaterialDesignUI(content::WebUI* web_ui) : | 93 PolicyMaterialDesignUI::PolicyMaterialDesignUI(content::WebUI* web_ui) : |
94 WebUIController(web_ui) { | 94 WebUIController(web_ui) { |
95 web_ui->AddMessageHandler(new PolicyMaterialDesignUIHandler); | 95 web_ui->AddMessageHandler(new PolicyMaterialDesignUIHandler); |
96 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), | 96 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), |
97 CreatePolicyMaterialDesignUIHtmlSource()); | 97 CreatePolicyMaterialDesignUIHtmlSource()); |
98 } | 98 } |
99 | 99 |
100 PolicyMaterialDesignUI::~PolicyMaterialDesignUI() { | 100 PolicyMaterialDesignUI::~PolicyMaterialDesignUI() { |
101 } | 101 } |
OLD | NEW |