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

Unified Diff: user_collector.h

Issue 2868032: Remove source from crash-reporter and crash-dumper as they are no longer necessary. (Closed) Base URL: ssh://git@chromiumos-git//crash.git
Patch Set: Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « system_logging_mock.cc ('k') | user_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: user_collector.h
diff --git a/user_collector.h b/user_collector.h
deleted file mode 100644
index 7f632246ab6d33452a397735a0a0c3289f02c268..0000000000000000000000000000000000000000
--- a/user_collector.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _CRASH_USER_COLLECTOR_H_
-#define _CRASH_USER_COLLECTOR_H_
-
-#include <string>
-
-#include "crash/system_logging.h"
-
-class FilePath;
-
-// User crash collector.
-class UserCollector {
- public:
- typedef void (*CountCrashFunction)();
- typedef bool (*IsFeedbackAllowedFunction)();
-
- UserCollector();
-
- // Initialize the user crash collector for detection of crashes,
- // given a crash counting function, the path to this executable,
- // metrics collection enabled oracle, and system logger facility.
- // Crash detection/reporting is not enabled until Enable is
- // called.
- void Initialize(CountCrashFunction count_crash,
- const std::string &our_path,
- IsFeedbackAllowedFunction is_metrics_allowed,
- SystemLogging *logger);
-
- virtual ~UserCollector();
-
- // Enable collection.
- bool Enable() { return SetUpInternal(true); }
-
- // Disable collection.
- bool Disable() { return SetUpInternal(false); }
-
- // Handle a specific user crash.
- void HandleCrash(int signal, int pid, const std::string &exec);
-
- // Set (override the default) core file pattern.
- void set_core_pattern_file(const std::string &pattern) {
- core_pattern_file_ = pattern;
- }
-
- private:
- friend class UserCollectorTest;
-
- std::string GetPattern(bool enabled) const;
- bool SetUpInternal(bool enabled);
-
- std::string core_pattern_file_;
- CountCrashFunction count_crash_function_;
- std::string our_path_;
- bool initialized_;
- IsFeedbackAllowedFunction is_feedback_allowed_function_;
- SystemLogging *logger_;
-};
-
-#endif // _CRASH_USER_COLLECTOR_H_
« no previous file with comments | « system_logging_mock.cc ('k') | user_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698