OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 virtual void OnSuccess(const IndexedDBKey& key); | 100 virtual void OnSuccess(const IndexedDBKey& key); |
101 | 101 |
102 // IndexedDBDatabase::Count | 102 // IndexedDBDatabase::Count |
103 // IndexedDBFactory::DeleteDatabase | 103 // IndexedDBFactory::DeleteDatabase |
104 // IndexedDBDatabase::DeleteRange | 104 // IndexedDBDatabase::DeleteRange |
105 virtual void OnSuccess(int64_t value); | 105 virtual void OnSuccess(int64_t value); |
106 | 106 |
107 // IndexedDBCursor::Continue / Advance (when complete) | 107 // IndexedDBCursor::Continue / Advance (when complete) |
108 virtual void OnSuccess(); | 108 virtual void OnSuccess(); |
109 | 109 |
| 110 // Checks to see if the associated dispatcher host is still connected. If |
| 111 // not this request can be dropped. |
| 112 virtual bool IsValid() const; |
| 113 |
110 void SetConnectionOpenStartTime(const base::TimeTicks& start_time); | 114 void SetConnectionOpenStartTime(const base::TimeTicks& start_time); |
111 | 115 |
112 protected: | 116 protected: |
113 virtual ~IndexedDBCallbacks(); | 117 virtual ~IndexedDBCallbacks(); |
114 | 118 |
115 private: | 119 private: |
116 void RegisterBlobsAndSend(const std::vector<IndexedDBBlobInfo>& blob_info, | 120 void RegisterBlobsAndSend(const std::vector<IndexedDBBlobInfo>& blob_info, |
117 const base::Closure& callback); | 121 const base::Closure& callback); |
118 | 122 |
119 friend class base::RefCounted<IndexedDBCallbacks>; | 123 friend class base::RefCounted<IndexedDBCallbacks>; |
(...skipping 17 matching lines...) Expand all Loading... |
137 | 141 |
138 // The "blocked" event should be sent at most once per request. | 142 // The "blocked" event should be sent at most once per request. |
139 bool sent_blocked_; | 143 bool sent_blocked_; |
140 base::TimeTicks connection_open_start_time_; | 144 base::TimeTicks connection_open_start_time_; |
141 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); | 145 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); |
142 }; | 146 }; |
143 | 147 |
144 } // namespace content | 148 } // namespace content |
145 | 149 |
146 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 150 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
OLD | NEW |