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

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

Issue 308103004: IndexedDB: Using a mock IndexedDBFactory for unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use GoogleMock with std::pair types Created 6 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
Index: content/browser/indexed_db/indexed_db_factory_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc
index eac4c43549d2399bea7f0e30b9e5f2902e17a369..423d2748dc3ca658b2005315c9ea71f919f2729a 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/indexed_db/indexed_db_factory_impl.h"
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -125,8 +126,7 @@ bool IndexedDBFactoryImpl::HasLastBackingStoreReference(
}
void IndexedDBFactoryImpl::ForceClose(const GURL& origin_url) {
- std::pair<OriginDBMapIterator, OriginDBMapIterator> range =
- GetOpenDatabasesForOrigin(origin_url);
+ OriginDBs range = GetOpenDatabasesForOrigin(origin_url);
while (range.first != range.second) {
IndexedDBDatabase* db = range.first->second;
@@ -495,8 +495,7 @@ IndexedDBFactoryImpl::GetOpenDatabasesForOrigin(const GURL& origin_url) const {
size_t IndexedDBFactoryImpl::GetConnectionCount(const GURL& origin_url) const {
size_t count(0);
- std::pair<OriginDBMapIterator, OriginDBMapIterator> range =
- GetOpenDatabasesForOrigin(origin_url);
+ OriginDBs range = GetOpenDatabasesForOrigin(origin_url);
for (OriginDBMapIterator it = range.first; it != range.second; ++it)
count += it->second->ConnectionCount();
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory_impl.h ('k') | content/browser/indexed_db/indexed_db_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698