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

Unified Diff: chrome/browser/extensions/installed_loader.cc

Issue 297533002: Improvements to incognito and file access metrics for extensions: only record (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/installed_loader.cc
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index ab16252f0df436508c00f4ed1db55d1644c44059..80c8326daa0f29ce759bc6743ba76e6aca9d4abe 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -443,8 +443,10 @@ void InstalledLoader::LoadAllExtensions() {
extension, "Extensions.Permissions_Load");
// For incognito and file access, skip anything that doesn't appear in
- // settings.
- if (extension->ShouldDisplayInExtensionSettings()) {
+ // settings. Also, policy-installed and unpacked extensions are boring.
+ if (extension->ShouldDisplayInExtensionSettings() &&
+ !Manifest::IsUnpackedLocation(extension->location()) &&
Devlin 2014/05/19 22:10:01 nit: You don't need the IsUnpacked check here, sin
not at google - send to devlin 2014/05/19 22:15:23 ah yes. when will I learn. fixed.
+ !Manifest::IsPolicyLocation(extension->location())) {
if (extension->can_be_incognito_enabled()) {
if (util::IsIncognitoEnabled(extension->id(), profile))
++incognito;
@@ -527,10 +529,15 @@ void InstalledLoader::LoadAllExtensions() {
disabled_for_permissions_count);
UMA_HISTOGRAM_COUNTS_100("Extensions.NonWebStoreNewTabPageOverrides",
non_webstore_ntp_override_count);
- UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", incognito);
- UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoNotAllowed", not_incognito);
- UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessAllowed", file_access);
- UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessNotAllowed", not_file_access);
+ if (incognito + not_incognito > 0) {
+ UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", incognito);
+ UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoNotAllowed", not_incognito);
+ }
+ if (file_access + not_file_access > 0) {
+ UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessAllowed", file_access);
+ UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessNotAllowed",
+ not_file_access);
+ }
}
int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698