| Index: chrome/browser/metrics/thread_watcher.cc
|
| diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
|
| index 75c7d5c1528cd875fbdeabdacd375cab2cb6ec9e..ca5395e2b26f9dd8d8bd80581d1d941f3a86b39b 100644
|
| --- a/chrome/browser/metrics/thread_watcher.cc
|
| +++ b/chrome/browser/metrics/thread_watcher.cc
|
| @@ -11,16 +11,18 @@
|
| #include "base/debug/alias.h"
|
| #include "base/debug/dump_without_crashing.h"
|
| #include "base/lazy_instance.h"
|
| +#include "base/metrics/field_trial.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_tokenizer.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "build/build_config.h"
|
| -#include "chrome/browser/metrics/metrics_service.h"
|
| +#include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/chrome_version_info.h"
|
| #include "chrome/common/logging_chrome.h"
|
| +#include "content/public/browser/notification_service.h"
|
|
|
| #if defined(OS_WIN)
|
| #include "base/win/windows_version.h"
|
| @@ -783,7 +785,34 @@ void ThreadWatcherObserver::SetupNotifications(
|
| const base::TimeDelta& wakeup_interval) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| ThreadWatcherObserver* observer = new ThreadWatcherObserver(wakeup_interval);
|
| - MetricsService::SetUpNotifications(&observer->registrar_, observer);
|
| + observer->registrar_.Add(
|
| + observer,
|
| + chrome::NOTIFICATION_BROWSER_OPENED,
|
| + content::NotificationService::AllBrowserContextsAndSources());
|
| + observer->registrar_.Add(observer,
|
| + chrome::NOTIFICATION_BROWSER_CLOSED,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + chrome::NOTIFICATION_TAB_PARENTED,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + chrome::NOTIFICATION_TAB_CLOSING,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + content::NOTIFICATION_LOAD_START,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + content::NOTIFICATION_LOAD_STOP,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + content::NOTIFICATION_RENDER_WIDGET_HOST_HANG,
|
| + content::NotificationService::AllSources());
|
| + observer->registrar_.Add(observer,
|
| + chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
|
| + content::NotificationService::AllSources());
|
| }
|
|
|
| // static
|
|
|