Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h

Issue 10536007: Merge 117978 - IndexedDB: Fire error when there are problems opening a DB (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int 64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey); 73 virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int 64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey);
74 74
75 virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction); 75 virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction);
76 virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t ob jectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction); 76 virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t ob jectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
77 virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objec tStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction); 77 virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objec tStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
78 78
79 virtual PassRefPtr<Transaction> createTransaction(); 79 virtual PassRefPtr<Transaction> createTransaction();
80 80
81 static bool backingStoreExists(SecurityOrigin*, const String& name, const St ring& pathBase); 81 static bool backingStoreExists(SecurityOrigin*, const String& name, const St ring& pathBase);
82 82
83 private: 83 protected:
84 IDBLevelDBBackingStore(const String& identifier, IDBFactoryBackendImpl*, Pas sOwnPtr<LevelDBDatabase>); 84 IDBLevelDBBackingStore(const String& identifier, IDBFactoryBackendImpl*, Pas sOwnPtr<LevelDBDatabase>);
85 85
86 private:
86 String m_identifier; 87 String m_identifier;
87 RefPtr<IDBFactoryBackendImpl> m_factory; 88 RefPtr<IDBFactoryBackendImpl> m_factory;
88 OwnPtr<LevelDBDatabase> m_db; 89 OwnPtr<LevelDBDatabase> m_db;
89 OwnPtr<LevelDBComparator> m_comparator; 90 OwnPtr<LevelDBComparator> m_comparator;
90 RefPtr<LevelDBTransaction> m_currentTransaction; 91 RefPtr<LevelDBTransaction> m_currentTransaction;
91 92
92 class Transaction : public IDBBackingStore::Transaction { 93 class Transaction : public IDBBackingStore::Transaction {
93 public: 94 public:
94 static PassRefPtr<Transaction> create(IDBLevelDBBackingStore*); 95 static PassRefPtr<Transaction> create(IDBLevelDBBackingStore*);
95 virtual void begin(); 96 virtual void begin();
96 virtual bool commit(); 97 virtual bool commit();
97 virtual void rollback(); 98 virtual void rollback();
98 99
99 private: 100 private:
100 Transaction(IDBLevelDBBackingStore*); 101 Transaction(IDBLevelDBBackingStore*);
101 IDBLevelDBBackingStore* m_backingStore; 102 IDBLevelDBBackingStore* m_backingStore;
102 }; 103 };
103 }; 104 };
104 105
105 } // namespace WebCore 106 } // namespace WebCore
106 107
107 108
108 #endif // USE(LEVELDB) 109 #endif // USE(LEVELDB)
109 #endif // ENABLE(INDEXED_DATABASE) 110 #endif // ENABLE(INDEXED_DATABASE)
110 111
111 #endif // IDBLevelDBBackingStore_h 112 #endif // IDBLevelDBBackingStore_h
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp ('k') | Source/WebKit/chromium/WebKit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698