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

Side by Side Diff: base/files/important_file_writer.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_FILES_IMPORTANT_FILE_WRITER_H_ 5 #ifndef BASE_FILES_IMPORTANT_FILE_WRITER_H_
6 #define BASE_FILES_IMPORTANT_FILE_WRITER_H_ 6 #define BASE_FILES_IMPORTANT_FILE_WRITER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Invoked once and then reset on the next successful write event. 115 // Invoked once and then reset on the next successful write event.
116 Closure on_next_successful_write_; 116 Closure on_next_successful_write_;
117 117
118 // Path being written to. 118 // Path being written to.
119 const FilePath path_; 119 const FilePath path_;
120 120
121 // TaskRunner for the thread on which file I/O can be done. 121 // TaskRunner for the thread on which file I/O can be done.
122 const scoped_refptr<SequencedTaskRunner> task_runner_; 122 const scoped_refptr<SequencedTaskRunner> task_runner_;
123 123
124 // Timer used to schedule commit after ScheduleWrite. 124 // Timer used to schedule commit after ScheduleWrite.
125 OneShotTimer<ImportantFileWriter> timer_; 125 OneShotTimer timer_;
126 126
127 // Serializer which will provide the data to be saved. 127 // Serializer which will provide the data to be saved.
128 DataSerializer* serializer_; 128 DataSerializer* serializer_;
129 129
130 // Time delta after which scheduled data will be written to disk. 130 // Time delta after which scheduled data will be written to disk.
131 const TimeDelta commit_interval_; 131 const TimeDelta commit_interval_;
132 132
133 WeakPtrFactory<ImportantFileWriter> weak_factory_; 133 WeakPtrFactory<ImportantFileWriter> weak_factory_;
134 134
135 DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter); 135 DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter);
136 }; 136 };
137 137
138 } // namespace base 138 } // namespace base
139 139
140 #endif // BASE_FILES_IMPORTANT_FILE_WRITER_H_ 140 #endif // BASE_FILES_IMPORTANT_FILE_WRITER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller.h ('k') | base/memory/memory_pressure_monitor_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698