| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/message_loop/message_loop_proxy.h" | 6 #include "base/message_loop/message_loop_proxy.h" |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 8 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 9 #include "content/child/indexed_db/webidbcursor_impl.h" | 9 #include "content/child/indexed_db/webidbcursor_impl.h" |
| 10 #include "content/child/thread_safe_sender.h" | 10 #include "content/child/thread_safe_sender.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 EXPECT_TRUE(callbacks.error_seen()); | 133 EXPECT_TRUE(callbacks.error_seen()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 namespace { | 136 namespace { |
| 137 | 137 |
| 138 class CursorCallbacks : public WebIDBCallbacks { | 138 class CursorCallbacks : public WebIDBCallbacks { |
| 139 public: | 139 public: |
| 140 explicit CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) | 140 explicit CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) |
| 141 : cursor_(cursor) {} | 141 : cursor_(cursor) {} |
| 142 | 142 |
| 143 virtual void onSuccess(const WebData&, | 143 void onSuccess(const WebData&, const WebVector<WebBlobInfo>&) override {} |
| 144 const WebVector<WebBlobInfo>&) override {} | 144 void onSuccess(WebIDBCursor* cursor, |
| 145 virtual void onSuccess(WebIDBCursor* cursor, | 145 const WebIDBKey& key, |
| 146 const WebIDBKey& key, | 146 const WebIDBKey& primaryKey, |
| 147 const WebIDBKey& primaryKey, | 147 const WebData& value, |
| 148 const WebData& value, | 148 const WebVector<WebBlobInfo>&) override { |
| 149 const WebVector<WebBlobInfo>&) override { | |
| 150 cursor_->reset(cursor); | 149 cursor_->reset(cursor); |
| 151 } | 150 } |
| 152 | 151 |
| 153 private: | 152 private: |
| 154 scoped_ptr<WebIDBCursor>* cursor_; | 153 scoped_ptr<WebIDBCursor>* cursor_; |
| 155 | 154 |
| 156 DISALLOW_COPY_AND_ASSIGN(CursorCallbacks); | 155 DISALLOW_COPY_AND_ASSIGN(CursorCallbacks); |
| 157 }; | 156 }; |
| 158 | 157 |
| 159 } // namespace | 158 } // namespace |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 cursor1_transaction_id); | 339 cursor1_transaction_id); |
| 341 | 340 |
| 342 EXPECT_EQ(2, cursor1->reset_count()); | 341 EXPECT_EQ(2, cursor1->reset_count()); |
| 343 EXPECT_EQ(0, cursor2->reset_count()); | 342 EXPECT_EQ(0, cursor2->reset_count()); |
| 344 | 343 |
| 345 cursor1.reset(); | 344 cursor1.reset(); |
| 346 cursor2.reset(); | 345 cursor2.reset(); |
| 347 } | 346 } |
| 348 | 347 |
| 349 } // namespace content | 348 } // namespace content |
| OLD | NEW |