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

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

Issue 2879673002: Restrict EventRouter::Get/Set-RegisteredEvents. (Closed)
Patch Set: address comments Created 3 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 | « chrome/browser/apps/app_browsertest.cc ('k') | extensions/browser/event_router.h » ('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 efb5b25a3176b3aa71bcc989c39e8ebb6ec7b438..9e7a70d25a3a2384d56ef350f7e5e3ad8ee4a34e 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -446,8 +446,8 @@ void InstalledLoader::RecordExtensionsMetrics() {
// Count extension event pages with no registered events. Either the
// event page is badly designed, or there may be a bug where the event
// page failed to start after an update (crbug.com/469361).
- if (EventRouter::Get(extension_service_->profile())->
- GetRegisteredEvents(extension->id()).size() == 0) {
+ if (!EventRouter::Get(extension_service_->profile())
+ ->HasRegisteredEvents(extension->id())) {
++eventless_event_pages_count;
VLOG(1) << "Event page without registered event listeners: "
<< extension->id() << " " << extension->name();
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | extensions/browser/event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698