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

Side by Side Diff: crash_reporter.cc

Issue 3436029: crash-reporter: Send OS version at time of crash and related improvements (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: respond to petkov review Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « crash_collector_test.cc ('k') | crash_sender » ('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 (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 25 matching lines...) Expand all
36 kCrashKindUncleanShutdown = 1, 36 kCrashKindUncleanShutdown = 1,
37 kCrashKindUser = 2, 37 kCrashKindUser = 2,
38 kCrashKindKernel = 3, 38 kCrashKindKernel = 3,
39 kCrashKindMax 39 kCrashKindMax
40 }; 40 };
41 41
42 static MetricsLibrary s_metrics_lib; 42 static MetricsLibrary s_metrics_lib;
43 static SystemLoggingImpl s_system_log; 43 static SystemLoggingImpl s_system_log;
44 44
45 static bool IsFeedbackAllowed() { 45 static bool IsFeedbackAllowed() {
46 // Once crosbug.com/5814 is fixed, call the is opted in function 46 return s_metrics_lib.AreMetricsEnabled();
47 // here.
48 return true;
49 } 47 }
50 48
51 static bool TouchFile(const FilePath &file_path) { 49 static bool TouchFile(const FilePath &file_path) {
52 return file_util::WriteFile(file_path, "", 0) == 0; 50 return file_util::WriteFile(file_path, "", 0) == 0;
53 } 51 }
54 52
55 static void CountKernelCrash() { 53 static void CountKernelCrash() {
56 s_metrics_lib.SendEnumToUMA(std::string(kCrashCounterHistogram), 54 s_metrics_lib.SendEnumToUMA(std::string(kCrashCounterHistogram),
57 kCrashKindKernel, 55 kCrashKindKernel,
58 kCrashKindMax); 56 kCrashKindMax);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 170 }
173 171
174 if (FLAGS_clean_shutdown) { 172 if (FLAGS_clean_shutdown) {
175 unclean_shutdown_collector.Disable(); 173 unclean_shutdown_collector.Disable();
176 user_collector.Disable(); 174 user_collector.Disable();
177 return 0; 175 return 0;
178 } 176 }
179 177
180 return HandleUserCrash(&user_collector); 178 return HandleUserCrash(&user_collector);
181 } 179 }
OLDNEW
« no previous file with comments | « crash_collector_test.cc ('k') | crash_sender » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698