| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase) | 186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase) |
| 187 : EventListener(EventListener::CPPEventListenerType) | 187 : EventListener(EventListener::CPPEventListenerType) |
| 188 , m_executableWithDatabase(executableWithDatabase) { } | 188 , m_executableWithDatabase(executableWithDatabase) { } |
| 189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase; | 189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 void ExecutableWithDatabase::start(IDBFactory* idbFactory, SecurityOrigin*, cons
t String& databaseName) | 192 void ExecutableWithDatabase::start(IDBFactory* idbFactory, SecurityOrigin*, cons
t String& databaseName) |
| 193 { | 193 { |
| 194 RefPtr<OpenDatabaseCallback> callback = OpenDatabaseCallback::create(this); | 194 RefPtr<OpenDatabaseCallback> callback = OpenDatabaseCallback::create(this); |
| 195 TrackExceptionState exceptionState; | 195 TrackExceptionState exceptionState; |
| 196 IDBOpenDBRequest* idbOpenDBRequest = idbFactory->open(scriptState(), databas
eName, exceptionState); | 196 IDBOpenDBRequest* idbOpenDBRequest = idbFactory->open(scriptState(), databas
eName, makeOptional(IDBDatabaseMetadata::NoIntVersion), exceptionState); |
| 197 if (exceptionState.hadException()) { | 197 if (exceptionState.hadException()) { |
| 198 requestCallback()->sendFailure("Could not open database."); | 198 requestCallback()->sendFailure("Could not open database."); |
| 199 return; | 199 return; |
| 200 } | 200 } |
| 201 idbOpenDBRequest->addEventListener(EventTypeNames::success, callback, false)
; | 201 idbOpenDBRequest->addEventListener(EventTypeNames::success, callback, false)
; |
| 202 } | 202 } |
| 203 | 203 |
| 204 static IDBTransaction* transactionForDatabase(ExecutionContext* executionContext
, IDBDatabase* idbDatabase, const String& objectStoreName, const String& mode =
IndexedDBNames::readonly) | 204 static IDBTransaction* transactionForDatabase(ExecutionContext* executionContext
, IDBDatabase* idbDatabase, const String& objectStoreName, const String& mode =
IndexedDBNames::readonly) |
| 205 { | 205 { |
| 206 TrackExceptionState exceptionState; | 206 TrackExceptionState exceptionState; |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 775 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
| 776 } | 776 } |
| 777 | 777 |
| 778 void InspectorIndexedDBAgent::trace(Visitor* visitor) | 778 void InspectorIndexedDBAgent::trace(Visitor* visitor) |
| 779 { | 779 { |
| 780 visitor->trace(m_page); | 780 visitor->trace(m_page); |
| 781 InspectorBaseAgent::trace(visitor); | 781 InspectorBaseAgent::trace(visitor); |
| 782 } | 782 } |
| 783 | 783 |
| 784 } // namespace blink | 784 } // namespace blink |
| OLD | NEW |