Chromium Code Reviews| Index: base/files/important_file_writer.cc |
| diff --git a/chrome/common/important_file_writer.cc b/base/files/important_file_writer.cc |
| similarity index 95% |
| rename from chrome/common/important_file_writer.cc |
| rename to base/files/important_file_writer.cc |
| index 6a76dfbb362b83776d0c8f37e0d2bc5176e039df..42a0120f605f15f3515b77818e0590535b46dbf3 100644 |
| --- a/chrome/common/important_file_writer.cc |
| +++ b/base/files/important_file_writer.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/common/important_file_writer.h" |
| +#include "base/files/important_file_writer.h" |
| #include <stdio.h> |
| @@ -18,8 +18,6 @@ |
| #include "base/threading/thread.h" |
| #include "base/time.h" |
| -using base::TimeDelta; |
| - |
| namespace { |
| const int kDefaultCommitIntervalMs = 10000; |
| @@ -88,8 +86,10 @@ void WriteToDiskTask(const FilePath& path, const std::string& data) { |
| } // namespace |
| +namespace base { |
|
brettw
2012/10/24 03:30:54
I usually put this around the whole thing (includi
Jói
2012/10/24 10:19:17
I did that as well, in patch set 4, doing it diffe
|
| + |
| ImportantFileWriter::ImportantFileWriter( |
| - const FilePath& path, base::MessageLoopProxy* file_message_loop_proxy) |
| + const FilePath& path, MessageLoopProxy* file_message_loop_proxy) |
| : path_(path), |
| file_message_loop_proxy_(file_message_loop_proxy), |
| serializer_(NULL), |
| @@ -122,7 +122,7 @@ void ImportantFileWriter::WriteNow(const std::string& data) { |
| timer_.Stop(); |
| if (!file_message_loop_proxy_->PostTask( |
| - FROM_HERE, base::Bind(&WriteToDiskTask, path_, data))) { |
| + FROM_HERE, Bind(&WriteToDiskTask, path_, data))) { |
| // Posting the task to background message loop is not expected |
| // to fail, but if it does, avoid losing data and just hit the disk |
| // on the current thread. |
| @@ -155,3 +155,5 @@ void ImportantFileWriter::DoScheduledWrite() { |
| } |
| serializer_ = NULL; |
| } |
| + |
| +} // namespace base |