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

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

Issue 18051003: Use a direct include of time headers in base/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/files/important_file_writer.h ('k') | base/files/important_file_writer_unittest.cc » ('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) 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" 13 #include "base/file_util.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/task_runner.h" 18 #include "base/task_runner.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "base/time.h" 20 #include "base/time/time.h"
21 21
22 namespace base { 22 namespace base {
23 23
24 namespace { 24 namespace {
25 25
26 const int kDefaultCommitIntervalMs = 10000; 26 const int kDefaultCommitIntervalMs = 10000;
27 27
28 enum TempFileFailure { 28 enum TempFileFailure {
29 FAILED_CREATING, 29 FAILED_CREATING,
30 FAILED_OPENING, 30 FAILED_OPENING,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (serializer_->SerializeData(&data)) { 158 if (serializer_->SerializeData(&data)) {
159 WriteNow(data); 159 WriteNow(data);
160 } else { 160 } else {
161 DLOG(WARNING) << "failed to serialize data to be saved in " 161 DLOG(WARNING) << "failed to serialize data to be saved in "
162 << path_.value().c_str(); 162 << path_.value().c_str();
163 } 163 }
164 serializer_ = NULL; 164 serializer_ = NULL;
165 } 165 }
166 166
167 } // namespace base 167 } // namespace base
OLDNEW
« no previous file with comments | « base/files/important_file_writer.h ('k') | base/files/important_file_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698