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

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

Issue 2140193002: IndexedDB: Saving data loss status in IndexedDBPendingConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@idb-data-loss
Patch Set: Deleted commented out code. Created 4 years, 5 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_unittest.cc ('k') | content/content_browser.gypi » ('j') | 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 ca0735169f49c9edf120c4d3e57586ffc4059155..c15f12d36c8196d5746307e67fdf3390398ac376 100644
--- a/content/browser/indexed_db/mock_indexed_db_factory.h
+++ b/content/browser/indexed_db/mock_indexed_db_factory.h
@@ -26,12 +26,20 @@ class MockIndexedDBFactory : public IndexedDBFactory {
const url::Origin& origin,
const base::FilePath& data_directory,
net::URLRequestContext* request_context));
- MOCK_METHOD5(Open,
+ MOCK_METHOD5(OpenProxy,
void(const base::string16& name,
- const IndexedDBPendingConnection& connection,
+ IndexedDBPendingConnection* connection,
net::URLRequestContext* request_context,
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);
+ }
MOCK_METHOD5(DeleteDatabase,
void(const base::string16& name,
net::URLRequestContext* request_context,
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698