summaryrefslogtreecommitdiffstats
path: root/content/common/indexed_db/indexed_db_dispatcher.h
diff options
context:
space:
mode:
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:48:09 +0000
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:48:09 +0000
commitd019ca25e03bdceb4eab8b4afef2ff6a9dd69b65 (patch)
tree9694a83683a4911b1c28dcd2c0136214b1936471 /content/common/indexed_db/indexed_db_dispatcher.h
parent6431cc8c329dd2e213a8bbcaa24a2f92b6218882 (diff)
downloadchromium_src-d019ca25e03bdceb4eab8b4afef2ff6a9dd69b65.zip
chromium_src-d019ca25e03bdceb4eab8b4afef2ff6a9dd69b65.tar.gz
chromium_src-d019ca25e03bdceb4eab8b4afef2ff6a9dd69b65.tar.bz2
IndexedDB: Impose a 64MB limit on the size of values that can be stored.
Introduces unit tests for the IDB dispatcher to verify that large values are blocked. Script-based browsertest included, but may be too slow for bots so landing disabled. BUG=96826 R=dgrogan@chromium.org,michaeln@chromium.org Review URL: http://codereview.chromium.org/9750009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/indexed_db/indexed_db_dispatcher.h')
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h
index f4b0b4b..f48e7c2 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.h
+++ b/content/common/indexed_db/indexed_db_dispatcher.h
@@ -11,6 +11,7 @@
#include "base/id_map.h"
#include "base/nullable_string16.h"
+#include "content/common/content_export.h"
#include "ipc/ipc_sync_message_filter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h"
@@ -41,9 +42,12 @@ namespace content {
class SerializedScriptValue;
}
+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 IndexedDBDispatcher : public webkit_glue::WorkerTaskRunner::Observer {
+class CONTENT_EXPORT IndexedDBDispatcher
+ : public webkit_glue::WorkerTaskRunner::Observer {
public:
virtual ~IndexedDBDispatcher();
static IndexedDBDispatcher* ThreadSpecificInstance();
@@ -203,6 +207,8 @@ class IndexedDBDispatcher : public webkit_glue::WorkerTaskRunner::Observer {
static int32 TransactionId(const WebKit::WebIDBTransaction& transaction);
private:
+ FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest);
+
IndexedDBDispatcher();
// IDBCallback message handlers.
void OnSuccessNull(int32 response_id);