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

Side by Side Diff: content/browser/indexed_db/indexed_db_factory_impl.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/browser/indexed_db/indexed_db_factory_impl.h" 5 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 DLOG(ERROR) << "Internal error getting database names"; 245 DLOG(ERROR) << "Internal error getting database names";
246 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, 246 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
247 "Internal error opening backing store for " 247 "Internal error opening backing store for "
248 "indexedDB.deleteDatabase."); 248 "indexedDB.deleteDatabase.");
249 callbacks->OnError(error); 249 callbacks->OnError(error);
250 backing_store = NULL; 250 backing_store = NULL;
251 if (s.IsCorruption()) 251 if (s.IsCorruption())
252 HandleBackingStoreCorruption(origin, error); 252 HandleBackingStoreCorruption(origin, error);
253 return; 253 return;
254 } 254 }
255 if (!ContainsValue(names, name)) { 255 if (!base::ContainsValue(names, name)) {
256 const int64_t version = 0; 256 const int64_t version = 0;
257 callbacks->OnSuccess(version); 257 callbacks->OnSuccess(version);
258 backing_store = NULL; 258 backing_store = NULL;
259 ReleaseBackingStore(origin, false /* immediate */); 259 ReleaseBackingStore(origin, false /* immediate */);
260 return; 260 return;
261 } 261 }
262 262
263 scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( 263 scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create(
264 name, backing_store.get(), this, unique_identifier, &s); 264 name, backing_store.get(), this, unique_identifier, &s);
265 if (!database.get()) { 265 if (!database.get()) {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 size_t count(0); 474 size_t count(0);
475 475
476 OriginDBs range = GetOpenDatabasesForOrigin(origin); 476 OriginDBs range = GetOpenDatabasesForOrigin(origin);
477 for (OriginDBMapIterator it = range.first; it != range.second; ++it) 477 for (OriginDBMapIterator it = range.first; it != range.second; ++it)
478 count += it->second->ConnectionCount(); 478 count += it->second->ConnectionCount();
479 479
480 return count; 480 return count;
481 } 481 }
482 482
483 } // namespace content 483 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698