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

Side by Side Diff: content/browser/indexed_db/mock_indexed_db_change_handler.h

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 months 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 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CHANGE_HANDLER_H_
6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CHANGE_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <memory>
9 #include <utility>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "content/browser/indexed_db/indexed_db_callbacks.h"
12 #include "content/browser/indexed_db/indexed_db_connection.h" 12 #include "content/browser/indexed_db/indexed_db_connection.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class MockIndexedDBDatabaseCallbacks : public IndexedDBDatabaseCallbacks { 16 class MockIndexedDBChangeHandler : public IndexedDBChangeHandler {
17 public: 17 public:
18 MockIndexedDBDatabaseCallbacks(); 18 MockIndexedDBChangeHandler();
19 19
20 // content::IndexedDBChangeHandler:
20 void OnVersionChange(int64_t old_version, int64_t new_version) override {} 21 void OnVersionChange(int64_t old_version, int64_t new_version) override {}
21 void OnForcedClose() override; 22 void OnForcedClose() override;
22 void OnAbort(int64_t transaction_id, 23 void OnAbort(int64_t transaction_id,
23 const IndexedDBDatabaseError& error) override; 24 const IndexedDBDatabaseError& error) override;
24 void OnComplete(int64_t transaction_id) override {} 25 void OnComplete(int64_t transaction_id) override {}
26 void OnDatabaseChange(
27 int32_t ipc_database_id,
28 std::unique_ptr<IndexedDBObserverChanges> changes) override {};
29 void SetConnection(base::WeakPtr<IndexedDBConnection> connection) override;
25 30
26 bool abort_called() const { return abort_called_; } 31 bool abort_called() const { return abort_called_; }
27 bool forced_close_called() const { return forced_close_called_; } 32 bool forced_close_called() const { return forced_close_called_; }
28 33
29 private: 34 private:
30 ~MockIndexedDBDatabaseCallbacks() override {} 35 ~MockIndexedDBChangeHandler() override;
31 36
32 bool abort_called_; 37 bool abort_called_;
33 bool forced_close_called_; 38 bool forced_close_called_;
39 base::WeakPtr<IndexedDBConnection> connection_;
34 40
35 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBDatabaseCallbacks); 41 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBChangeHandler);
36 }; 42 };
37 43
38 } // namespace content 44 } // namespace content
39 45
40 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_ 46 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CHANGE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/mock_indexed_db_callbacks.cc ('k') | content/browser/indexed_db/mock_indexed_db_change_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698