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

Side by Side Diff: chrome/browser/metrics/chrome_metrics_service_client.cc

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OWNERS (copy from //chrome/OWNERS) Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 #endif // defined(OS_ANDROID) 371 #endif // defined(OS_ANDROID)
372 372
373 #if defined(OS_WIN) 373 #if defined(OS_WIN)
374 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin; 374 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin;
375 metrics_service_->RegisterMetricsProvider( 375 metrics_service_->RegisterMetricsProvider(
376 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); 376 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_));
377 377
378 // Report exit funnels for canary and dev only. 378 // Report exit funnels for canary and dev only.
379 bool report_exit_funnels = false; 379 bool report_exit_funnels = false;
380 switch (chrome::VersionInfo::GetChannel()) { 380 switch (chrome::VersionInfo::GetChannel()) {
381 case chrome::VersionInfo::CHANNEL_CANARY: 381 case version_info::CHANNEL_CANARY:
382 case chrome::VersionInfo::CHANNEL_DEV: 382 case version_info::CHANNEL_DEV:
383 report_exit_funnels = true; 383 report_exit_funnels = true;
384 break; 384 break;
385 } 385 }
386 386
387 metrics_service_->RegisterMetricsProvider( 387 metrics_service_->RegisterMetricsProvider(
388 scoped_ptr<metrics::MetricsProvider>( 388 scoped_ptr<metrics::MetricsProvider>(
389 new browser_watcher::WatcherMetricsProviderWin( 389 new browser_watcher::WatcherMetricsProviderWin(
390 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels))); 390 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels)));
391 #endif // defined(OS_WIN) 391 #endif // defined(OS_WIN)
392 392
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 case content::NOTIFICATION_LOAD_START: 603 case content::NOTIFICATION_LOAD_START:
604 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: 604 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED:
605 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: 605 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG:
606 metrics_service_->OnApplicationNotIdle(); 606 metrics_service_->OnApplicationNotIdle();
607 break; 607 break;
608 608
609 default: 609 default:
610 NOTREACHED(); 610 NOTREACHED();
611 } 611 }
612 } 612 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698