| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 class CONTENT_EXPORT IndexedDBBackingStore | 39 class CONTENT_EXPORT IndexedDBBackingStore |
| 40 : public base::RefCounted<IndexedDBBackingStore> { | 40 : public base::RefCounted<IndexedDBBackingStore> { |
| 41 public: | 41 public: |
| 42 class CONTENT_EXPORT Transaction; | 42 class CONTENT_EXPORT Transaction; |
| 43 | 43 |
| 44 static scoped_refptr<IndexedDBBackingStore> Open( | 44 static scoped_refptr<IndexedDBBackingStore> Open( |
| 45 const string16& database_identifier, | 45 const string16& database_identifier, |
| 46 const base::FilePath& path_base, | 46 const base::FilePath& path_base, |
| 47 const string16& file_identifier); | |
| 48 static scoped_refptr<IndexedDBBackingStore> Open( | |
| 49 const string16& database_identifier, | |
| 50 const base::FilePath& path_base, | |
| 51 const string16& file_identifier, | 47 const string16& file_identifier, |
| 48 bool* data_loss); |
| 49 static scoped_refptr<IndexedDBBackingStore> Open( |
| 50 const string16& database_identifier, |
| 51 const base::FilePath& path_base, |
| 52 const string16& file_identifier, |
| 53 bool* data_loss, |
| 52 LevelDBFactory* factory); | 54 LevelDBFactory* factory); |
| 53 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 55 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
| 54 const string16& identifier); | 56 const string16& identifier); |
| 55 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 57 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
| 56 const string16& identifier, | 58 const string16& identifier, |
| 57 LevelDBFactory* factory); | 59 LevelDBFactory* factory); |
| 58 base::WeakPtr<IndexedDBBackingStore> GetWeakPtr() { | 60 base::WeakPtr<IndexedDBBackingStore> GetWeakPtr() { |
| 59 return weak_factory_.GetWeakPtr(); | 61 return weak_factory_.GetWeakPtr(); |
| 60 } | 62 } |
| 61 | 63 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 string16 identifier_; | 314 string16 identifier_; |
| 313 | 315 |
| 314 scoped_ptr<LevelDBDatabase> db_; | 316 scoped_ptr<LevelDBDatabase> db_; |
| 315 scoped_ptr<LevelDBComparator> comparator_; | 317 scoped_ptr<LevelDBComparator> comparator_; |
| 316 base::WeakPtrFactory<IndexedDBBackingStore> weak_factory_; | 318 base::WeakPtrFactory<IndexedDBBackingStore> weak_factory_; |
| 317 }; | 319 }; |
| 318 | 320 |
| 319 } // namespace content | 321 } // namespace content |
| 320 | 322 |
| 321 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 323 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| OLD | NEW |