| Index: chromecast/crash/linux/dummy_minidump_generator.h
|
| diff --git a/chromecast/crash/linux/dummy_minidump_generator.h b/chromecast/crash/linux/dummy_minidump_generator.h
|
| index 5eabca8039bf704d070889518b4f4f6dbd5f2372..eb0312500357615dba713625522bc746dc9e5e49 100644
|
| --- a/chromecast/crash/linux/dummy_minidump_generator.h
|
| +++ b/chromecast/crash/linux/dummy_minidump_generator.h
|
| @@ -21,12 +21,22 @@
|
| explicit DummyMinidumpGenerator(const std::string& existing_minidump_path);
|
|
|
| // MinidumpGenerator implementation:
|
| - // Moves the minidump located at |existing_minidump_path_| to |minidump_path|.
|
| - // Returns true if successful, false otherwise. Note that this function MUST
|
| - // be called on a thread without IO restrictions, or it will fail fatally.
|
| bool Generate(const std::string& minidump_path) override;
|
|
|
| + // Provide access to internal utility for testing.
|
| + bool CopyAndDeleteForTest(const std::string& dest_path) {
|
| + return CopyAndDelete(dest_path);
|
| + }
|
| +
|
| private:
|
| + // Copies the contents of the file at |existing_minidump_path_| to the file at
|
| + // |dest_path|. If the copy operation succeeds, delete the file at
|
| + // |existing_minidump_path_|. Returns false if |existing_minidump_path_| can't
|
| + // be opened, or if the copy operation fails. Ideally, we would use Chrome
|
| + // utilities for a task like this, but we must ensure that this operation can
|
| + // occur on any thread (regardless of IO restrictions).
|
| + bool CopyAndDelete(const std::string& dest_path);
|
| +
|
| const std::string existing_minidump_path_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DummyMinidumpGenerator);
|
|
|