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

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

Issue 558683002: Extract the handling of the clean exit beacon from MetricsService. The extracted implementation sup… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 6 years, 3 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
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | components/metrics.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 ChromeMetricsServiceClient::CreateUploader( 265 ChromeMetricsServiceClient::CreateUploader(
266 const std::string& server_url, 266 const std::string& server_url,
267 const std::string& mime_type, 267 const std::string& mime_type,
268 const base::Callback<void(int)>& on_upload_complete) { 268 const base::Callback<void(int)>& on_upload_complete) {
269 return scoped_ptr<metrics::MetricsLogUploader>( 269 return scoped_ptr<metrics::MetricsLogUploader>(
270 new metrics::NetMetricsLogUploader( 270 new metrics::NetMetricsLogUploader(
271 g_browser_process->system_request_context(), server_url, mime_type, 271 g_browser_process->system_request_context(), server_url, mime_type,
272 on_upload_complete)); 272 on_upload_complete));
273 } 273 }
274 274
275 base::string16 ChromeMetricsServiceClient::GetRegistryBackupKey() {
276 #if defined(OS_WIN)
277 return L"Software\\" PRODUCT_STRING_PATH L"\\StabilityMetrics";
278 #else
279 return base::string16();
280 #endif
281 }
282
275 void ChromeMetricsServiceClient::LogPluginLoadingError( 283 void ChromeMetricsServiceClient::LogPluginLoadingError(
276 const base::FilePath& plugin_path) { 284 const base::FilePath& plugin_path) {
277 #if defined(ENABLE_PLUGINS) 285 #if defined(ENABLE_PLUGINS)
278 plugin_metrics_provider_->LogPluginLoadingError(plugin_path); 286 plugin_metrics_provider_->LogPluginLoadingError(plugin_path);
279 #else 287 #else
280 NOTREACHED(); 288 NOTREACHED();
281 #endif // defined(ENABLE_PLUGINS) 289 #endif // defined(ENABLE_PLUGINS)
282 } 290 }
283 291
284 void ChromeMetricsServiceClient::Initialize() { 292 void ChromeMetricsServiceClient::Initialize() {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // Capture the histogram samples. 553 // Capture the histogram samples.
546 if (dumps_with_crash != 0) 554 if (dumps_with_crash != 0)
547 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 555 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
548 if (dumps_with_no_crash != 0) 556 if (dumps_with_no_crash != 0)
549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 557 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
550 int total_dumps = dumps_with_crash + dumps_with_no_crash; 558 int total_dumps = dumps_with_crash + dumps_with_no_crash;
551 if (total_dumps != 0) 559 if (total_dumps != 0)
552 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 560 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
553 } 561 }
554 #endif // defined(OS_WIN) 562 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | components/metrics.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698