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

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

Issue 2308933002: Plugin Power Saver Tiny: Add RAPPOR metric for new ALLOW exceptions. (Closed)
Patch Set: Created 4 years, 3 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
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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // the Website Settings UI. 315 // the Website Settings UI.
316 size_t num_values; 316 size_t num_values;
317 int histogram_value = ContentSettingTypeToHistogramValue(type, &num_values); 317 int histogram_value = ContentSettingTypeToHistogramValue(type, &num_values);
318 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.OriginInfo.PermissionChanged", 318 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.OriginInfo.PermissionChanged",
319 histogram_value, num_values); 319 histogram_value, num_values);
320 320
321 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) { 321 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) {
322 UMA_HISTOGRAM_ENUMERATION( 322 UMA_HISTOGRAM_ENUMERATION(
323 "WebsiteSettings.OriginInfo.PermissionChanged.Allowed", histogram_value, 323 "WebsiteSettings.OriginInfo.PermissionChanged.Allowed", histogram_value,
324 num_values); 324 num_values);
325
326 if (type == CONTENT_SETTINGS_TYPE_PLUGINS) {
327 rappor::SampleDomainAndRegistryFromGURL(
328 g_browser_process->rappor_service(),
329 "ContentSettings.Plugins.AddedAllowException", site_url_);
330 }
325 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) { 331 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) {
326 UMA_HISTOGRAM_ENUMERATION( 332 UMA_HISTOGRAM_ENUMERATION(
327 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value, 333 "WebsiteSettings.OriginInfo.PermissionChanged.Blocked", histogram_value,
328 num_values); 334 num_values);
329 } 335 }
330 336
331 // This is technically redundant given the histogram above, but putting the 337 // This is technically redundant given the histogram above, but putting the
332 // total count of permission changes in another histogram makes it easier to 338 // total count of permission changes in another histogram makes it easier to
333 // compare it against other kinds of actions in WebsiteSettings[PopupView]. 339 // compare it against other kinds of actions in WebsiteSettings[PopupView].
334 RecordWebsiteSettingsAction(WEBSITE_SETTINGS_CHANGED_PERMISSION); 340 RecordWebsiteSettingsAction(WEBSITE_SETTINGS_CHANGED_PERMISSION);
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 info.connection_status = site_connection_status_; 810 info.connection_status = site_connection_status_;
805 info.connection_status_description = 811 info.connection_status_description =
806 UTF16ToUTF8(site_connection_details_); 812 UTF16ToUTF8(site_connection_details_);
807 info.identity_status = site_identity_status_; 813 info.identity_status = site_identity_status_;
808 info.identity_status_description = 814 info.identity_status_description =
809 UTF16ToUTF8(site_identity_details_); 815 UTF16ToUTF8(site_identity_details_);
810 info.cert_id = cert_id_; 816 info.cert_id = cert_id_;
811 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 817 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
812 ui_->SetIdentityInfo(info); 818 ui_->SetIdentityInfo(info);
813 } 819 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698