Chromium Code Reviews| 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..fb3888f4ec1fd4614de45a5a0107215ea6825a3c 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.h" |
|
Ilya Sherman
2015/02/05 02:50:26
nit: Please include histogram_macros instead.
Yoyo Zhou
2015/02/05 03:08:02
Done.
|
| #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("BackgroundContentsService.LoadOnExtensionsReadyTime", |
| + base::TimeTicks::Now() - start_time); |
| break; |
| } |
| case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED: |