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

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: 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 | « chrome/browser/extensions/installed_loader.h ('k') | 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/extensions/installed_loader.cc
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index 8d72dcc3fc945b9cf3776d81a91bc21080c577b5..569848978918867e5b60ad74d36702bba0f30fce 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -229,9 +229,9 @@ void InstalledLoader::Load(const ExtensionInfo& info, bool write_to_prefs) {
}
void InstalledLoader::LoadAllExtensions() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
TRACE_EVENT0("browser,startup", "InstalledLoader::LoadAllExtensions");
- CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
+ SCOPED_UMA_HISTOGRAM_TIMER("Extensions.LoadAllTime2");
base::TimeTicks start_time = base::TimeTicks::Now();
Profile* profile = extension_service_->profile();
@@ -305,8 +305,14 @@ void InstalledLoader::LoadAllExtensions() {
UMA_HISTOGRAM_COUNTS_100("Extensions.Disabled",
extension_registry_->disabled_extensions().size());
+ // TODO(rkaplow): Obsolete this when verified similar to LoadAllTime2.
UMA_HISTOGRAM_TIMES("Extensions.LoadAllTime",
base::TimeTicks::Now() - start_time);
+ RecordExtensionsMetrics();
+}
+
+void InstalledLoader::RecordExtensionsMetrics() {
+ Profile* profile = extension_service_->profile();
int app_user_count = 0;
int app_external_count = 0;
« no previous file with comments | « chrome/browser/extensions/installed_loader.h ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698