OLD | NEW |
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 #include "storage/browser/fileapi/sandbox_origin_database.h" | 5 #include "storage/browser/fileapi/sandbox_origin_database.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/files/file_enumerator.h" | 13 #include "base/files/file_enumerator.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/format_macros.h" | 15 #include "base/format_macros.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram_macros.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "storage/common/fileapi/file_system_util.h" | 22 #include "storage/common/fileapi/file_system_util.h" |
23 #include "third_party/leveldatabase/env_chromium.h" | 23 #include "third_party/leveldatabase/env_chromium.h" |
24 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 24 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
25 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" | 25 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 status = db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1")); | 348 status = db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1")); |
349 if (!status.ok()) { | 349 if (!status.ok()) { |
350 HandleError(FROM_HERE, status); | 350 HandleError(FROM_HERE, status); |
351 return false; | 351 return false; |
352 } | 352 } |
353 *number = -1; | 353 *number = -1; |
354 return true; | 354 return true; |
355 } | 355 } |
356 | 356 |
357 } // namespace storage | 357 } // namespace storage |
OLD | NEW |