Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_ | |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "content/browser/indexed_db/indexed_db_database.h" | |
| 10 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" | |
| 11 | |
| 12 namespace content { | |
| 13 class IndexedDBCallbacks; | |
| 14 class IndexedDBDatabaseError; | |
| 15 | |
| 16 class CONTENT_EXPORT IndexedDBConnection { | |
| 17 public: | |
| 18 IndexedDBConnection(scoped_refptr<IndexedDBDatabase> db, | |
| 19 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks); | |
| 20 virtual ~IndexedDBConnection(); | |
| 21 | |
| 22 virtual void ForceClose(); | |
| 23 virtual void Close(); | |
| 24 | |
| 25 IndexedDBDatabase* database() { return database_.get(); } | |
| 26 IndexedDBDatabaseCallbacks* callbacks() { return callbacks_; } | |
|
dgrogan
2013/07/02 22:01:58
These should be consistent in whether or not they
jsbell
2013/07/02 22:19:24
Done. Also, see follow-up patch https://codereview
| |
| 27 | |
| 28 private: | |
| 29 // Only NULL in tests. | |
| 30 scoped_refptr<IndexedDBDatabase> database_; | |
| 31 | |
| 32 // The database_callbacks_ member is cleared when the connection | |
|
dgrogan
2013/07/02 22:01:58
s/database_//
jsbell
2013/07/02 22:19:24
Done.
| |
| 33 // is closed. (May be NULL in tests.) | |
| 34 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_; | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_ | |
| OLD | NEW |