OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 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 |
11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual bool performOpenAndVerify(bool shouldSetVersionInNewDatabase, Except
ionCode& ec); | 97 virtual bool performOpenAndVerify(bool shouldSetVersionInNewDatabase, Except
ionCode& ec); |
98 | 98 |
99 bool getVersionFromDatabase(String& version, bool shouldCacheVersion = true)
; | 99 bool getVersionFromDatabase(String& version, bool shouldCacheVersion = true)
; |
100 bool setVersionInDatabase(const String& version, bool shouldCacheVersion = t
rue); | 100 bool setVersionInDatabase(const String& version, bool shouldCacheVersion = t
rue); |
101 void setExpectedVersion(const String&); | 101 void setExpectedVersion(const String&); |
102 const String& expectedVersion() const { return m_expectedVersion; } | 102 const String& expectedVersion() const { return m_expectedVersion; } |
103 String getCachedVersion()const; | 103 String getCachedVersion()const; |
104 void setCachedVersion(const String&); | 104 void setCachedVersion(const String&); |
105 bool getActualVersionForTransaction(String& version); | 105 bool getActualVersionForTransaction(String& version); |
106 | 106 |
107 static const String& databaseInfoTableName(); | 107 static const char* databaseInfoTableName(); |
108 | 108 |
109 RefPtr<ScriptExecutionContext> m_scriptExecutionContext; | 109 RefPtr<ScriptExecutionContext> m_scriptExecutionContext; |
110 RefPtr<SecurityOrigin> m_contextThreadSecurityOrigin; | 110 RefPtr<SecurityOrigin> m_contextThreadSecurityOrigin; |
111 | 111 |
112 String m_name; | 112 String m_name; |
113 String m_expectedVersion; | 113 String m_expectedVersion; |
114 String m_displayName; | 114 String m_displayName; |
115 unsigned long m_estimatedSize; | 115 unsigned long m_estimatedSize; |
116 String m_filename; | 116 String m_filename; |
117 | 117 |
118 #if !LOG_DISABLED | 118 #if !LOG_DISABLED |
119 String databaseDebugName() const { return m_contextThreadSecurityOrigin->toS
tring() + "::" + m_name; } | 119 String databaseDebugName() const { return m_contextThreadSecurityOrigin->toS
tring() + "::" + m_name; } |
120 #endif | 120 #endif |
121 | 121 |
122 private: | 122 private: |
123 static const String& databaseVersionKey(); | |
124 | |
125 int m_guid; | 123 int m_guid; |
126 bool m_opened; | 124 bool m_opened; |
127 bool m_new; | 125 bool m_new; |
128 | 126 |
129 SQLiteDatabase m_sqliteDatabase; | 127 SQLiteDatabase m_sqliteDatabase; |
130 | 128 |
131 RefPtr<DatabaseAuthorizer> m_databaseAuthorizer; | 129 RefPtr<DatabaseAuthorizer> m_databaseAuthorizer; |
132 }; | 130 }; |
133 | 131 |
134 } // namespace WebCore | 132 } // namespace WebCore |
135 | 133 |
136 #endif // ENABLE(DATABASE) | 134 #endif // ENABLE(DATABASE) |
137 | 135 |
138 #endif // AbstractDatabase_h | 136 #endif // AbstractDatabase_h |
OLD | NEW |