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_database.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fixes [builds, untested] Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_INDEXED_DB_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "content/browser/indexed_db/indexed_db.h" 15 #include "content/browser/indexed_db/indexed_db.h"
16 #include "content/browser/indexed_db/indexed_db_callbacks.h" 16 #include "content/browser/indexed_db/indexed_db_callbacks.h"
17 #include "content/browser/indexed_db/indexed_db_metadata.h" 17 #include "content/browser/indexed_db/indexed_db_metadata.h"
18 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" 18 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
19 #include "content/browser/indexed_db/list_set.h" 19 #include "content/browser/indexed_db/list_set.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 class IndexedDBBlobInfo;
23 class IndexedDBConnection; 24 class IndexedDBConnection;
24 class IndexedDBDatabaseCallbacks; 25 class IndexedDBDatabaseCallbacks;
25 class IndexedDBBackingStore; 26 class IndexedDBBackingStore;
26 class IndexedDBFactory; 27 class IndexedDBFactory;
27 class IndexedDBKey; 28 class IndexedDBKey;
28 class IndexedDBKeyPath; 29 class IndexedDBKeyPath;
29 class IndexedDBKeyRange; 30 class IndexedDBKeyRange;
30 class IndexedDBTransaction; 31 class IndexedDBTransaction;
32 struct IndexedDBValue;
31 33
32 class CONTENT_EXPORT IndexedDBDatabase 34 class CONTENT_EXPORT IndexedDBDatabase
33 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { 35 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
34 public: 36 public:
35 enum TaskType { 37 enum TaskType {
36 NORMAL_TASK = 0, 38 NORMAL_TASK = 0,
37 PREEMPTIVE_TASK 39 PREEMPTIVE_TASK
38 }; 40 };
39 41
40 enum PutMode { 42 enum PutMode {
(...skipping 23 matching lines...) Expand all
64 int64 new_max_object_store_id); 66 int64 new_max_object_store_id);
65 void RemoveObjectStore(int64 object_store_id); 67 void RemoveObjectStore(int64 object_store_id);
66 void AddIndex(int64 object_store_id, 68 void AddIndex(int64 object_store_id,
67 const IndexedDBIndexMetadata& metadata, 69 const IndexedDBIndexMetadata& metadata,
68 int64 new_max_index_id); 70 int64 new_max_index_id);
69 void RemoveIndex(int64 object_store_id, int64 index_id); 71 void RemoveIndex(int64 object_store_id, int64 index_id);
70 72
71 void OpenConnection( 73 void OpenConnection(
72 scoped_refptr<IndexedDBCallbacks> callbacks, 74 scoped_refptr<IndexedDBCallbacks> callbacks,
73 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, 75 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
76 int child_process_id,
74 int64 transaction_id, 77 int64 transaction_id,
75 int64 version); 78 int64 version);
76 void OpenConnection( 79 void OpenConnection(
77 scoped_refptr<IndexedDBCallbacks> callbacks, 80 scoped_refptr<IndexedDBCallbacks> callbacks,
78 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, 81 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
82 int child_process_id,
79 int64 transaction_id, 83 int64 transaction_id,
80 int64 version, 84 int64 version,
81 WebKit::WebIDBCallbacks::DataLoss data_loss); 85 WebKit::WebIDBCallbacks::DataLoss data_loss);
82 void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks); 86 void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks);
83 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } 87 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; }
84 88
85 void CreateObjectStore(int64 transaction_id, 89 void CreateObjectStore(int64 transaction_id,
86 int64 object_store_id, 90 int64 object_store_id,
87 const string16& name, 91 const string16& name,
88 const IndexedDBKeyPath& key_path, 92 const IndexedDBKeyPath& key_path,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void TransactionFinishedAndAbortFired(IndexedDBTransaction* transaction); 124 void TransactionFinishedAndAbortFired(IndexedDBTransaction* transaction);
121 125
122 void Get(int64 transaction_id, 126 void Get(int64 transaction_id,
123 int64 object_store_id, 127 int64 object_store_id,
124 int64 index_id, 128 int64 index_id,
125 scoped_ptr<IndexedDBKeyRange> key_range, 129 scoped_ptr<IndexedDBKeyRange> key_range,
126 bool key_only, 130 bool key_only,
127 scoped_refptr<IndexedDBCallbacks> callbacks); 131 scoped_refptr<IndexedDBCallbacks> callbacks);
128 void Put(int64 transaction_id, 132 void Put(int64 transaction_id,
129 int64 object_store_id, 133 int64 object_store_id,
130 std::string* value, 134 IndexedDBValue* value,
131 scoped_ptr<IndexedDBKey> key, 135 scoped_ptr<IndexedDBKey> key,
132 PutMode mode, 136 PutMode mode,
133 scoped_refptr<IndexedDBCallbacks> callbacks, 137 scoped_refptr<IndexedDBCallbacks> callbacks,
134 const std::vector<int64>& index_ids, 138 const std::vector<int64>& index_ids,
135 const std::vector<IndexKeys>& index_keys); 139 const std::vector<IndexKeys>& index_keys);
136 void SetIndexKeys(int64 transaction_id, 140 void SetIndexKeys(int64 transaction_id,
137 int64 object_store_id, 141 int64 object_store_id,
138 scoped_ptr<IndexedDBKey> primary_key, 142 scoped_ptr<IndexedDBKey> primary_key,
139 const std::vector<int64>& index_ids, 143 const std::vector<int64>& index_ids,
140 const std::vector<IndexKeys>& index_keys); 144 const std::vector<IndexKeys>& index_keys);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 307
304 typedef list_set<IndexedDBConnection*> ConnectionSet; 308 typedef list_set<IndexedDBConnection*> ConnectionSet;
305 ConnectionSet connections_; 309 ConnectionSet connections_;
306 310
307 bool closing_connection_; 311 bool closing_connection_;
308 }; 312 };
309 313
310 } // namespace content 314 } // namespace content
311 315
312 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 316 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698