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

Unified Diff: base/files/important_file_writer.h

Issue 2907303002: Replace deprecated base::NonThreadSafe in base in favor of SequenceChecker. (Closed)
Patch Set: rm sequence check in constructor Created 3 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/deferred_sequenced_task_runner_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 46efbaa145c2cf4c683c64b4f5fda6765da81f57..5fcd5153c28ae49830760b7ef9aec19aca4479cb 100644
--- a/base/files/important_file_writer.h
+++ b/base/files/important_file_writer.h
@@ -12,8 +12,8 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/sequence_checker.h"
#include "base/strings/string_piece.h"
-#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
@@ -35,7 +35,7 @@ class SequencedTaskRunner;
//
// Also note that ImportantFileWriter can be *really* slow (cf. File::Flush()
// for details) and thus please don't block shutdown on ImportantFileWriter.
-class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
+class BASE_EXPORT ImportantFileWriter {
public:
// Used by ScheduleSave to lazily provide the data to be saved. Allows us
// to also batch data serializations.
@@ -143,6 +143,8 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
// Time delta after which scheduled data will be written to disk.
const TimeDelta commit_interval_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
WeakPtrFactory<ImportantFileWriter> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter);
« no previous file with comments | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/files/important_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698