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

Unified Diff: base/files/important_file_writer.h

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/files/file_util_proxy_unittest.cc ('k') | base/files/important_file_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/important_file_writer.h
diff --git a/base/files/important_file_writer.h b/base/files/important_file_writer.h
index 9ead9c14bf2c2758f101036219525c27a5d409e8..99f1a7c6814753ec9b1d63a85930399eddb0eeab 100644
--- a/base/files/important_file_writer.h
+++ b/base/files/important_file_writer.h
@@ -78,7 +78,7 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
// Save |data| to target filename. Does not block. If there is a pending write
// scheduled by ScheduleWrite, it is cancelled.
- void WriteNow(const std::string& data);
+ void WriteNow(scoped_ptr<std::string> data);
// Schedule a save to target filename. Data will be serialized and saved
// to disk after the commit interval. If another ScheduleWrite is issued
@@ -106,7 +106,7 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
private:
// Helper method for WriteNow().
- bool PostWriteTask(const std::string& data);
+ bool PostWriteTask(const Callback<bool()>& task);
// If |result| is true and |on_next_successful_write_| is set, invokes
// |on_successful_write_| and then resets it; no-ops otherwise.
« no previous file with comments | « base/files/file_util_proxy_unittest.cc ('k') | base/files/important_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698