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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc

Issue 8743001: IndexedDB: Add support for IDBIndex multientry flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address style nits Created 9 years 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
« no previous file with comments | « no previous file | content/common/indexed_db_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/in_process_webkit/indexed_db_dispatcher_host.h" 5 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" 10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); 790 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
791 WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess( 791 WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
792 &map_, params.idb_object_store_id); 792 &map_, params.idb_object_store_id);
793 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( 793 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess(
794 &parent_->transaction_dispatcher_host_->map_, params.transaction_id); 794 &parent_->transaction_dispatcher_host_->map_, params.transaction_id);
795 if (!idb_object_store || !idb_transaction) 795 if (!idb_object_store || !idb_transaction)
796 return; 796 return;
797 797
798 *ec = 0; 798 *ec = 0;
799 WebIDBIndex* index = idb_object_store->createIndex( 799 WebIDBIndex* index = idb_object_store->createIndex(
800 params.name, params.key_path, params.unique, *idb_transaction, *ec); 800 params.name, params.key_path, params.unique, params.multi_entry,
801 *idb_transaction, *ec);
801 *index_id = *ec ? 0 : parent_->Add(index); 802 *index_id = *ec ? 0 : parent_->Add(index);
802 WebIDBObjectIDToURLMap* transaction_url_map = 803 WebIDBObjectIDToURLMap* transaction_url_map =
803 &parent_->transaction_dispatcher_host_->transaction_url_map_; 804 &parent_->transaction_dispatcher_host_->transaction_url_map_;
804 if (parent_->Context()->IsOverQuota( 805 if (parent_->Context()->IsOverQuota(
805 (*transaction_url_map)[params.transaction_id])) { 806 (*transaction_url_map)[params.transaction_id])) {
806 idb_transaction->abort(); 807 idb_transaction->abort();
807 } 808 }
808 } 809 }
809 810
810 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnIndex( 811 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnIndex(
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 } 1106 }
1106 idb_transaction->didCompleteTaskEvents(); 1107 idb_transaction->didCompleteTaskEvents();
1107 } 1108 }
1108 1109
1109 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( 1110 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed(
1110 int32 object_id) { 1111 int32 object_id) {
1111 transaction_size_map_.erase(object_id); 1112 transaction_size_map_.erase(object_id);
1112 transaction_url_map_.erase(object_id); 1113 transaction_url_map_.erase(object_id);
1113 parent_->DestroyObject(&map_, object_id); 1114 parent_->DestroyObject(&map_, object_id);
1114 } 1115 }
OLDNEW
« no previous file with comments | « no previous file | content/common/indexed_db_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698