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

Side by Side Diff: chrome/browser/extensions/installed_loader.cc

Issue 2925193002: NOT YET READY: UMA recording the kind of target frame when extensions pierce browsing instance.
Patch Set: Rebasing... Created 3 years, 6 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/extensions/installed_loader.h" 5 #include "chrome/browser/extensions/installed_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 ++eventless_event_pages_count; 449 ++eventless_event_pages_count;
450 VLOG(1) << "Event page without registered event listeners: " 450 VLOG(1) << "Event page without registered event listeners: "
451 << extension->id() << " " << extension->name(); 451 << extension->id() << " " << extension->name();
452 } 452 }
453 } 453 }
454 } 454 }
455 455
456 // Using an enumeration shows us the total installed ratio across all users. 456 // Using an enumeration shows us the total installed ratio across all users.
457 // Using the totals per user at each startup tells us the distribution of 457 // Using the totals per user at each startup tells us the distribution of
458 // usage for each user (e.g. 40% of users have at least one app installed). 458 // usage for each user (e.g. 40% of users have at least one app installed).
459 UMA_HISTOGRAM_ENUMERATION( 459 UMA_HISTOGRAM_ENUMERATION("Extensions.LoadType", type, Manifest::TYPE_MAX);
460 "Extensions.LoadType", type, Manifest::NUM_LOAD_TYPES);
461 switch (type) { 460 switch (type) {
462 case Manifest::TYPE_THEME: 461 case Manifest::TYPE_THEME:
463 ++theme_count; 462 ++theme_count;
464 break; 463 break;
465 case Manifest::TYPE_USER_SCRIPT: 464 case Manifest::TYPE_USER_SCRIPT:
466 ++user_script_count; 465 ++user_script_count;
467 break; 466 break;
468 case Manifest::TYPE_HOSTED_APP: 467 case Manifest::TYPE_HOSTED_APP:
469 ++hosted_app_count; 468 ++hosted_app_count;
470 if (Manifest::IsExternalLocation(location)) { 469 if (Manifest::IsExternalLocation(location)) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 631 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
633 int flags = extension_prefs_->GetCreationFlags(info->extension_id); 632 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
634 if (!Manifest::IsUnpackedLocation(info->extension_location)) 633 if (!Manifest::IsUnpackedLocation(info->extension_location))
635 flags |= Extension::REQUIRE_KEY; 634 flags |= Extension::REQUIRE_KEY;
636 if (extension_prefs_->AllowFileAccess(info->extension_id)) 635 if (extension_prefs_->AllowFileAccess(info->extension_id))
637 flags |= Extension::ALLOW_FILE_ACCESS; 636 flags |= Extension::ALLOW_FILE_ACCESS;
638 return flags; 637 return flags;
639 } 638 }
640 639
641 } // namespace extensions 640 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.cc ('k') | chrome/browser/extensions/standard_management_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698