OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 package org.chromium.chrome.browser.preferences.website; | 5 package org.chromium.chrome.browser.preferences.website; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 | 8 |
9 import org.chromium.base.ThreadUtils; | 9 import org.chromium.base.ThreadUtils; |
10 import org.chromium.chrome.R; | 10 import org.chromium.chrome.R; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 R.string.website_settings_category_ask_before_s
ending, 0)); | 131 R.string.website_settings_category_ask_before_s
ending, 0)); |
132 localMap.put(ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS, | 132 localMap.put(ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS, |
133 new ResourceItem(R.drawable.permission_popups, R.string.popu
p_permission_title, | 133 new ResourceItem(R.drawable.permission_popups, R.string.popu
p_permission_title, |
134 R.string.popup_permission_title, ContentSetting
.ALLOW, | 134 R.string.popup_permission_title, ContentSetting
.ALLOW, |
135 ContentSetting.BLOCK, 0, | 135 ContentSetting.BLOCK, 0, |
136 R.string.website_settings_category_blocked_reco
mmended)); | 136 R.string.website_settings_category_blocked_reco
mmended)); |
137 localMap.put(ContentSettingsType.CONTENT_SETTINGS_TYPE_PROTECTED_MED
IA_IDENTIFIER, | 137 localMap.put(ContentSettingsType.CONTENT_SETTINGS_TYPE_PROTECTED_MED
IA_IDENTIFIER, |
138 new ResourceItem(R.drawable.permission_protected_media, | 138 new ResourceItem(R.drawable.permission_protected_media, |
139 org.chromium.chrome.R.string.protected_content,
0, | 139 org.chromium.chrome.R.string.protected_content,
0, |
140 ContentSetting.ASK, ContentSetting.BLOCK, 0, 0)
); | 140 ContentSetting.ASK, ContentSetting.BLOCK, 0, 0)
); |
| 141 localMap.put(ContentSettingsType.CONTENT_SETTINGS_TYPE_KEYGEN, |
| 142 new ResourceItem(R.drawable.permission_keygen, |
| 143 R.string.keygen_permission_title, |
| 144 R.string.keygen_permission_title, ContentSettin
g.ALLOW, |
| 145 ContentSetting.BLOCK, |
| 146 0, R.string.website_settings_category_blocked_r
ecommended)); |
141 sResourceInfo = localMap; | 147 sResourceInfo = localMap; |
142 } | 148 } |
143 return sResourceInfo; | 149 return sResourceInfo; |
144 } | 150 } |
145 | 151 |
146 /** | 152 /** |
147 * Returns the ResourceItem for a ContentSettingsType. | 153 * Returns the ResourceItem for a ContentSettingsType. |
148 */ | 154 */ |
149 private static ResourceItem getResourceItem(int contentType) { | 155 private static ResourceItem getResourceItem(int contentType) { |
150 return getResourceInfo().get(contentType); | 156 return getResourceInfo().get(contentType); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 261 } |
256 | 262 |
257 /** | 263 /** |
258 * Returns the summary for Cookie content settings when it is allowed | 264 * Returns the summary for Cookie content settings when it is allowed |
259 * except for those from third party sources. | 265 * except for those from third party sources. |
260 */ | 266 */ |
261 public static int getCookieAllowedExceptThirdPartySummary() { | 267 public static int getCookieAllowedExceptThirdPartySummary() { |
262 return R.string.website_settings_category_allowed_except_third_party; | 268 return R.string.website_settings_category_allowed_except_third_party; |
263 } | 269 } |
264 } | 270 } |
OLD | NEW |