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

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: rename multientry->multiEntry 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
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.multiEntry,
jam 2011/12/02 20:36:04 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 } 1078 }
1078 idb_transaction->didCompleteTaskEvents(); 1079 idb_transaction->didCompleteTaskEvents();
1079 } 1080 }
1080 1081
1081 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( 1082 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed(
1082 int32 object_id) { 1083 int32 object_id) {
1083 transaction_size_map_.erase(object_id); 1084 transaction_size_map_.erase(object_id);
1084 transaction_url_map_.erase(object_id); 1085 transaction_url_map_.erase(object_id);
1085 parent_->DestroyObject(&map_, object_id); 1086 parent_->DestroyObject(&map_, object_id);
1086 } 1087 }
OLDNEW
« no previous file with comments | « no previous file | content/common/indexed_db_messages.h » ('j') | content/common/indexed_db_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698