| 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;
|
|
|