OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/files/important_file_writer.h" | 5 #include "base/files/important_file_writer.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/critical_closure.h" | 12 #include "base/critical_closure.h" |
13 #include "base/file_util.h" | |
14 #include "base/files/file.h" | 13 #include "base/files/file.h" |
15 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/task_runner.h" | 19 #include "base/task_runner.h" |
20 #include "base/task_runner_util.h" | 20 #include "base/task_runner_util.h" |
21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 | 25 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 void ImportantFileWriter::ForwardSuccessfulWrite(bool result) { | 186 void ImportantFileWriter::ForwardSuccessfulWrite(bool result) { |
187 DCHECK(CalledOnValidThread()); | 187 DCHECK(CalledOnValidThread()); |
188 if (result && !on_next_successful_write_.is_null()) { | 188 if (result && !on_next_successful_write_.is_null()) { |
189 on_next_successful_write_.Run(); | 189 on_next_successful_write_.Run(); |
190 on_next_successful_write_.Reset(); | 190 on_next_successful_write_.Reset(); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 } // namespace base | 194 } // namespace base |
OLD | NEW |