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/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) { | 280 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) { |
281 UMA_HISTOGRAM_ENUMERATION( | 281 UMA_HISTOGRAM_ENUMERATION( |
282 "WebsiteSettings.OriginInfo.PermissionChanged.Allowed", histogram_value, | 282 "WebsiteSettings.OriginInfo.PermissionChanged.Allowed", histogram_value, |
283 num_values); | 283 num_values); |
284 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) { | 284 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) { |
285 UMA_HISTOGRAM_ENUMERATION( | 285 UMA_HISTOGRAM_ENUMERATION( |
286 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value, | 286 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value, |
287 num_values); | 287 num_values); |
288 // Trigger Rappor sampling if it is a permission revoke action. | 288 // Trigger Rappor sampling if it is a permission revoke action. |
| 289 // TODO(tsergeant): Integrate this with the revocation recording performed |
| 290 // in the permissions layer. See crbug.com/469221. |
289 content::PermissionType permission_type; | 291 content::PermissionType permission_type; |
290 if (PermissionUtil::GetPermissionType(type, &permission_type)) { | 292 if (PermissionUtil::GetPermissionType(type, &permission_type)) { |
291 PermissionUmaUtil::PermissionRevoked(permission_type, | 293 PermissionUmaUtil::PermissionRevoked(permission_type, |
292 this->site_url_); | 294 this->site_url_); |
293 } | 295 } |
294 } | 296 } |
295 | 297 |
296 // This is technically redundant given the histogram above, but putting the | 298 // This is technically redundant given the histogram above, but putting the |
297 // total count of permission changes in another histogram makes it easier to | 299 // total count of permission changes in another histogram makes it easier to |
298 // compare it against other kinds of actions in WebsiteSettings[PopupView]. | 300 // compare it against other kinds of actions in WebsiteSettings[PopupView]. |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 info.connection_status = site_connection_status_; | 764 info.connection_status = site_connection_status_; |
763 info.connection_status_description = | 765 info.connection_status_description = |
764 UTF16ToUTF8(site_connection_details_); | 766 UTF16ToUTF8(site_connection_details_); |
765 info.identity_status = site_identity_status_; | 767 info.identity_status = site_identity_status_; |
766 info.identity_status_description = | 768 info.identity_status_description = |
767 UTF16ToUTF8(site_identity_details_); | 769 UTF16ToUTF8(site_identity_details_); |
768 info.cert_id = cert_id_; | 770 info.cert_id = cert_id_; |
769 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 771 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
770 ui_->SetIdentityInfo(info); | 772 ui_->SetIdentityInfo(info); |
771 } | 773 } |
OLD | NEW |