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

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

Issue 1321583002: IndexedDB: Make getAll() requests fail if result exceeds IPC limits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename constant Created 5 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
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>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 scoped_refptr<IndexedDBCallbacks> callbacks, 228 scoped_refptr<IndexedDBCallbacks> callbacks,
229 IndexedDBTransaction* transaction); 229 IndexedDBTransaction* transaction);
230 void DeleteRangeOperation(int64 object_store_id, 230 void DeleteRangeOperation(int64 object_store_id,
231 scoped_ptr<IndexedDBKeyRange> key_range, 231 scoped_ptr<IndexedDBKeyRange> key_range,
232 scoped_refptr<IndexedDBCallbacks> callbacks, 232 scoped_refptr<IndexedDBCallbacks> callbacks,
233 IndexedDBTransaction* transaction); 233 IndexedDBTransaction* transaction);
234 void ClearOperation(int64 object_store_id, 234 void ClearOperation(int64 object_store_id,
235 scoped_refptr<IndexedDBCallbacks> callbacks, 235 scoped_refptr<IndexedDBCallbacks> callbacks,
236 IndexedDBTransaction* transaction); 236 IndexedDBTransaction* transaction);
237 237
238 protected:
239 IndexedDBDatabase(const base::string16& name,
240 IndexedDBBackingStore* backing_store,
241 IndexedDBFactory* factory,
242 const Identifier& unique_identifier);
243 virtual ~IndexedDBDatabase();
244
245 // May be overridden in tests.
246 virtual size_t GetMaxMessageSizeInBytes() const;
247
238 private: 248 private:
239 friend class base::RefCounted<IndexedDBDatabase>; 249 friend class base::RefCounted<IndexedDBDatabase>;
250 friend class IndexedDBClassFactory;
240 251
241 class PendingDeleteCall; 252 class PendingDeleteCall;
242 class PendingSuccessCall; 253 class PendingSuccessCall;
243 class PendingUpgradeCall; 254 class PendingUpgradeCall;
244 255
245 typedef std::map<int64, IndexedDBTransaction*> TransactionMap; 256 typedef std::map<int64, IndexedDBTransaction*> TransactionMap;
246 typedef std::list<IndexedDBPendingConnection> PendingOpenCallList; 257 typedef std::list<IndexedDBPendingConnection> PendingOpenCallList;
247 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; 258 typedef std::list<PendingDeleteCall*> PendingDeleteCallList;
248 typedef list_set<IndexedDBConnection*> ConnectionSet; 259 typedef list_set<IndexedDBConnection*> ConnectionSet;
249 260
250 IndexedDBDatabase(const base::string16& name,
251 IndexedDBBackingStore* backing_store,
252 IndexedDBFactory* factory,
253 const Identifier& unique_identifier);
254 ~IndexedDBDatabase();
255
256 bool IsOpenConnectionBlocked() const; 261 bool IsOpenConnectionBlocked() const;
257 leveldb::Status OpenInternal(); 262 leveldb::Status OpenInternal();
258 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks, 263 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks,
259 scoped_ptr<IndexedDBConnection> connection, 264 scoped_ptr<IndexedDBConnection> connection,
260 int64 transaction_id, 265 int64 transaction_id,
261 int64 requested_version); 266 int64 requested_version);
262 void RunVersionChangeTransactionFinal( 267 void RunVersionChangeTransactionFinal(
263 scoped_refptr<IndexedDBCallbacks> callbacks, 268 scoped_refptr<IndexedDBCallbacks> callbacks,
264 scoped_ptr<IndexedDBConnection> connection, 269 scoped_ptr<IndexedDBConnection> connection,
265 int64 transaction_id, 270 int64 transaction_id,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 PendingDeleteCallList pending_delete_calls_; 303 PendingDeleteCallList pending_delete_calls_;
299 304
300 ConnectionSet connections_; 305 ConnectionSet connections_;
301 306
302 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); 307 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
303 }; 308 };
304 309
305 } // namespace content 310 } // namespace content
306 311
307 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 312 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_class_factory.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698