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

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

Issue 883023003: Add UMA for startup load time of component extensions. At the moment there is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const Created 5 years, 11 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/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index 53309b21b92f12b16c0d6338d2230aa08344c4f0..3841dba2ef83476e45eb13b9c06b3ad01bfaf427 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -10,7 +10,9 @@
#include "base/files/file_util.h"
#include "base/json/json_string_value_serializer.h"
#include "base/metrics/field_trial.h"
+#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
+#include "base/time/time.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/search/hotword_service.h"
#include "chrome/browser/search/hotword_service_factory.h"
@@ -124,11 +126,14 @@ ComponentLoader::~ComponentLoader() {
}
void ComponentLoader::LoadAll() {
+ const base::TimeTicks start_time = base::TimeTicks::Now();
for (RegisteredComponentExtensions::iterator it =
component_extensions_.begin();
it != component_extensions_.end(); ++it) {
Load(*it);
}
+ UMA_HISTOGRAM_TIMES("Extensions.LoadAllComponentTime",
+ base::TimeTicks::Now() - start_time);
}
base::DictionaryValue* ComponentLoader::ParseManifest(
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698