OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 leveldb::Status GetBlobInfoForRecord( | 160 leveldb::Status GetBlobInfoForRecord( |
161 int64 database_id, | 161 int64 database_id, |
162 const std::string& object_store_data_key, | 162 const std::string& object_store_data_key, |
163 IndexedDBValue* value); | 163 IndexedDBValue* value); |
164 | 164 |
165 // This holds a BlobEntryKey and the encoded IndexedDBBlobInfo vector stored | 165 // This holds a BlobEntryKey and the encoded IndexedDBBlobInfo vector stored |
166 // under that key. | 166 // under that key. |
167 typedef std::vector<std::pair<BlobEntryKey, std::string> > | 167 typedef std::vector<std::pair<BlobEntryKey, std::string> > |
168 BlobEntryKeyValuePairVec; | 168 BlobEntryKeyValuePairVec; |
169 | 169 |
170 class WriteDescriptor { | 170 class CONTENT_EXPORT WriteDescriptor { |
171 public: | 171 public: |
172 WriteDescriptor(const GURL& url, | 172 WriteDescriptor(const GURL& url, |
173 int64_t key, | 173 int64_t key, |
174 int64_t size, | 174 int64_t size, |
175 base::Time last_modified); | 175 base::Time last_modified); |
176 WriteDescriptor(const base::FilePath& path, | 176 WriteDescriptor(const base::FilePath& path, |
177 int64_t key, | 177 int64_t key, |
178 int64_t size, | 178 int64_t size, |
179 base::Time last_modified); | 179 base::Time last_modified); |
| 180 WriteDescriptor(const WriteDescriptor& other); |
| 181 ~WriteDescriptor(); |
| 182 WriteDescriptor& operator=(const WriteDescriptor& other); |
180 | 183 |
181 bool is_file() const { return is_file_; } | 184 bool is_file() const { return is_file_; } |
182 const GURL& url() const { | 185 const GURL& url() const { |
183 DCHECK(!is_file_); | 186 DCHECK(!is_file_); |
184 return url_; | 187 return url_; |
185 } | 188 } |
186 const base::FilePath& file_path() const { | 189 const base::FilePath& file_path() const { |
187 DCHECK(is_file_); | 190 DCHECK(is_file_); |
188 return file_path_; | 191 return file_path_; |
189 } | 192 } |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 // complete. While > 0, temporary journal entries may exist so out-of-band | 652 // complete. While > 0, temporary journal entries may exist so out-of-band |
650 // journal cleaning must be deferred. | 653 // journal cleaning must be deferred. |
651 size_t committing_transaction_count_; | 654 size_t committing_transaction_count_; |
652 | 655 |
653 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); | 656 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); |
654 }; | 657 }; |
655 | 658 |
656 } // namespace content | 659 } // namespace content |
657 | 660 |
658 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 661 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
OLD | NEW |