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

Side by Side Diff: Source/modules/indexeddb/IDBObjectStore.cpp

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 Persistent<IDBDatabase> m_database; 400 Persistent<IDBDatabase> m_database;
401 const int64_t m_transactionId; 401 const int64_t m_transactionId;
402 const int64_t m_objectStoreId; 402 const int64_t m_objectStoreId;
403 const IDBIndexMetadata m_indexMetadata; 403 const IDBIndexMetadata m_indexMetadata;
404 }; 404 };
405 } 405 }
406 406
407 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except ionState) 407 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except ionState)
408 { 408 {
409 bool unique = false; 409 bool unique = false;
410 DictionaryHelper::get(options, "unique", unique); 410 options.get("unique", unique);
411 411
412 bool multiEntry = false; 412 bool multiEntry = false;
413 DictionaryHelper::get(options, "multiEntry", multiEntry); 413 options.get("multiEntry", multiEntry);
414 414
415 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception State); 415 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception State);
416 } 416 }
417 417
418 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc eptionState) 418 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc eptionState)
419 { 419 {
420 IDB_TRACE("IDBObjectStore::createIndex"); 420 IDB_TRACE("IDBObjectStore::createIndex");
421 if (!m_transaction->isVersionChange()) { 421 if (!m_transaction->isVersionChange()) {
422 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers ionChangeTransactionErrorMessage); 422 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers ionChangeTransactionErrorMessage);
423 return 0; 423 return 0;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 } 682 }
683 return IDBIndexMetadata::InvalidId; 683 return IDBIndexMetadata::InvalidId;
684 } 684 }
685 685
686 WebIDBDatabase* IDBObjectStore::backendDB() const 686 WebIDBDatabase* IDBObjectStore::backendDB() const
687 { 687 {
688 return m_transaction->backendDB(); 688 return m_transaction->backendDB();
689 } 689 }
690 690
691 } // namespace blink 691 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | Source/modules/mediastream/MediaConstraintsImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698