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

Side by Side Diff: chrome/browser/content_settings/web_site_settings_uma_util.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 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 #include "chrome/browser/content_settings/web_site_settings_uma_util.h" 5 #include "chrome/browser/content_settings/web_site_settings_uma_util.h"
6 6
7 #include <stddef.h>
8
7 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
8 10
9 void WebSiteSettingsUmaUtil::LogPermissionChange(ContentSettingsType type, 11 void WebSiteSettingsUmaUtil::LogPermissionChange(ContentSettingsType type,
10 ContentSetting setting) { 12 ContentSetting setting) {
11 size_t num_values; 13 size_t num_values;
12 int histogram_value = ContentSettingTypeToHistogramValue(type, &num_values); 14 int histogram_value = ContentSettingTypeToHistogramValue(type, &num_values);
13 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged", 15 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged",
14 histogram_value, num_values); 16 histogram_value, num_values);
15 17
16 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) { 18 if (setting == ContentSetting::CONTENT_SETTING_ALLOW) {
17 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Allowed", 19 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Allowed",
18 histogram_value, num_values); 20 histogram_value, num_values);
19 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) { 21 } else if (setting == ContentSetting::CONTENT_SETTING_BLOCK) {
20 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Blocked", 22 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Blocked",
21 histogram_value, num_values); 23 histogram_value, num_values);
22 } else if (setting == ContentSetting::CONTENT_SETTING_DEFAULT) { 24 } else if (setting == ContentSetting::CONTENT_SETTING_DEFAULT) {
23 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Reset", 25 UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged.Reset",
24 histogram_value, num_values); 26 histogram_value, num_values);
25 } else { 27 } else {
26 NOTREACHED() << "Requested to log permission change " << type << " to " 28 NOTREACHED() << "Requested to log permission change " << type << " to "
27 << setting; 29 << setting;
28 } 30 }
29 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/web_site_settings_uma_util.h ('k') | chrome/browser/copresence/chrome_whispernet_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698