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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class DB; | 21 class DB; |
22 class Iterator; | 22 class Iterator; |
23 } // namespace leveldb | 23 } // namespace leveldb |
24 | 24 |
25 namespace drive { | 25 namespace drive { |
26 namespace internal { | 26 namespace internal { |
27 | 27 |
28 // FileCacheMetadata maintains metadata of FileCache's cached files. | 28 // FileCacheMetadata maintains metadata of FileCache's cached files. |
29 // This class only manages metadata. File operations are done by FileCache. | 29 // This class only manages metadata. File operations are done by FileCache. |
30 // All member access including ctor and dtor must be made on the blocking pool. | 30 // All member access including ctor and dtor must be made on the blocking pool. |
| 31 // |
| 32 // OBSOLETE: This class is maintained only for importing old data. |
| 33 // TODO(hashimoto): Remove this class at some point. |
31 class FileCacheMetadata { | 34 class FileCacheMetadata { |
32 public: | 35 public: |
33 // Result of Initialize(). | 36 // Result of Initialize(). |
34 enum InitializeResult { | 37 enum InitializeResult { |
35 INITIALIZE_FAILED, // Could not open nor create DB. | 38 INITIALIZE_FAILED, // Could not open nor create DB. |
36 INITIALIZE_OPENED, // Opened an existing DB. | 39 INITIALIZE_OPENED, // Opened an existing DB. |
37 INITIALIZE_CREATED, // Created a new DB. | 40 INITIALIZE_CREATED, // Created a new DB. |
38 }; | 41 }; |
39 | 42 |
40 // Object to iterate over entries stored in the cache metadata. | 43 // Object to iterate over entries stored in the cache metadata. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 103 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
101 scoped_ptr<leveldb::DB> level_db_; | 104 scoped_ptr<leveldb::DB> level_db_; |
102 | 105 |
103 DISALLOW_COPY_AND_ASSIGN(FileCacheMetadata); | 106 DISALLOW_COPY_AND_ASSIGN(FileCacheMetadata); |
104 }; | 107 }; |
105 | 108 |
106 } // namespace internal | 109 } // namespace internal |
107 } // namespace drive | 110 } // namespace drive |
108 | 111 |
109 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ | 112 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_METADATA_H_ |
OLD | NEW |