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

Unified Diff: chromecast/crash/linux/dummy_minidump_generator.h

Issue 1227963002: Replace system IO calls in chromecast/crash with Chrome utilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: nit. Created 5 years, 5 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 | « chromecast/crash/linux/crash_util.cc ('k') | chromecast/crash/linux/dummy_minidump_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb0312500357615dba713625522bc746dc9e5e49..5eabca8039bf704d070889518b4f4f6dbd5f2372 100644
--- a/chromecast/crash/linux/dummy_minidump_generator.h
+++ b/chromecast/crash/linux/dummy_minidump_generator.h
@@ -21,22 +21,12 @@ class DummyMinidumpGenerator : public MinidumpGenerator {
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);
« no previous file with comments | « chromecast/crash/linux/crash_util.cc ('k') | chromecast/crash/linux/dummy_minidump_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698