OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 #endif // defined(OS_ANDROID) | 370 #endif // defined(OS_ANDROID) |
371 | 371 |
372 #if defined(OS_WIN) | 372 #if defined(OS_WIN) |
373 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin; | 373 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin; |
374 metrics_service_->RegisterMetricsProvider( | 374 metrics_service_->RegisterMetricsProvider( |
375 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); | 375 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); |
376 | 376 |
377 // Report exit funnels for canary and dev only. | 377 // Report exit funnels for canary and dev only. |
378 bool report_exit_funnels = false; | 378 bool report_exit_funnels = false; |
379 switch (chrome::VersionInfo::GetChannel()) { | 379 switch (chrome::VersionInfo::GetChannel()) { |
380 case chrome::VersionInfo::CHANNEL_CANARY: | 380 case version_info::Channel::CANARY: |
381 case chrome::VersionInfo::CHANNEL_DEV: | 381 case version_info::Channel::DEV: |
382 report_exit_funnels = true; | 382 report_exit_funnels = true; |
383 break; | 383 break; |
384 } | 384 } |
385 | 385 |
386 metrics_service_->RegisterMetricsProvider( | 386 metrics_service_->RegisterMetricsProvider( |
387 scoped_ptr<metrics::MetricsProvider>( | 387 scoped_ptr<metrics::MetricsProvider>( |
388 new browser_watcher::WatcherMetricsProviderWin( | 388 new browser_watcher::WatcherMetricsProviderWin( |
389 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels))); | 389 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels))); |
390 #endif // defined(OS_WIN) | 390 #endif // defined(OS_WIN) |
391 | 391 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 case content::NOTIFICATION_LOAD_START: | 602 case content::NOTIFICATION_LOAD_START: |
603 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: | 603 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: |
604 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: | 604 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: |
605 metrics_service_->OnApplicationNotIdle(); | 605 metrics_service_->OnApplicationNotIdle(); |
606 break; | 606 break; |
607 | 607 |
608 default: | 608 default: |
609 NOTREACHED(); | 609 NOTREACHED(); |
610 } | 610 } |
611 } | 611 } |
OLD | NEW |