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

Unified Diff: chrome/browser/extensions/installed_loader.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: 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
Index: chrome/browser/extensions/installed_loader.cc
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index 8d72dcc3fc945b9cf3776d81a91bc21080c577b5..86d9ade4a944d8fb971c4493d5b3340cac689d7c 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -229,8 +229,9 @@ void InstalledLoader::Load(const ExtensionInfo& info, bool write_to_prefs) {
}
void InstalledLoader::LoadAllExtensions() {
- TRACE_EVENT0("browser,startup", "InstalledLoader::LoadAllExtensions");
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Alexei Svitkine (slow) 2015/02/25 16:10:53 This should actually be a DCHECK.
+ TRACE_EVENT0("browser,startup", "InstalledLoader::LoadAllExtensions");
+ SCOPED_UMA_HISTOGRAM_TIMER("Extensions.LoadAllTime");
Yoyo Zhou 2015/02/25 00:19:58 Can we put lines 234-308 inside a scope block, so
rkaplow 2015/02/25 16:37:49 I did mention this in my description - and I agree
Yoyo Zhou 2015/02/25 19:34:29 Ah, I see why it's confusing. It seemed intuitive
rkaplow 2015/02/25 19:59:50 Ok. Added a TODO. Will follow up - just want to se
base::TimeTicks start_time = base::TimeTicks::Now();
@@ -305,8 +306,10 @@ void InstalledLoader::LoadAllExtensions() {
UMA_HISTOGRAM_COUNTS_100("Extensions.Disabled",
extension_registry_->disabled_extensions().size());
- UMA_HISTOGRAM_TIMES("Extensions.LoadAllTime",
- base::TimeTicks::Now() - start_time);
+ LoadExtensionsMetrics();
+}
Yoyo Zhou 2015/02/25 00:19:58 nit: new line after
rkaplow 2015/02/25 16:37:49 Done.
+void InstalledLoader::LoadExtensionsMetrics() {
+ Profile* profile = extension_service_->profile();
int app_user_count = 0;
int app_external_count = 0;

Powered by Google App Engine
This is Rietveld 408576698