| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 void IDBFactoryBackendProxy::getDatabaseNames(PassRefPtr<IDBCallbacks> prpCallba
cks, const String& databaseIdentifier, ScriptExecutionContext* context, const St
ring& dataDir) | 190 void IDBFactoryBackendProxy::getDatabaseNames(PassRefPtr<IDBCallbacks> prpCallba
cks, const String& databaseIdentifier, ScriptExecutionContext* context, const St
ring& dataDir) |
| 191 { | 191 { |
| 192 RefPtr<IDBCallbacks> callbacks(prpCallbacks); | 192 RefPtr<IDBCallbacks> callbacks(prpCallbacks); |
| 193 WebSecurityOrigin origin(context->securityOrigin()); | 193 WebSecurityOrigin origin(context->securityOrigin()); |
| 194 if (!allowIndexedDB(context, "Database Listing", origin, callbacks)) | 194 if (!allowIndexedDB(context, "Database Listing", origin, callbacks)) |
| 195 return; | 195 return; |
| 196 | 196 |
| 197 m_webIDBFactory->getDatabaseNames(new WebIDBCallbacksImpl(callbacks), databa
seIdentifier, dataDir); | 197 m_webIDBFactory->getDatabaseNames(new WebIDBCallbacksImpl(callbacks), databa
seIdentifier, dataDir); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void IDBFactoryBackendProxy::open(const String& name, int64_t version, int64_t t
ransactionId, PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallb
acks> prpDatabaseCallbacks, const String& databaseIdentifier, ScriptExecutionCon
text* context, const String& dataDir) | 200 void IDBFactoryBackendProxy::open(const String& name, int64_t version, int64_t t
ransactionId, PassRefPtr<IDBCallbacks> prpCallbacks, IDBDatabaseCallbacks* datab
aseCallbacks, const String& databaseIdentifier, ScriptExecutionContext* context,
const String& dataDir) |
| 201 { | 201 { |
| 202 RefPtr<IDBCallbacks> callbacks(prpCallbacks); | 202 RefPtr<IDBCallbacks> callbacks(prpCallbacks); |
| 203 RefPtr<IDBDatabaseCallbacks> databaseCallbacks(prpDatabaseCallbacks); | |
| 204 WebSecurityOrigin origin(context->securityOrigin()); | 203 WebSecurityOrigin origin(context->securityOrigin()); |
| 205 if (!allowIndexedDB(context, name, origin, callbacks)) | 204 if (!allowIndexedDB(context, name, origin, callbacks)) |
| 206 return; | 205 return; |
| 207 | 206 |
| 208 m_webIDBFactory->open(name, version, transactionId, new WebIDBCallbacksImpl(
callbacks), new WebIDBDatabaseCallbacksImpl(databaseCallbacks), databaseIdentifi
er, dataDir); | 207 m_webIDBFactory->open(name, version, transactionId, new WebIDBCallbacksImpl(
callbacks), new WebIDBDatabaseCallbacksImpl(databaseCallbacks), databaseIdentifi
er, dataDir); |
| 209 } | 208 } |
| 210 | 209 |
| 211 void IDBFactoryBackendProxy::deleteDatabase(const String& name, PassRefPtr<IDBCa
llbacks> prpCallbacks, const String& databaseIdentifier, ScriptExecutionContext*
context, const String& dataDir) | 210 void IDBFactoryBackendProxy::deleteDatabase(const String& name, PassRefPtr<IDBCa
llbacks> prpCallbacks, const String& databaseIdentifier, ScriptExecutionContext*
context, const String& dataDir) |
| 212 { | 211 { |
| 213 RefPtr<IDBCallbacks> callbacks(prpCallbacks); | 212 RefPtr<IDBCallbacks> callbacks(prpCallbacks); |
| 214 WebSecurityOrigin origin(context->securityOrigin()); | 213 WebSecurityOrigin origin(context->securityOrigin()); |
| 215 if (!allowIndexedDB(context, name, origin, callbacks)) | 214 if (!allowIndexedDB(context, name, origin, callbacks)) |
| 216 return; | 215 return; |
| 217 | 216 |
| 218 m_webIDBFactory->deleteDatabase(name, new WebIDBCallbacksImpl(callbacks), da
tabaseIdentifier, dataDir); | 217 m_webIDBFactory->deleteDatabase(name, new WebIDBCallbacksImpl(callbacks), da
tabaseIdentifier, dataDir); |
| 219 } | 218 } |
| 220 | 219 |
| 221 } // namespace WebKit | 220 } // namespace WebKit |
| OLD | NEW |