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

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

Issue 240003011: Add blob-writing functionality [as yet un-called] to IDB's backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned branch Created 6 years, 7 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 | Annotate | Revision Log
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.h" 5 #include "content/browser/indexed_db/indexed_db_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/indexed_db/indexed_db_backing_store.h" 10 #include "content/browser/indexed_db/indexed_db_backing_store.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 scoped_refptr<IndexedDBBackingStore> backing_store; 335 scoped_refptr<IndexedDBBackingStore> backing_store;
336 if (open_in_memory) { 336 if (open_in_memory) {
337 backing_store = 337 backing_store =
338 IndexedDBBackingStore::OpenInMemory(origin_url, context_->TaskRunner()); 338 IndexedDBBackingStore::OpenInMemory(origin_url, context_->TaskRunner());
339 } else { 339 } else {
340 backing_store = IndexedDBBackingStore::Open(this, 340 backing_store = IndexedDBBackingStore::Open(this,
341 origin_url, 341 origin_url,
342 data_directory, 342 data_directory,
343 request_context,
343 data_loss, 344 data_loss,
344 data_loss_message, 345 data_loss_message,
345 disk_full, 346 disk_full,
346 context_->TaskRunner()); 347 context_->TaskRunner());
347 } 348 }
348 349
349 if (backing_store.get()) { 350 if (backing_store.get()) {
350 backing_store_map_[origin_url] = backing_store; 351 backing_store_map_[origin_url] = backing_store;
351 // If an in-memory database, bind lifetime to this factory instance. 352 // If an in-memory database, bind lifetime to this factory instance.
352 if (open_in_memory) 353 if (open_in_memory)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 444
444 std::pair<OriginDBMapIterator, OriginDBMapIterator> range = 445 std::pair<OriginDBMapIterator, OriginDBMapIterator> range =
445 GetOpenDatabasesForOrigin(origin_url); 446 GetOpenDatabasesForOrigin(origin_url);
446 for (OriginDBMapIterator it = range.first; it != range.second; ++it) 447 for (OriginDBMapIterator it = range.first; it != range.second; ++it)
447 count += it->second->ConnectionCount(); 448 count += it->second->ConnectionCount();
448 449
449 return count; 450 return count;
450 } 451 }
451 452
452 } // namespace content 453 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698