| 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 "content/browser/indexed_db/mock_indexed_db_callbacks.h" | 5 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 10 |
| 9 namespace content { | 11 namespace content { |
| 10 | 12 |
| 11 MockIndexedDBCallbacks::MockIndexedDBCallbacks() | 13 MockIndexedDBCallbacks::MockIndexedDBCallbacks() |
| 12 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {} | 14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {} |
| 13 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) | 15 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) |
| 14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {} | 16 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {} |
| 15 | 17 |
| 16 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { | 18 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { |
| 17 EXPECT_EQ(expect_connection_, !!connection_); | 19 EXPECT_EQ(expect_connection_, !!connection_); |
| 18 } | 20 } |
| 19 | 21 |
| 20 void MockIndexedDBCallbacks::OnSuccess() {} | 22 void MockIndexedDBCallbacks::OnSuccess() {} |
| 21 | 23 |
| 22 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} | 24 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} |
| 23 | 25 |
| 24 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} | 26 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} |
| 25 | 27 |
| 26 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} | 28 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} |
| 27 | 29 |
| 28 void MockIndexedDBCallbacks::OnSuccess( | 30 void MockIndexedDBCallbacks::OnSuccess( |
| 29 scoped_ptr<IndexedDBConnection> connection, | 31 scoped_ptr<IndexedDBConnection> connection, |
| 30 const IndexedDBDatabaseMetadata& metadata) { | 32 const IndexedDBDatabaseMetadata& metadata) { |
| 31 connection_ = connection.Pass(); | 33 connection_ = std::move(connection); |
| 32 } | 34 } |
| 33 | 35 |
| 34 } // namespace content | 36 } // namespace content |
| OLD | NEW |