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

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.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
« no previous file with comments | « no previous file | Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 27 matching lines...) Expand all
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class IDBBackingStore; 40 class IDBBackingStore;
41 class IDBDatabase; 41 class IDBDatabase;
42 class IDBFactoryBackendImpl; 42 class IDBFactoryBackendImpl;
43 class IDBObjectStoreBackendImpl; 43 class IDBObjectStoreBackendImpl;
44 class IDBTransactionCoordinator; 44 class IDBTransactionCoordinator;
45 45
46 class IDBDatabaseBackendImpl : public IDBDatabaseBackendInterface { 46 class IDBDatabaseBackendImpl : public IDBDatabaseBackendInterface {
47 public: 47 public:
48 static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBack ingStore* database, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImp l* factory, const String& uniqueIdentifier) 48 static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBack ingStore* database, IDBTransactionCoordinator*, IDBFactoryBackendImpl*, const St ring& uniqueIdentifier);
49 {
50 return adoptRef(new IDBDatabaseBackendImpl(name, database, coordinator, factory, uniqueIdentifier));
51 }
52 virtual ~IDBDatabaseBackendImpl(); 49 virtual ~IDBDatabaseBackendImpl();
53 50
54 PassRefPtr<IDBBackingStore> backingStore() const; 51 PassRefPtr<IDBBackingStore> backingStore() const;
55 52
56 static const int64_t InvalidId = 0; 53 static const int64_t InvalidId = 0;
57 int64_t id() const { return m_id; } 54 int64_t id() const { return m_id; }
58 55
59 // FIXME: Rename "open" to something more descriptive, like registerFrontEnd Callbacks. 56 // FIXME: Rename "open" to something more descriptive, like registerFrontEnd Callbacks.
60 void open(PassRefPtr<IDBDatabaseCallbacks>); 57 void open(PassRefPtr<IDBDatabaseCallbacks>);
61 void openConnection(PassRefPtr<IDBCallbacks>); 58 void openConnection(PassRefPtr<IDBCallbacks>);
(...skipping 10 matching lines...) Expand all
72 virtual void close(PassRefPtr<IDBDatabaseCallbacks>); 69 virtual void close(PassRefPtr<IDBDatabaseCallbacks>);
73 70
74 PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name); 71 PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
75 IDBTransactionCoordinator* transactionCoordinator() const { return m_transac tionCoordinator.get(); } 72 IDBTransactionCoordinator* transactionCoordinator() const { return m_transac tionCoordinator.get(); }
76 void transactionStarted(PassRefPtr<IDBTransactionBackendInterface>); 73 void transactionStarted(PassRefPtr<IDBTransactionBackendInterface>);
77 void transactionFinished(PassRefPtr<IDBTransactionBackendInterface>); 74 void transactionFinished(PassRefPtr<IDBTransactionBackendInterface>);
78 75
79 private: 76 private:
80 IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTra nsactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier); 77 IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTra nsactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
81 78
82 void openInternal(); 79 bool openInternal();
83 void loadObjectStores(); 80 void loadObjectStores();
84 void processPendingCalls(); 81 void processPendingCalls();
85 82
86 static void createObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>); 83 static void createObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>);
87 static void deleteObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>); 84 static void deleteObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTran sactionBackendInterface>);
88 static void setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDataba seBackendImpl>, const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBT ransactionBackendInterface>); 85 static void setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDataba seBackendImpl>, const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBT ransactionBackendInterface>);
89 86
90 // These are used as setVersion transaction abort tasks. 87 // These are used as setVersion transaction abort tasks.
91 static void removeObjectStoreFromMap(ScriptExecutionContext*, PassRefPtr<IDB DatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>); 88 static void removeObjectStoreFromMap(ScriptExecutionContext*, PassRefPtr<IDB DatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>);
92 static void addObjectStoreToMap(ScriptExecutionContext*, PassRefPtr<IDBDatab aseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>); 89 static void addObjectStoreToMap(ScriptExecutionContext*, PassRefPtr<IDBDatab aseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>);
(...skipping 25 matching lines...) Expand all
118 115
119 typedef ListHashSet<RefPtr<IDBDatabaseCallbacks> > DatabaseCallbacksSet; 116 typedef ListHashSet<RefPtr<IDBDatabaseCallbacks> > DatabaseCallbacksSet;
120 DatabaseCallbacksSet m_databaseCallbacksSet; 117 DatabaseCallbacksSet m_databaseCallbacksSet;
121 }; 118 };
122 119
123 } // namespace WebCore 120 } // namespace WebCore
124 121
125 #endif 122 #endif
126 123
127 #endif // IDBDatabaseBackendImpl_h 124 #endif // IDBDatabaseBackendImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698