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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
Index: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 91771)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -181,6 +181,7 @@
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/child_process_logging.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/guid.h"
#include "chrome/common/pref_names.h"
@@ -533,9 +534,9 @@
// static
void MetricsService::SetUpNotifications(NotificationRegistrar* registrar,
NotificationObserver* observer) {
- registrar->Add(observer, NotificationType::BROWSER_OPENED,
+ registrar->Add(observer, chrome::BROWSER_OPENED,
NotificationService::AllSources());
- registrar->Add(observer, NotificationType::BROWSER_CLOSED,
+ registrar->Add(observer, chrome::BROWSER_CLOSED,
NotificationService::AllSources());
registrar->Add(observer, NotificationType::USER_ACTION,
NotificationService::AllSources());
@@ -557,11 +558,11 @@
NotificationService::AllSources());
registrar->Add(observer, NotificationType::CHILD_PROCESS_CRASHED,
NotificationService::AllSources());
- registrar->Add(observer, NotificationType::TEMPLATE_URL_SERVICE_LOADED,
+ registrar->Add(observer, chrome::TEMPLATE_URL_SERVICE_LOADED,
NotificationService::AllSources());
- registrar->Add(observer, NotificationType::OMNIBOX_OPENED_URL,
+ registrar->Add(observer, chrome::OMNIBOX_OPENED_URL,
NotificationService::AllSources());
- registrar->Add(observer, NotificationType::BOOKMARK_MODEL_LOADED,
+ registrar->Add(observer, chrome::BOOKMARK_MODEL_LOADED,
NotificationService::AllSources());
}
@@ -579,8 +580,8 @@
current_log_->RecordUserAction(*Details<const char*>(details).ptr());
break;
- case NotificationType::BROWSER_OPENED:
- case NotificationType::BROWSER_CLOSED:
+ case chrome::BROWSER_OPENED:
+ case chrome::BROWSER_CLOSED:
LogWindowChange(type, source, details);
break;
@@ -623,11 +624,11 @@
LogChildProcessChange(type, source, details);
break;
- case NotificationType::TEMPLATE_URL_SERVICE_LOADED:
+ case chrome::TEMPLATE_URL_SERVICE_LOADED:
LogKeywords(Source<TemplateURLService>(source).ptr());
break;
- case NotificationType::OMNIBOX_OPENED_URL: {
+ case chrome::OMNIBOX_OPENED_URL: {
MetricsLog* current_log = current_log_->AsMetricsLog();
DCHECK(current_log);
current_log->RecordOmniboxOpenedURL(
@@ -635,7 +636,7 @@
break;
}
- case NotificationType::BOOKMARK_MODEL_LOADED: {
+ case chrome::BOOKMARK_MODEL_LOADED: {
Profile* p = Source<Profile>(source).ptr();
if (p)
LogBookmarks(p->GetBookmarkModel());
@@ -1404,12 +1405,12 @@
switch (type.value) {
case NotificationType::TAB_PARENTED:
- case NotificationType::BROWSER_OPENED:
+ case chrome::BROWSER_OPENED:
window_type = MetricsLog::WINDOW_CREATE;
break;
case NotificationType::TAB_CLOSING:
- case NotificationType::BROWSER_CLOSED:
+ case chrome::BROWSER_CLOSED:
window_map_.erase(window_map_.find(window_or_tab));
window_type = MetricsLog::WINDOW_DESTROY;
break;

Powered by Google App Engine
This is Rietveld 408576698