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

Unified Diff: content/child/indexed_db/indexed_db_dispatcher.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, 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 side-by-side diff with in-line comments
Download patch
Index: content/child/indexed_db/indexed_db_dispatcher.h
diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h
index 55f74ef635b2ebd4dcef753284233cffca4db1a0..854878df98c4a75f5c4fac1afda30094a0569630 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.h
+++ b/content/child/indexed_db/indexed_db_dispatcher.h
@@ -15,6 +15,7 @@
#include "base/strings/nullable_string16.h"
#include "content/child/worker_task_runner.h"
#include "content/common/content_export.h"
+#include "content/common/indexed_db/indexed_db_constants.h"
#include "ipc/ipc_sync_message_filter.h"
#include "third_party/WebKit/public/platform/WebBlobInfo.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h"
@@ -41,8 +42,6 @@ class WebIDBCursorImpl;
class WebIDBDatabaseImpl;
class ThreadSafeSender;
-CONTENT_EXPORT extern const size_t kMaxIDBValueSizeInBytes;
-
// Handle the indexed db related communication for this context thread - the
// main thread and each worker thread have their own copies.
class CONTENT_EXPORT IndexedDBDispatcher : public WorkerTaskRunner::Observer {
@@ -257,7 +256,7 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerTaskRunner::Observer {
// requests larger than this size will be rejected.
// Used by unit tests to exercise behavior without allocating huge chunks
// of memory.
- size_t max_put_value_size_;
+ size_t max_put_value_size_ = kMaxIDBMessageSizeInBytes;
// Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be
// destroyed and used on the same thread it was created on.

Powered by Google App Engine
This is Rietveld 408576698