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_CALLBACKS_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_WRAPPER_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_WRAPPER_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_WRAPPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual void OnSuccessWithPrefetch( | 67 virtual void OnSuccessWithPrefetch( |
68 const std::vector<IndexedDBKey>& keys, | 68 const std::vector<IndexedDBKey>& keys, |
69 const std::vector<IndexedDBKey>& primary_keys, | 69 const std::vector<IndexedDBKey>& primary_keys, |
70 const std::vector<std::vector<char> >& values); | 70 const std::vector<std::vector<char> >& values); |
71 // From IDBFactory.open()/deleteDatabase() | 71 // From IDBFactory.open()/deleteDatabase() |
72 virtual void OnBlocked(int64 existing_version); | 72 virtual void OnBlocked(int64 existing_version); |
73 // From IDBFactory.open() | 73 // From IDBFactory.open() |
74 virtual void OnUpgradeNeeded( | 74 virtual void OnUpgradeNeeded( |
75 int64 old_version, | 75 int64 old_version, |
76 scoped_refptr<IndexedDBDatabase> db, | 76 scoped_refptr<IndexedDBDatabase> db, |
77 const content::IndexedDBDatabaseMetadata& metadata); | 77 const content::IndexedDBDatabaseMetadata& metadata, |
| 78 bool data_loss); |
78 virtual void OnSuccess(scoped_refptr<IndexedDBDatabase> db, | 79 virtual void OnSuccess(scoped_refptr<IndexedDBDatabase> db, |
79 const content::IndexedDBDatabaseMetadata& metadata); | 80 const content::IndexedDBDatabaseMetadata& metadata); |
80 virtual void SetDatabaseCallbacks( | 81 virtual void SetDatabaseCallbacks( |
81 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks); | 82 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks); |
82 | 83 |
83 protected: | 84 protected: |
84 virtual ~IndexedDBCallbacksWrapper(); | 85 virtual ~IndexedDBCallbacksWrapper(); |
85 explicit IndexedDBCallbacksWrapper(IndexedDBCallbacksBase* callbacks); | 86 explicit IndexedDBCallbacksWrapper(IndexedDBCallbacksBase* callbacks); |
86 | 87 |
87 private: | 88 private: |
88 friend class base::RefCounted<IndexedDBCallbacksWrapper>; | 89 friend class base::RefCounted<IndexedDBCallbacksWrapper>; |
89 scoped_ptr<WebIDBDatabaseImpl> web_database_impl_; | 90 scoped_ptr<WebIDBDatabaseImpl> web_database_impl_; |
90 scoped_ptr<IndexedDBCallbacksBase> callbacks_; | 91 scoped_ptr<IndexedDBCallbacksBase> callbacks_; |
91 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_; | 92 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_; |
92 bool did_complete_; | 93 bool did_complete_; |
93 bool did_create_proxy_; | 94 bool did_create_proxy_; |
94 }; | 95 }; |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
97 | 98 |
98 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_WRAPPER_H_ | 99 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_WRAPPER_H_ |
OLD | NEW |