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

Unified Diff: chrome/browser/metrics/thread_watcher.cc

Issue 289283011: Introduce ChromeStabilityMetricsProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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/metrics/metrics_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698