Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 2150903002: Reland add hooks to permission layer for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 num_values); 286 num_values);
287 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) { 287 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) {
288 UMA_HISTOGRAM_ENUMERATION( 288 UMA_HISTOGRAM_ENUMERATION(
289 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value, 289 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value,
290 num_values); 290 num_values);
291 // Trigger Rappor sampling if it is a permission revoke action. 291 // Trigger Rappor sampling if it is a permission revoke action.
292 // TODO(tsergeant): Integrate this with the revocation recording performed 292 // TODO(tsergeant): Integrate this with the revocation recording performed
293 // in the permissions layer. See crbug.com/469221. 293 // in the permissions layer. See crbug.com/469221.
294 content::PermissionType permission_type; 294 content::PermissionType permission_type;
295 if (PermissionUtil::GetPermissionType(type, &permission_type)) { 295 if (PermissionUtil::GetPermissionType(type, &permission_type)) {
296 PermissionUmaUtil::PermissionRevoked(permission_type, 296 PermissionUmaUtil::PermissionRevoked(permission_type, this->site_url_,
297 this->site_url_); 297 this->profile_);
298 } 298 }
299 } 299 }
300 300
301 // This is technically redundant given the histogram above, but putting the 301 // This is technically redundant given the histogram above, but putting the
302 // total count of permission changes in another histogram makes it easier to 302 // total count of permission changes in another histogram makes it easier to
303 // compare it against other kinds of actions in WebsiteSettings[PopupView]. 303 // compare it against other kinds of actions in WebsiteSettings[PopupView].
304 RecordWebsiteSettingsAction(WEBSITE_SETTINGS_CHANGED_PERMISSION); 304 RecordWebsiteSettingsAction(WEBSITE_SETTINGS_CHANGED_PERMISSION);
305 305
306 content_settings_->SetNarrowestContentSetting(site_url_, site_url_, type, 306 content_settings_->SetNarrowestContentSetting(site_url_, site_url_, type,
307 setting); 307 setting);
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 info.connection_status = site_connection_status_; 762 info.connection_status = site_connection_status_;
763 info.connection_status_description = 763 info.connection_status_description =
764 UTF16ToUTF8(site_connection_details_); 764 UTF16ToUTF8(site_connection_details_);
765 info.identity_status = site_identity_status_; 765 info.identity_status = site_identity_status_;
766 info.identity_status_description = 766 info.identity_status_description =
767 UTF16ToUTF8(site_identity_details_); 767 UTF16ToUTF8(site_identity_details_);
768 info.cert_id = cert_id_; 768 info.cert_id = cert_id_;
769 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 769 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
770 ui_->SetIdentityInfo(info); 770 ui_->SetIdentityInfo(info);
771 } 771 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698