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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
18 #include "content/browser/indexed_db/indexed_db.h" | 18 #include "content/browser/indexed_db/indexed_db.h" |
19 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" | 19 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" |
20 #include "content/browser/indexed_db/indexed_db_blob_info.h" | 20 #include "content/browser/indexed_db/indexed_db_blob_info.h" |
21 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" | 21 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" |
22 #include "content/browser/indexed_db/indexed_db_metadata.h" | 22 #include "content/browser/indexed_db/indexed_db_metadata.h" |
23 #include "content/browser/indexed_db/leveldb/leveldb_iterator.h" | 23 #include "content/browser/indexed_db/leveldb/leveldb_iterator.h" |
24 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h" | 24 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h" |
25 #include "content/common/content_export.h" | 25 #include "content/common/content_export.h" |
26 #include "content/common/indexed_db/indexed_db_key.h" | 26 #include "content/common/indexed_db/indexed_db_key.h" |
27 #include "content/common/indexed_db/indexed_db_key_path.h" | 27 #include "content/common/indexed_db/indexed_db_key_path.h" |
28 #include "content/common/indexed_db/indexed_db_key_range.h" | 28 #include "content/common/indexed_db/indexed_db_key_range.h" |
29 #include "third_party/leveldatabase/src/include/leveldb/status.h" | 29 #include "third_party/leveldatabase/src/include/leveldb/status.h" |
jsbell
2014/06/09 16:38:27
Need to #include "third_party/WebKit/public/platfo
Pritam Nikam
2014/06/11 14:05:16
Done.
| |
30 #include "url/gurl.h" | 30 #include "url/gurl.h" |
31 #include "webkit/browser/blob/blob_data_handle.h" | 31 #include "webkit/browser/blob/blob_data_handle.h" |
32 | 32 |
33 namespace base { | 33 namespace base { |
34 class TaskRunner; | 34 class TaskRunner; |
35 } | 35 } |
36 | 36 |
37 namespace fileapi { | 37 namespace fileapi { |
38 class FileWriterDelegate; | 38 class FileWriterDelegate; |
39 } | 39 } |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 | 337 |
338 private: | 338 private: |
339 DISALLOW_COPY_AND_ASSIGN(Cursor); | 339 DISALLOW_COPY_AND_ASSIGN(Cursor); |
340 }; | 340 }; |
341 | 341 |
342 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor( | 342 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor( |
343 IndexedDBBackingStore::Transaction* transaction, | 343 IndexedDBBackingStore::Transaction* transaction, |
344 int64 database_id, | 344 int64 database_id, |
345 int64 object_store_id, | 345 int64 object_store_id, |
346 const IndexedDBKeyRange& key_range, | 346 const IndexedDBKeyRange& key_range, |
347 indexed_db::CursorDirection, | 347 blink::Direction, |
348 leveldb::Status*); | 348 leveldb::Status*); |
349 virtual scoped_ptr<Cursor> OpenObjectStoreCursor( | 349 virtual scoped_ptr<Cursor> OpenObjectStoreCursor( |
350 IndexedDBBackingStore::Transaction* transaction, | 350 IndexedDBBackingStore::Transaction* transaction, |
351 int64 database_id, | 351 int64 database_id, |
352 int64 object_store_id, | 352 int64 object_store_id, |
353 const IndexedDBKeyRange& key_range, | 353 const IndexedDBKeyRange& key_range, |
354 indexed_db::CursorDirection, | 354 blink::Direction, |
355 leveldb::Status*); | 355 leveldb::Status*); |
356 virtual scoped_ptr<Cursor> OpenIndexKeyCursor( | 356 virtual scoped_ptr<Cursor> OpenIndexKeyCursor( |
357 IndexedDBBackingStore::Transaction* transaction, | 357 IndexedDBBackingStore::Transaction* transaction, |
358 int64 database_id, | 358 int64 database_id, |
359 int64 object_store_id, | 359 int64 object_store_id, |
360 int64 index_id, | 360 int64 index_id, |
361 const IndexedDBKeyRange& key_range, | 361 const IndexedDBKeyRange& key_range, |
362 indexed_db::CursorDirection, | 362 blink::Direction, |
363 leveldb::Status*); | 363 leveldb::Status*); |
364 virtual scoped_ptr<Cursor> OpenIndexCursor( | 364 virtual scoped_ptr<Cursor> OpenIndexCursor( |
365 IndexedDBBackingStore::Transaction* transaction, | 365 IndexedDBBackingStore::Transaction* transaction, |
366 int64 database_id, | 366 int64 database_id, |
367 int64 object_store_id, | 367 int64 object_store_id, |
368 int64 index_id, | 368 int64 index_id, |
369 const IndexedDBKeyRange& key_range, | 369 const IndexedDBKeyRange& key_range, |
370 indexed_db::CursorDirection, | 370 blink::Direction, |
371 leveldb::Status*); | 371 leveldb::Status*); |
372 | 372 |
373 class BlobChangeRecord { | 373 class BlobChangeRecord { |
374 public: | 374 public: |
375 BlobChangeRecord(const std::string& key, int64 object_store_id); | 375 BlobChangeRecord(const std::string& key, int64 object_store_id); |
376 ~BlobChangeRecord(); | 376 ~BlobChangeRecord(); |
377 const std::string& key() const { return key_; } | 377 const std::string& key() const { return key_; } |
378 int64 object_store_id() const { return object_store_id_; } | 378 int64 object_store_id() const { return object_store_id_; } |
379 void SetBlobInfo(std::vector<IndexedDBBlobInfo>* blob_info); | 379 void SetBlobInfo(std::vector<IndexedDBBlobInfo>* blob_info); |
380 std::vector<IndexedDBBlobInfo>& mutable_blob_info() { return blob_info_; } | 380 std::vector<IndexedDBBlobInfo>& mutable_blob_info() { return blob_info_; } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
567 // will hold a reference to this backing store. | 567 // will hold a reference to this backing store. |
568 IndexedDBActiveBlobRegistry active_blob_registry_; | 568 IndexedDBActiveBlobRegistry active_blob_registry_; |
569 base::OneShotTimer<IndexedDBBackingStore> close_timer_; | 569 base::OneShotTimer<IndexedDBBackingStore> close_timer_; |
570 | 570 |
571 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); | 571 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); |
572 }; | 572 }; |
573 | 573 |
574 } // namespace content | 574 } // namespace content |
575 | 575 |
576 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 576 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
OLD | NEW |