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

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

Issue 868163002: Only report exit funnels for canary and dev channels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 metrics_service_->RegisterMetricsProvider( 289 metrics_service_->RegisterMetricsProvider(
290 scoped_ptr<metrics::MetricsProvider>( 290 scoped_ptr<metrics::MetricsProvider>(
291 new AndroidMetricsProvider(g_browser_process->local_state()))); 291 new AndroidMetricsProvider(g_browser_process->local_state())));
292 #endif // defined(OS_ANDROID) 292 #endif // defined(OS_ANDROID)
293 293
294 #if defined(OS_WIN) 294 #if defined(OS_WIN)
295 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin; 295 google_update_metrics_provider_ = new GoogleUpdateMetricsProviderWin;
296 metrics_service_->RegisterMetricsProvider( 296 metrics_service_->RegisterMetricsProvider(
297 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_)); 297 scoped_ptr<metrics::MetricsProvider>(google_update_metrics_provider_));
298 298
299 // Report exit funnels for canary and dev only.
300 bool report_exit_funnels = false;
301 switch (chrome::VersionInfo::GetChannel()) {
302 case chrome::VersionInfo::CHANNEL_CANARY:
303 case chrome::VersionInfo::CHANNEL_DEV:
304 report_exit_funnels = true;
Alexei Svitkine (slow) 2015/01/23 18:45:22 Why can't this code be part of WatcherMetricsProvi
Sigurður Ásgeirsson 2015/01/23 18:48:43 The provider is a component - I didn't think it's
Alexei Svitkine (slow) 2015/01/23 18:50:53 Ah, you're absolutely right!
305 break;
306 }
307
299 metrics_service_->RegisterMetricsProvider( 308 metrics_service_->RegisterMetricsProvider(
300 scoped_ptr<metrics::MetricsProvider>( 309 scoped_ptr<metrics::MetricsProvider>(
301 new browser_watcher::WatcherMetricsProviderWin( 310 new browser_watcher::WatcherMetricsProviderWin(
302 chrome::kBrowserExitCodesRegistryPath))); 311 chrome::kBrowserExitCodesRegistryPath, report_exit_funnels)));
303 #endif // defined(OS_WIN) 312 #endif // defined(OS_WIN)
304 313
305 #if defined(ENABLE_PLUGINS) 314 #if defined(ENABLE_PLUGINS)
306 plugin_metrics_provider_ = 315 plugin_metrics_provider_ =
307 new PluginMetricsProvider(g_browser_process->local_state()); 316 new PluginMetricsProvider(g_browser_process->local_state());
308 metrics_service_->RegisterMetricsProvider( 317 metrics_service_->RegisterMetricsProvider(
309 scoped_ptr<metrics::MetricsProvider>(plugin_metrics_provider_)); 318 scoped_ptr<metrics::MetricsProvider>(plugin_metrics_provider_));
310 #endif // defined(ENABLE_PLUGINS) 319 #endif // defined(ENABLE_PLUGINS)
311 320
312 #if defined(OS_CHROMEOS) 321 #if defined(OS_CHROMEOS)
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // Capture the histogram samples. 545 // Capture the histogram samples.
537 if (dumps_with_crash != 0) 546 if (dumps_with_crash != 0)
538 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 547 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
539 if (dumps_with_no_crash != 0) 548 if (dumps_with_no_crash != 0)
540 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
541 int total_dumps = dumps_with_crash + dumps_with_no_crash; 550 int total_dumps = dumps_with_crash + dumps_with_no_crash;
542 if (total_dumps != 0) 551 if (total_dumps != 0)
543 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 552 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
544 } 553 }
545 #endif // defined(OS_WIN) 554 #endif // defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698