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

Unified Diff: content/browser/indexed_db/mock_indexed_db_factory.h

Issue 2172863002: [IndexedDB]: Passing URLRequestContextGetter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few missed merge conflicts. Created 4 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_fake_backing_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/mock_indexed_db_factory.h
diff --git a/content/browser/indexed_db/mock_indexed_db_factory.h b/content/browser/indexed_db/mock_indexed_db_factory.h
index c15f12d36c8196d5746307e67fdf3390398ac376..c6d734d6174e2e5b9eebc252e9bc060fbd90429e 100644
--- a/content/browser/indexed_db/mock_indexed_db_factory.h
+++ b/content/browser/indexed_db/mock_indexed_db_factory.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include "base/macros.h"
@@ -21,31 +22,36 @@ class MockIndexedDBFactory : public IndexedDBFactory {
MOCK_METHOD2(ReleaseDatabase,
void(const IndexedDBDatabase::Identifier& identifier,
bool forced_close));
- MOCK_METHOD4(GetDatabaseNames,
- void(scoped_refptr<IndexedDBCallbacks> callbacks,
- const url::Origin& origin,
- const base::FilePath& data_directory,
- net::URLRequestContext* request_context));
- MOCK_METHOD5(OpenProxy,
- void(const base::string16& name,
- IndexedDBPendingConnection* connection,
- net::URLRequestContext* request_context,
- const url::Origin& origin,
- const base::FilePath& data_directory));
+ MOCK_METHOD4(
+ GetDatabaseNames,
+ void(scoped_refptr<IndexedDBCallbacks> callbacks,
+ const url::Origin& origin,
+ const base::FilePath& data_directory,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter));
+ MOCK_METHOD5(
+ OpenProxy,
+ void(const base::string16& name,
+ IndexedDBPendingConnection* connection,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ const url::Origin& origin,
+ const base::FilePath& data_directory));
// Googlemock can't deal with move-only types, so *Proxy() is a workaround.
- virtual void Open(const base::string16& name,
- std::unique_ptr<IndexedDBPendingConnection> connection,
- net::URLRequestContext* request_context,
- const url::Origin& origin,
- const base::FilePath& data_directory) {
- OpenProxy(name, connection.get(), request_context, origin, data_directory);
+ virtual void Open(
+ const base::string16& name,
+ std::unique_ptr<IndexedDBPendingConnection> connection,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ const url::Origin& origin,
+ const base::FilePath& data_directory) {
+ OpenProxy(name, connection.get(), request_context_getter, origin,
+ data_directory);
}
- MOCK_METHOD5(DeleteDatabase,
- void(const base::string16& name,
- net::URLRequestContext* request_context,
- scoped_refptr<IndexedDBCallbacks> callbacks,
- const url::Origin& origin,
- const base::FilePath& data_directory));
+ MOCK_METHOD5(
+ DeleteDatabase,
+ void(const base::string16& name,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ scoped_refptr<IndexedDBCallbacks> callbacks,
+ const url::Origin& origin,
+ const base::FilePath& data_directory));
MOCK_METHOD1(HandleBackingStoreFailure, void(const url::Origin& origin));
MOCK_METHOD2(HandleBackingStoreCorruption,
void(const url::Origin& origin,
@@ -65,24 +71,26 @@ class MockIndexedDBFactory : public IndexedDBFactory {
protected:
virtual ~MockIndexedDBFactory();
- MOCK_METHOD6(OpenBackingStore,
- scoped_refptr<IndexedDBBackingStore>(
- const url::Origin& origin,
- const base::FilePath& data_directory,
- net::URLRequestContext* request_context,
- IndexedDBDataLossInfo* data_loss_info,
- bool* disk_full,
- leveldb::Status* s));
+ MOCK_METHOD6(
+ OpenBackingStore,
+ scoped_refptr<IndexedDBBackingStore>(
+ const url::Origin& origin,
+ const base::FilePath& data_directory,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ IndexedDBDataLossInfo* data_loss_info,
+ bool* disk_full,
+ leveldb::Status* s));
- MOCK_METHOD7(OpenBackingStoreHelper,
- scoped_refptr<IndexedDBBackingStore>(
- const url::Origin& origin,
- const base::FilePath& data_directory,
- net::URLRequestContext* request_context,
- IndexedDBDataLossInfo* data_loss_info,
- bool* disk_full,
- bool first_time,
- leveldb::Status* s));
+ MOCK_METHOD7(
+ OpenBackingStoreHelper,
+ scoped_refptr<IndexedDBBackingStore>(
+ const url::Origin& origin,
+ const base::FilePath& data_directory,
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ IndexedDBDataLossInfo* data_loss_info,
+ bool* disk_full,
+ bool first_time,
+ leveldb::Status* s));
private:
DISALLOW_COPY_AND_ASSIGN(MockIndexedDBFactory);
« no previous file with comments | « content/browser/indexed_db/indexed_db_fake_backing_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698