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

Side by Side Diff: src/platform/crash/user_collector.cc

Issue 2087002: Per kmixter's suggestion, install metrics headers under /usr/include/metrics. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 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 | « src/platform/crash/crash_reporter.cc ('k') | src/platform/metrics/Makefile » ('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/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "crash/user_collector.h" 10 #include "crash/user_collector.h"
11 #include "metrics_library.h" 11 #include "metrics/metrics_library.h"
12 12
13 // This procfs file is used to cause kernel core file writing to 13 // This procfs file is used to cause kernel core file writing to
14 // instead pipe the core file into a user space process. See 14 // instead pipe the core file into a user space process. See
15 // core(5) man page. 15 // core(5) man page.
16 static const char kCorePatternFile[] = "/proc/sys/kernel/core_pattern"; 16 static const char kCorePatternFile[] = "/proc/sys/kernel/core_pattern";
17 17
18 UserCollector::UserCollector() 18 UserCollector::UserCollector()
19 : core_pattern_file_(kCorePatternFile), 19 : core_pattern_file_(kCorePatternFile),
20 count_crash_function_(NULL), 20 count_crash_function_(NULL),
21 initialized_(false), 21 initialized_(false),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void UserCollector::HandleCrash(int signal, int pid, const std::string &exec) { 67 void UserCollector::HandleCrash(int signal, int pid, const std::string &exec) {
68 CHECK(initialized_); 68 CHECK(initialized_);
69 logger_->LogWarning("Received crash notification for %s[%d] sig %d", 69 logger_->LogWarning("Received crash notification for %s[%d] sig %d",
70 exec.c_str(), pid, signal); 70 exec.c_str(), pid, signal);
71 71
72 if (is_feedback_allowed_function_()) { 72 if (is_feedback_allowed_function_()) {
73 count_crash_function_(); 73 count_crash_function_();
74 } 74 }
75 } 75 }
OLDNEW
« no previous file with comments | « src/platform/crash/crash_reporter.cc ('k') | src/platform/metrics/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698