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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 959513002: Refactor Extension initialization logic. Add tracing and additional histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yoz comments Created 5 years, 10 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 | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 9cb64478d585083d666e2589f870d15db6fd1d18..77089738c7a8440fed5de7be2cfe85c60d32d787 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -342,15 +342,15 @@ void BackgroundContentsService::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
+ TRACE_EVENT0("browser,startup", "BackgroundContentsService::Observe");
switch (type) {
case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED: {
- const base::TimeTicks start_time = base::TimeTicks::Now();
+ SCOPED_UMA_HISTOGRAM_TIMER(
+ "Extensions.BackgroundContentsServiceStartupTime");
Profile* profile = content::Source<Profile>(source).ptr();
LoadBackgroundContentsFromManifests(profile);
LoadBackgroundContentsFromPrefs(profile);
SendChangeNotification(profile);
- UMA_HISTOGRAM_TIMES("Extensions.BackgroundContentsServiceStartupTime",
- base::TimeTicks::Now() - start_time);
break;
}
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698