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

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

Issue 932143003: IndexedDB: Report QuotaExceededError when commit fails due to disk full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IndexedDBDatabaseError impl to cc file Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_
6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "content/browser/indexed_db/indexed_db_class_factory.h" 10 #include "content/browser/indexed_db/indexed_db_class_factory.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class LevelDBTransaction; 14 class LevelDBTransaction;
15 class LevelDBDatabase; 15 class LevelDBDatabase;
16 16
17 enum FailClass { 17 enum FailClass {
18 FAIL_CLASS_NOTHING, 18 FAIL_CLASS_NOTHING,
19 FAIL_CLASS_LEVELDB_ITERATOR, 19 FAIL_CLASS_LEVELDB_ITERATOR,
20 FAIL_CLASS_LEVELDB_TRANSACTION, 20 FAIL_CLASS_LEVELDB_TRANSACTION,
21 }; 21 };
22 22
23 enum FailMethod { 23 enum FailMethod {
24 FAIL_METHOD_NOTHING, 24 FAIL_METHOD_NOTHING,
25 FAIL_METHOD_COMMIT, 25 FAIL_METHOD_COMMIT,
26 FAIL_METHOD_COMMIT_DISK_FULL,
26 FAIL_METHOD_GET, 27 FAIL_METHOD_GET,
27 FAIL_METHOD_SEEK, 28 FAIL_METHOD_SEEK,
28 }; 29 };
29 30
30 class MockBrowserTestIndexedDBClassFactory : public IndexedDBClassFactory { 31 class MockBrowserTestIndexedDBClassFactory : public IndexedDBClassFactory {
31 public: 32 public:
32 MockBrowserTestIndexedDBClassFactory(); 33 MockBrowserTestIndexedDBClassFactory();
33 ~MockBrowserTestIndexedDBClassFactory() override; 34 ~MockBrowserTestIndexedDBClassFactory() override;
34 LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db) override; 35 LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db) override;
35 LevelDBIteratorImpl* CreateIteratorImpl( 36 LevelDBIteratorImpl* CreateIteratorImpl(
(...skipping 10 matching lines...) Expand all
46 FailMethod failure_method_; 47 FailMethod failure_method_;
47 std::map<FailClass, int> instance_count_; 48 std::map<FailClass, int> instance_count_;
48 std::map<FailClass, int> fail_on_instance_num_; 49 std::map<FailClass, int> fail_on_instance_num_;
49 std::map<FailClass, int> fail_on_call_num_; 50 std::map<FailClass, int> fail_on_call_num_;
50 bool only_trace_calls_; 51 bool only_trace_calls_;
51 }; 52 };
52 53
53 } // namespace content 54 } // namespace content
54 55
55 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_ H_ 56 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698