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

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

Issue 1630923002: Remove PRODUCT_STRING_PATH from chrome_constants.h on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@c2_rm_PSP_profile_resetter
Patch Set: Created 4 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_stability_metrics_provider.h" 5 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 25 matching lines...) Expand all
36 void CountBrowserCrashDumpAttempts() { 36 void CountBrowserCrashDumpAttempts() {
37 enum Outcome { 37 enum Outcome {
38 OUTCOME_SUCCESS, 38 OUTCOME_SUCCESS,
39 OUTCOME_FAILURE, 39 OUTCOME_FAILURE,
40 OUTCOME_UNKNOWN, 40 OUTCOME_UNKNOWN,
41 OUTCOME_MAX_VALUE 41 OUTCOME_MAX_VALUE
42 }; 42 };
43 43
44 browser_watcher::CrashReportingMetrics::Values metrics = 44 browser_watcher::CrashReportingMetrics::Values metrics =
45 browser_watcher::CrashReportingMetrics( 45 browser_watcher::CrashReportingMetrics(
46 InstallUtil::IsChromeSxSProcess() 46 chrome::GetBrowserCrashDumpAttemptsRegistryPath())
47 ? chrome::kBrowserCrashDumpAttemptsRegistryPathSxS
48 : chrome::kBrowserCrashDumpAttemptsRegistryPath)
49 .RetrieveAndResetMetrics(); 47 .RetrieveAndResetMetrics();
50 48
51 for (int i = 0; i < metrics.crash_dump_attempts; ++i) { 49 for (int i = 0; i < metrics.crash_dump_attempts; ++i) {
52 Outcome outcome = OUTCOME_UNKNOWN; 50 Outcome outcome = OUTCOME_UNKNOWN;
53 if (i < metrics.successful_crash_dumps) 51 if (i < metrics.successful_crash_dumps)
54 outcome = OUTCOME_SUCCESS; 52 outcome = OUTCOME_SUCCESS;
55 else if (i < metrics.successful_crash_dumps + metrics.failed_crash_dumps) 53 else if (i < metrics.successful_crash_dumps + metrics.failed_crash_dumps)
56 outcome = OUTCOME_FAILURE; 54 outcome = OUTCOME_FAILURE;
57 55
58 UMA_STABILITY_HISTOGRAM_ENUMERATION("CrashReport.BreakpadCrashDumpOutcome", 56 UMA_STABILITY_HISTOGRAM_ENUMERATION("CrashReport.BreakpadCrashDumpOutcome",
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 int exit_code) { 157 int exit_code) {
160 #if defined(ENABLE_PLUGINS) 158 #if defined(ENABLE_PLUGINS)
161 // Exclude plugin crashes from the count below because we report them via 159 // Exclude plugin crashes from the count below because we report them via
162 // a separate UMA metric. 160 // a separate UMA metric.
163 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) 161 if (PluginMetricsProvider::IsPluginProcess(data.process_type))
164 return; 162 return;
165 #endif 163 #endif
166 164
167 helper_.BrowserChildProcessCrashed(); 165 helper_.BrowserChildProcessCrashed();
168 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698