| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2013 Apple 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 PassRefPtrWillBeRawPtr<Database> Database::create(ExecutionContext*, PassRefPtrW
illBeRawPtr<DatabaseBackendBase> backend) | 60 PassRefPtrWillBeRawPtr<Database> Database::create(ExecutionContext*, PassRefPtrW
illBeRawPtr<DatabaseBackendBase> backend) |
| 61 { | 61 { |
| 62 // FIXME: Currently, we're only simulating the backend by return the | 62 // FIXME: Currently, we're only simulating the backend by return the |
| 63 // frontend database as its own the backend. When we split the 2 apart, | 63 // frontend database as its own the backend. When we split the 2 apart, |
| 64 // this create() function should be changed to be a factory method for | 64 // this create() function should be changed to be a factory method for |
| 65 // instantiating the backend. | 65 // instantiating the backend. |
| 66 return static_cast<Database*>(backend.get()); | 66 return static_cast<Database*>(backend.get()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 Database::Database(PassRefPtr<DatabaseContext> databaseContext, | 69 Database::Database(DatabaseContext* databaseContext, |
| 70 const String& name, const String& expectedVersion, const String& displayName
, unsigned long estimatedSize) | 70 const String& name, const String& expectedVersion, const String& displayName
, unsigned long estimatedSize) |
| 71 : DatabaseBackend(databaseContext.get(), name, expectedVersion, displayName,
estimatedSize) | 71 : DatabaseBackend(databaseContext, name, expectedVersion, displayName, estim
atedSize) |
| 72 , DatabaseBase(databaseContext->executionContext()) | 72 , DatabaseBase(databaseContext->executionContext()) |
| 73 , m_databaseContext(DatabaseBackend::databaseContext()) | 73 , m_databaseContext(DatabaseBackend::databaseContext()) |
| 74 { | 74 { |
| 75 ScriptWrappable::init(this); | 75 ScriptWrappable::init(this); |
| 76 m_databaseThreadSecurityOrigin = m_contextThreadSecurityOrigin->isolatedCopy
(); | 76 m_databaseThreadSecurityOrigin = m_contextThreadSecurityOrigin->isolatedCopy
(); |
| 77 setFrontend(this); | 77 setFrontend(this); |
| 78 | 78 |
| 79 ASSERT(m_databaseContext->databaseThread()); | 79 ASSERT(m_databaseContext->databaseThread()); |
| 80 } | 80 } |
| 81 | 81 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr
rorCode); | 243 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr
rorCode); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode,
int sqliteErrorCode) | 246 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode,
int sqliteErrorCode) |
| 247 { | 247 { |
| 248 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE
rrorCode); | 248 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE
rrorCode); |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 } // namespace WebCore | 252 } // namespace WebCore |
| OLD | NEW |