| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 metrics_service_->RegisterMetricsProvider( | 384 metrics_service_->RegisterMetricsProvider( |
| 385 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); | 385 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); |
| 386 | 386 |
| 387 // Report exit funnels for canary and dev only. | 387 // Report exit funnels for canary and dev only. |
| 388 bool report_exit_funnels = false; | 388 bool report_exit_funnels = false; |
| 389 switch (chrome::GetChannel()) { | 389 switch (chrome::GetChannel()) { |
| 390 case version_info::Channel::CANARY: | 390 case version_info::Channel::CANARY: |
| 391 case version_info::Channel::DEV: | 391 case version_info::Channel::DEV: |
| 392 report_exit_funnels = true; | 392 report_exit_funnels = true; |
| 393 break; | 393 break; |
| 394 case version_info::Channel::UNKNOWN: |
| 395 case version_info::Channel::BETA: |
| 396 case version_info::Channel::STABLE: |
| 397 // report_exit_funnels was initialized to the right value above. |
| 398 DCHECK(!report_exit_funnels); |
| 399 break; |
| 394 } | 400 } |
| 395 | 401 |
| 396 metrics_service_->RegisterMetricsProvider( | 402 metrics_service_->RegisterMetricsProvider( |
| 397 scoped_ptr<metrics::MetricsProvider>( | 403 scoped_ptr<metrics::MetricsProvider>( |
| 398 new browser_watcher::WatcherMetricsProviderWin( | 404 new browser_watcher::WatcherMetricsProviderWin( |
| 399 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels))); | 405 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels))); |
| 400 #endif // defined(OS_WIN) | 406 #endif // defined(OS_WIN) |
| 401 | 407 |
| 402 #if defined(ENABLE_PLUGINS) | 408 #if defined(ENABLE_PLUGINS) |
| 403 plugin_metrics_provider_ = | 409 plugin_metrics_provider_ = |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 case content::NOTIFICATION_LOAD_START: | 618 case content::NOTIFICATION_LOAD_START: |
| 613 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: | 619 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: |
| 614 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: | 620 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: |
| 615 metrics_service_->OnApplicationNotIdle(); | 621 metrics_service_->OnApplicationNotIdle(); |
| 616 break; | 622 break; |
| 617 | 623 |
| 618 default: | 624 default: |
| 619 NOTREACHED(); | 625 NOTREACHED(); |
| 620 } | 626 } |
| 621 } | 627 } |
| OLD | NEW |