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

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

Issue 2479683004: base: Cleanup class/struct forward declarations (Closed)
Patch Set: Add missing forward declaration Created 4 years, 1 month 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
« no previous file with comments | « base/files/file_proxy.h ('k') | base/mac/bundle_locations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/strings/string_piece.h" 15 #include "base/strings/string_piece.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 19
20 namespace base { 20 namespace base {
21 21
22 class SequencedTaskRunner; 22 class SequencedTaskRunner;
23 class Thread;
24 23
25 // Helper for atomically writing a file to ensure that it won't be corrupted by 24 // Helper for atomically writing a file to ensure that it won't be corrupted by
26 // *application* crash during write (implemented as create, flush, rename). 25 // *application* crash during write (implemented as create, flush, rename).
27 // 26 //
28 // As an added benefit, ImportantFileWriter makes it less likely that the file 27 // As an added benefit, ImportantFileWriter makes it less likely that the file
29 // is corrupted by *system* crash, though even if the ImportantFileWriter call 28 // is corrupted by *system* crash, though even if the ImportantFileWriter call
30 // has already returned at the time of the crash it is not specified which 29 // has already returned at the time of the crash it is not specified which
31 // version of the file (old or new) is preserved. And depending on system 30 // version of the file (old or new) is preserved. And depending on system
32 // configuration (hardware and software) a significant likelihood of file 31 // configuration (hardware and software) a significant likelihood of file
33 // corruption may remain, thus using ImportantFileWriter is not a valid 32 // corruption may remain, thus using ImportantFileWriter is not a valid
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 const TimeDelta commit_interval_; 130 const TimeDelta commit_interval_;
132 131
133 WeakPtrFactory<ImportantFileWriter> weak_factory_; 132 WeakPtrFactory<ImportantFileWriter> weak_factory_;
134 133
135 DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter); 134 DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter);
136 }; 135 };
137 136
138 } // namespace base 137 } // namespace base
139 138
140 #endif // BASE_FILES_IMPORTANT_FILE_WRITER_H_ 139 #endif // BASE_FILES_IMPORTANT_FILE_WRITER_H_
OLDNEW
« no previous file with comments | « base/files/file_proxy.h ('k') | base/mac/bundle_locations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698