Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: content/browser/indexed_db/mock_indexed_db_callbacks.cc

Issue 2500263003: Port messages sent by WebIDBCursorImpl to Mojo. (Closed)
Patch Set: Address dcheng@'s comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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> 7 #include <utility>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 MockIndexedDBCallbacks::MockIndexedDBCallbacks() 13 MockIndexedDBCallbacks::MockIndexedDBCallbacks()
14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {} 14 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr),
15 expect_connection_(true) {}
15 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) 16 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection)
16 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {} 17 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr),
18 expect_connection_(expect_connection) {}
17 19
18 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { 20 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() {
19 EXPECT_EQ(expect_connection_, !!connection_); 21 EXPECT_EQ(expect_connection_, !!connection_);
20 } 22 }
21 23
22 void MockIndexedDBCallbacks::OnSuccess() {} 24 void MockIndexedDBCallbacks::OnSuccess() {}
23 25
24 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} 26 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {}
25 27
26 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} 28 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {}
27 29
28 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} 30 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {}
29 31
30 void MockIndexedDBCallbacks::OnSuccess( 32 void MockIndexedDBCallbacks::OnSuccess(
31 std::unique_ptr<IndexedDBConnection> connection, 33 std::unique_ptr<IndexedDBConnection> connection,
32 const IndexedDBDatabaseMetadata& metadata) { 34 const IndexedDBDatabaseMetadata& metadata) {
33 connection_ = std::move(connection); 35 connection_ = std::move(connection);
34 } 36 }
35 37
36 bool MockIndexedDBCallbacks::IsValid() const { 38 bool MockIndexedDBCallbacks::IsValid() const {
37 return true; 39 return true;
38 } 40 }
39 41
40 } // namespace content 42 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/child/indexed_db/indexed_db_callbacks_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698