| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 blink::WebIDBDataLoss* data_loss, | 62 blink::WebIDBDataLoss* data_loss, |
| 63 std::string* data_loss_message, | 63 std::string* data_loss_message, |
| 64 bool* disk_full, | 64 bool* disk_full, |
| 65 LevelDBFactory* factory); | 65 LevelDBFactory* factory); |
| 66 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 66 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
| 67 const GURL& origin_url); | 67 const GURL& origin_url); |
| 68 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 68 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
| 69 const GURL& origin_url, | 69 const GURL& origin_url, |
| 70 LevelDBFactory* factory); | 70 LevelDBFactory* factory); |
| 71 | 71 |
| 72 virtual std::vector<string16> GetDatabaseNames(); | 72 virtual std::vector<base::string16> GetDatabaseNames(); |
| 73 virtual bool GetIDBDatabaseMetaData(const string16& name, | 73 virtual bool GetIDBDatabaseMetaData(const base::string16& name, |
| 74 IndexedDBDatabaseMetadata* metadata, | 74 IndexedDBDatabaseMetadata* metadata, |
| 75 bool* success) WARN_UNUSED_RESULT; | 75 bool* success) WARN_UNUSED_RESULT; |
| 76 virtual bool CreateIDBDatabaseMetaData(const string16& name, | 76 virtual bool CreateIDBDatabaseMetaData(const base::string16& name, |
| 77 const string16& version, | 77 const base::string16& version, |
| 78 int64 int_version, | 78 int64 int_version, |
| 79 int64* row_id); | 79 int64* row_id); |
| 80 virtual bool UpdateIDBDatabaseIntVersion( | 80 virtual bool UpdateIDBDatabaseIntVersion( |
| 81 IndexedDBBackingStore::Transaction* transaction, | 81 IndexedDBBackingStore::Transaction* transaction, |
| 82 int64 row_id, | 82 int64 row_id, |
| 83 int64 int_version); | 83 int64 int_version); |
| 84 virtual bool DeleteDatabase(const string16& name); | 84 virtual bool DeleteDatabase(const base::string16& name); |
| 85 | 85 |
| 86 bool GetObjectStores(int64 database_id, | 86 bool GetObjectStores(int64 database_id, |
| 87 IndexedDBDatabaseMetadata::ObjectStoreMap* map) | 87 IndexedDBDatabaseMetadata::ObjectStoreMap* map) |
| 88 WARN_UNUSED_RESULT; | 88 WARN_UNUSED_RESULT; |
| 89 virtual bool CreateObjectStore( | 89 virtual bool CreateObjectStore( |
| 90 IndexedDBBackingStore::Transaction* transaction, | 90 IndexedDBBackingStore::Transaction* transaction, |
| 91 int64 database_id, | 91 int64 database_id, |
| 92 int64 object_store_id, | 92 int64 object_store_id, |
| 93 const string16& name, | 93 const base::string16& name, |
| 94 const IndexedDBKeyPath& key_path, | 94 const IndexedDBKeyPath& key_path, |
| 95 bool auto_increment); | 95 bool auto_increment); |
| 96 virtual bool DeleteObjectStore( | 96 virtual bool DeleteObjectStore( |
| 97 IndexedDBBackingStore::Transaction* transaction, | 97 IndexedDBBackingStore::Transaction* transaction, |
| 98 int64 database_id, | 98 int64 database_id, |
| 99 int64 object_store_id) WARN_UNUSED_RESULT; | 99 int64 object_store_id) WARN_UNUSED_RESULT; |
| 100 | 100 |
| 101 class CONTENT_EXPORT RecordIdentifier { | 101 class CONTENT_EXPORT RecordIdentifier { |
| 102 public: | 102 public: |
| 103 RecordIdentifier(const std::string& primary_key, int64 version); | 103 RecordIdentifier(const std::string& primary_key, int64 version); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 int64 database_id, | 153 int64 database_id, |
| 154 int64 object_store_id, | 154 int64 object_store_id, |
| 155 const IndexedDBKey& key, | 155 const IndexedDBKey& key, |
| 156 RecordIdentifier* found_record_identifier, | 156 RecordIdentifier* found_record_identifier, |
| 157 bool* found) WARN_UNUSED_RESULT; | 157 bool* found) WARN_UNUSED_RESULT; |
| 158 | 158 |
| 159 virtual bool CreateIndex(IndexedDBBackingStore::Transaction* transaction, | 159 virtual bool CreateIndex(IndexedDBBackingStore::Transaction* transaction, |
| 160 int64 database_id, | 160 int64 database_id, |
| 161 int64 object_store_id, | 161 int64 object_store_id, |
| 162 int64 index_id, | 162 int64 index_id, |
| 163 const string16& name, | 163 const base::string16& name, |
| 164 const IndexedDBKeyPath& key_path, | 164 const IndexedDBKeyPath& key_path, |
| 165 bool is_unique, | 165 bool is_unique, |
| 166 bool is_multi_entry) WARN_UNUSED_RESULT; | 166 bool is_multi_entry) WARN_UNUSED_RESULT; |
| 167 virtual bool DeleteIndex(IndexedDBBackingStore::Transaction* transaction, | 167 virtual bool DeleteIndex(IndexedDBBackingStore::Transaction* transaction, |
| 168 int64 database_id, | 168 int64 database_id, |
| 169 int64 object_store_id, | 169 int64 object_store_id, |
| 170 int64 index_id) WARN_UNUSED_RESULT; | 170 int64 index_id) WARN_UNUSED_RESULT; |
| 171 virtual bool PutIndexDataForRecord( | 171 virtual bool PutIndexDataForRecord( |
| 172 IndexedDBBackingStore::Transaction* transaction, | 172 IndexedDBBackingStore::Transaction* transaction, |
| 173 int64 database_id, | 173 int64 database_id, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const std::string origin_identifier_; | 331 const std::string origin_identifier_; |
| 332 | 332 |
| 333 scoped_ptr<LevelDBDatabase> db_; | 333 scoped_ptr<LevelDBDatabase> db_; |
| 334 scoped_ptr<LevelDBComparator> comparator_; | 334 scoped_ptr<LevelDBComparator> comparator_; |
| 335 base::OneShotTimer<IndexedDBBackingStore> close_timer_; | 335 base::OneShotTimer<IndexedDBBackingStore> close_timer_; |
| 336 }; | 336 }; |
| 337 | 337 |
| 338 } // namespace content | 338 } // namespace content |
| 339 | 339 |
| 340 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 340 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| OLD | NEW |