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

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: unpacked 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..25b58fd421af59e106ab7312052ba963f16296be 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 of course, checked above)
+ // extensions are boring.
+ if (extension->ShouldDisplayInExtensionSettings() &&
+ !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) {
jar (doing other things) 2014/05/20 17:43:34 nit: the above is seemingly meant to be clever, bu
not at google - send to devlin 2014/05/20 17:53:10 We only just added this metric (a few days ago), s
not at google - send to devlin 2014/05/20 18:06:20 I can change it but I think the existing condition
jar (doing other things) 2014/05/21 00:27:20 If you're really enamoured with using the sum, you
not at google - send to devlin 2014/05/21 01:38:48 That change SGTM. I'll come back to this CL tomorr
+ 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