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

Unified Diff: content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc

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/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
diff --git a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
index 4349ee240c12a4eaaee91d20020662e4bad6b562..dc02ff7331c4748bd2b3998951b89b828dc417f9 100644
--- a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
+++ b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
@@ -41,6 +41,22 @@ class FunctionTracer {
namespace content {
+class IndexedDBTestDatabase : public IndexedDBDatabase {
+ public:
+ IndexedDBTestDatabase(const base::string16& name,
+ IndexedDBBackingStore* backing_store,
+ IndexedDBFactory* factory,
+ const IndexedDBDatabase::Identifier& unique_identifier)
+ : IndexedDBDatabase(name, backing_store, factory, unique_identifier) {}
+
+ protected:
+ ~IndexedDBTestDatabase() override {}
+
+ size_t GetMaxMessageSizeInBytes() const override {
+ return 10 * 1024 * 1024; // 10MB
+ }
+};
+
class IndexedDBTestTransaction : public IndexedDBTransaction {
public:
IndexedDBTestTransaction(
@@ -234,6 +250,16 @@ MockBrowserTestIndexedDBClassFactory::MockBrowserTestIndexedDBClassFactory()
MockBrowserTestIndexedDBClassFactory::~MockBrowserTestIndexedDBClassFactory() {
}
+IndexedDBDatabase*
+MockBrowserTestIndexedDBClassFactory::CreateIndexedDBDatabase(
+ const base::string16& name,
+ IndexedDBBackingStore* backing_store,
+ IndexedDBFactory* factory,
+ const IndexedDBDatabase::Identifier& unique_identifier) {
+ return new IndexedDBTestDatabase(name, backing_store, factory,
+ unique_identifier);
+}
+
IndexedDBTransaction*
MockBrowserTestIndexedDBClassFactory::CreateIndexedDBTransaction(
int64 id,

Powered by Google App Engine
This is Rietveld 408576698