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

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

Issue 2472213003: [IndexedDB] Refactoring to remove ref ptrs and host transaction ids. (Closed)
Patch Set: comments & rebase 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 (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 13 matching lines...) Expand all
24 #include "url/origin.h" 24 #include "url/origin.h"
25 25
26 namespace content { 26 namespace content {
27 class IndexedDBBlobInfo; 27 class IndexedDBBlobInfo;
28 class IndexedDBConnection; 28 class IndexedDBConnection;
29 class IndexedDBCursor; 29 class IndexedDBCursor;
30 class IndexedDBDatabase; 30 class IndexedDBDatabase;
31 struct IndexedDBDataLossInfo; 31 struct IndexedDBDataLossInfo;
32 struct IndexedDBDatabaseMetadata; 32 struct IndexedDBDatabaseMetadata;
33 struct IndexedDBReturnValue; 33 struct IndexedDBReturnValue;
34 class IndexedDBTransaction;
34 struct IndexedDBValue; 35 struct IndexedDBValue;
35 36
36 class CONTENT_EXPORT IndexedDBCallbacks 37 class CONTENT_EXPORT IndexedDBCallbacks
37 : public base::RefCounted<IndexedDBCallbacks> { 38 : public base::RefCounted<IndexedDBCallbacks> {
38 public: 39 public:
39 // Simple payload responses 40 // Simple payload responses
40 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, 41 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
41 int32_t ipc_thread_id, 42 int32_t ipc_thread_id,
42 int32_t ipc_callbacks_id); 43 int32_t ipc_callbacks_id);
43 44
(...skipping 14 matching lines...) Expand all
58 // IndexedDBFactory::GetDatabaseNames 59 // IndexedDBFactory::GetDatabaseNames
59 virtual void OnSuccess(const std::vector<base::string16>& string); 60 virtual void OnSuccess(const std::vector<base::string16>& string);
60 61
61 // IndexedDBFactory::Open / DeleteDatabase 62 // IndexedDBFactory::Open / DeleteDatabase
62 virtual void OnBlocked(int64_t existing_version); 63 virtual void OnBlocked(int64_t existing_version);
63 64
64 // IndexedDBFactory::Open 65 // IndexedDBFactory::Open
65 virtual void OnUpgradeNeeded( 66 virtual void OnUpgradeNeeded(
66 int64_t old_version, 67 int64_t old_version,
67 std::unique_ptr<IndexedDBConnection> connection, 68 std::unique_ptr<IndexedDBConnection> connection,
69 IndexedDBTransaction* transaction,
68 const content::IndexedDBDatabaseMetadata& metadata, 70 const content::IndexedDBDatabaseMetadata& metadata,
69 const IndexedDBDataLossInfo& data_loss_info); 71 const IndexedDBDataLossInfo& data_loss_info);
70 virtual void OnSuccess(std::unique_ptr<IndexedDBConnection> connection, 72 virtual void OnSuccess(std::unique_ptr<IndexedDBConnection> connection,
71 const content::IndexedDBDatabaseMetadata& metadata); 73 const content::IndexedDBDatabaseMetadata& metadata);
72 74
73 // IndexedDBDatabase::OpenCursor 75 // IndexedDBDatabase::OpenCursor
74 virtual void OnSuccess(scoped_refptr<IndexedDBCursor> cursor, 76 virtual void OnSuccess(std::unique_ptr<IndexedDBCursor> cursor,
75 const IndexedDBKey& key, 77 const IndexedDBKey& key,
76 const IndexedDBKey& primary_key, 78 const IndexedDBKey& primary_key,
77 IndexedDBValue* value); 79 IndexedDBValue* value);
78 80
79 // IndexedDBCursor::Continue / Advance 81 // IndexedDBCursor::Continue / Advance
80 virtual void OnSuccess(const IndexedDBKey& key, 82 virtual void OnSuccess(const IndexedDBKey& key,
81 const IndexedDBKey& primary_key, 83 const IndexedDBKey& primary_key,
82 IndexedDBValue* value); 84 IndexedDBValue* value);
83 85
84 // IndexedDBCursor::PrefetchContinue 86 // IndexedDBCursor::PrefetchContinue
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 151
150 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_; 152 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_;
151 base::ThreadChecker thread_checker_; 153 base::ThreadChecker thread_checker_;
152 154
153 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); 155 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
154 }; 156 };
155 157
156 } // namespace content 158 } // namespace content
157 159
158 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 160 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698