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

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

Issue 874643003: Add UMA histogram timers for ProcessManager and BackgroundContentsService startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: macros 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 | extensions/browser/process_manager.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 f502748a09528098d63af52ba1c67691ecb0d18a..49d1b3a5b5267d673f074de2dc3ea1f9cfb9ff09 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram_macros.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "base/strings/string_util.h"
@@ -343,10 +344,13 @@ void BackgroundContentsService::Observe(
const content::NotificationDetails& details) {
switch (type) {
case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED: {
+ const base::TimeTicks start_time = base::TimeTicks::Now();
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 | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698