diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-10 14:02:29 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-10 14:02:29 +0000 |
commit | da1c36d03ec9553a5da53b21b18e1b946d45dcff (patch) | |
tree | 4ff3c80d3e6fae76bb1418af85e703cf9a974048 /src/client/mac/crash_generation/Inspector.h | |
parent | Do not commit user preferences for xcodeproj. (diff) | |
download | breakpad-da1c36d03ec9553a5da53b21b18e1b946d45dcff.tar.xz |
Extracting the config file class from the Inspector to be able to reuse it.
This will be needed for iOS implementation, where the Inspector won't be
used, but where a config file will still be needed, because the uploads
won't happen just after the crash, but on a next run.
Review URL: http://breakpad.appspot.com/309001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@852 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/crash_generation/Inspector.h')
-rw-r--r-- | src/client/mac/crash_generation/Inspector.h | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/src/client/mac/crash_generation/Inspector.h b/src/client/mac/crash_generation/Inspector.h index 4148eac2..11a0dec6 100644 --- a/src/client/mac/crash_generation/Inspector.h +++ b/src/client/mac/crash_generation/Inspector.h @@ -35,10 +35,9 @@ #import <Foundation/Foundation.h> #include <mach/mach.h> +#import "client/mac/crash_generation/ConfigFile.h" #import "client/mac/handler/minidump_generator.h" -#define VERBOSE 0 - extern bool gDebugLog; #define DEBUGLOG if (gDebugLog) fprintf @@ -80,48 +79,6 @@ using google_breakpad::MinidumpGenerator; namespace google_breakpad { -BOOL EnsureDirectoryPathExists(NSString *dirPath); - -//============================================================================= -class ConfigFile { - public: - ConfigFile() { - config_file_ = -1; - config_file_path_[0] = 0; - has_created_file_ = false; - }; - - ~ConfigFile() { - }; - - void WriteFile(const SimpleStringDictionary *configurationParameters, - const char *dump_dir, - const char *minidump_id); - - const char *GetFilePath() { return config_file_path_; } - - void Unlink() { - if (config_file_ != -1) - unlink(config_file_path_); - - config_file_ = -1; - } - - private: - BOOL WriteData(const void *data, size_t length); - - BOOL AppendConfigData(const char *key, - const void *data, - size_t length); - - BOOL AppendConfigString(const char *key, - const char *value); - - int config_file_; // descriptor for config file - char config_file_path_[PATH_MAX]; // Path to configuration file - bool has_created_file_; -}; - //============================================================================= class MinidumpLocation { public: @@ -186,8 +143,6 @@ class Inspector { kern_return_t SendAcknowledgement(); void LaunchReporter(const char *inConfigFilePath); - void SetCrashTimeParameters(); - // The bootstrap port in which the inspector is registered and into which it // must check in. mach_port_t bootstrap_subset_port_; |