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

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

Issue 1841553002: IndexedDB: Use url::Origin rather than GURL for representing origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-idb
Patch Set: Rebased Created 4 years, 8 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 (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>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "content/browser/indexed_db/indexed_db_database_error.h" 18 #include "content/browser/indexed_db/indexed_db_database_error.h"
19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
20 #include "content/common/indexed_db/indexed_db_key.h" 20 #include "content/common/indexed_db/indexed_db_key.h"
21 #include "content/common/indexed_db/indexed_db_key_path.h" 21 #include "content/common/indexed_db/indexed_db_key_path.h"
22 #include "url/gurl.h" 22 #include "url/origin.h"
23 23
24 namespace content { 24 namespace content {
25 class IndexedDBBlobInfo; 25 class IndexedDBBlobInfo;
26 class IndexedDBConnection; 26 class IndexedDBConnection;
27 class IndexedDBCursor; 27 class IndexedDBCursor;
28 class IndexedDBDatabase; 28 class IndexedDBDatabase;
29 class IndexedDBDatabaseCallbacks; 29 class IndexedDBDatabaseCallbacks;
30 struct IndexedDBDatabaseMetadata; 30 struct IndexedDBDatabaseMetadata;
31 struct IndexedDBReturnValue; 31 struct IndexedDBReturnValue;
32 struct IndexedDBValue; 32 struct IndexedDBValue;
(...skipping 11 matching lines...) Expand all
44 int32_t ipc_thread_id, 44 int32_t ipc_thread_id,
45 int32_t ipc_callbacks_id, 45 int32_t ipc_callbacks_id,
46 int32_t ipc_cursor_id); 46 int32_t ipc_cursor_id);
47 47
48 // IndexedDBDatabase responses 48 // IndexedDBDatabase responses
49 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, 49 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
50 int32_t ipc_thread_id, 50 int32_t ipc_thread_id,
51 int32_t ipc_callbacks_id, 51 int32_t ipc_callbacks_id,
52 int32_t ipc_database_callbacks_id, 52 int32_t ipc_database_callbacks_id,
53 int64_t host_transaction_id, 53 int64_t host_transaction_id,
54 const GURL& origin_url); 54 const url::Origin& origin);
55 55
56 virtual void OnError(const IndexedDBDatabaseError& error); 56 virtual void OnError(const IndexedDBDatabaseError& error);
57 57
58 // IndexedDBFactory::GetDatabaseNames 58 // IndexedDBFactory::GetDatabaseNames
59 virtual void OnSuccess(const std::vector<base::string16>& string); 59 virtual void OnSuccess(const std::vector<base::string16>& string);
60 60
61 // IndexedDBFactory::Open / DeleteDatabase 61 // IndexedDBFactory::Open / DeleteDatabase
62 virtual void OnBlocked(int64_t existing_version); 62 virtual void OnBlocked(int64_t existing_version);
63 63
64 // IndexedDBFactory::Open 64 // IndexedDBFactory::Open
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Originally from IndexedDBCallbacks: 123 // Originally from IndexedDBCallbacks:
124 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; 124 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
125 int32_t ipc_callbacks_id_; 125 int32_t ipc_callbacks_id_;
126 int32_t ipc_thread_id_; 126 int32_t ipc_thread_id_;
127 127
128 // IndexedDBCursor callbacks ------------------------ 128 // IndexedDBCursor callbacks ------------------------
129 int32_t ipc_cursor_id_; 129 int32_t ipc_cursor_id_;
130 130
131 // IndexedDBDatabase callbacks ------------------------ 131 // IndexedDBDatabase callbacks ------------------------
132 int64_t host_transaction_id_; 132 int64_t host_transaction_id_;
133 GURL origin_url_; 133 url::Origin origin_;
134 int32_t ipc_database_id_; 134 int32_t ipc_database_id_;
135 int32_t ipc_database_callbacks_id_; 135 int32_t ipc_database_callbacks_id_;
136 136
137 // Stored in OnDataLoss, merged with OnUpgradeNeeded response. 137 // Stored in OnDataLoss, merged with OnUpgradeNeeded response.
138 blink::WebIDBDataLoss data_loss_; 138 blink::WebIDBDataLoss data_loss_;
139 std::string data_loss_message_; 139 std::string data_loss_message_;
140 140
141 // The "blocked" event should be sent at most once per request. 141 // The "blocked" event should be sent at most once per request.
142 bool sent_blocked_; 142 bool sent_blocked_;
143 base::TimeTicks connection_open_start_time_; 143 base::TimeTicks connection_open_start_time_;
144 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); 144 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
145 }; 145 };
146 146
147 } // namespace content 147 } // namespace content
148 148
149 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 149 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698