OLD | NEW |
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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
47 #include "wtf/text/CString.h" | 47 #include "wtf/text/CString.h" |
48 | 48 |
49 namespace WebCore { | 49 namespace WebCore { |
50 | 50 |
51 PassRefPtrWillBeRawPtr<DatabaseSync> DatabaseSync::create(ExecutionContext*, Pas
sRefPtrWillBeRawPtr<DatabaseBackendBase> backend) | 51 PassRefPtrWillBeRawPtr<DatabaseSync> DatabaseSync::create(ExecutionContext*, Pas
sRefPtrWillBeRawPtr<DatabaseBackendBase> backend) |
52 { | 52 { |
53 return static_cast<DatabaseSync*>(backend.get()); | 53 return static_cast<DatabaseSync*>(backend.get()); |
54 } | 54 } |
55 | 55 |
56 DatabaseSync::DatabaseSync(PassRefPtr<DatabaseContext> databaseContext, | 56 DatabaseSync::DatabaseSync(DatabaseContext* databaseContext, |
57 const String& name, const String& expectedVersion, const String& displayName
, unsigned long estimatedSize) | 57 const String& name, const String& expectedVersion, const String& displayName
, unsigned long estimatedSize) |
58 : DatabaseBackendSync(databaseContext.get(), name, expectedVersion, displayN
ame, estimatedSize) | 58 : DatabaseBackendSync(databaseContext, name, expectedVersion, displayName, e
stimatedSize) |
59 , DatabaseBase(databaseContext->executionContext()) | 59 , DatabaseBase(databaseContext->executionContext()) |
60 { | 60 { |
61 ScriptWrappable::init(this); | 61 ScriptWrappable::init(this); |
62 setFrontend(this); | 62 setFrontend(this); |
63 } | 63 } |
64 | 64 |
65 DatabaseSync::~DatabaseSync() | 65 DatabaseSync::~DatabaseSync() |
66 { | 66 { |
67 if (executionContext()) | 67 if (executionContext()) |
68 ASSERT(executionContext()->isContextThread()); | 68 ASSERT(executionContext()->isContextThread()); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 | 203 |
204 #if ENABLE(OILPAN) | 204 #if ENABLE(OILPAN) |
205 DatabaseSync::TransactionObserver::~TransactionObserver() | 205 DatabaseSync::TransactionObserver::~TransactionObserver() |
206 { | 206 { |
207 m_transaction.rollbackIfInProgress(); | 207 m_transaction.rollbackIfInProgress(); |
208 } | 208 } |
209 #endif | 209 #endif |
210 | 210 |
211 } // namespace WebCore | 211 } // namespace WebCore |
OLD | NEW |