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 "webkit/fileapi/file_system_directory_database.h" | 5 #include "webkit/fileapi/file_system_directory_database.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
13 #include "third_party/leveldb/include/leveldb/iterator.h" | 13 #include "third_party/leveldatabase/src/include/leveldb/iterator.h" |
14 #include "third_party/leveldb/include/leveldb/write_batch.h" | 14 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 bool PickleFromFileInfo( | 18 bool PickleFromFileInfo( |
19 const fileapi::FileSystemDirectoryDatabase::FileInfo& info, | 19 const fileapi::FileSystemDirectoryDatabase::FileInfo& info, |
20 Pickle* pickle) { | 20 Pickle* pickle) { |
21 DCHECK(pickle); | 21 DCHECK(pickle); |
22 std::string data_path; | 22 std::string data_path; |
23 // Round off here to match the behavior of the filesystem on real files. | 23 // Round off here to match the behavior of the filesystem on real files. |
24 base::Time time = | 24 base::Time time = |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 return true; | 535 return true; |
536 } | 536 } |
537 | 537 |
538 void FileSystemDirectoryDatabase::HandleError(leveldb::Status status) { | 538 void FileSystemDirectoryDatabase::HandleError(leveldb::Status status) { |
539 LOG(ERROR) << "FileSystemDirectoryDatabase failed with error: " << | 539 LOG(ERROR) << "FileSystemDirectoryDatabase failed with error: " << |
540 status.ToString(); | 540 status.ToString(); |
541 db_.reset(); | 541 db_.reset(); |
542 } | 542 } |
543 | 543 |
544 } // namespace fileapi | 544 } // namespace fileapi |
OLD | NEW |