OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 ExceptionCode DatabaseManager::exceptionCodeForDatabaseError(DatabaseError error
) | 159 ExceptionCode DatabaseManager::exceptionCodeForDatabaseError(DatabaseError error
) |
160 { | 160 { |
161 switch (error) { | 161 switch (error) { |
162 case DatabaseError::None: | 162 case DatabaseError::None: |
163 return 0; | 163 return 0; |
164 case DatabaseError::DatabaseIsBeingDeleted: | 164 case DatabaseError::DatabaseIsBeingDeleted: |
165 case DatabaseError::DatabaseSizeExceededQuota: | 165 case DatabaseError::DatabaseSizeExceededQuota: |
166 case DatabaseError::DatabaseSizeOverflowed: | 166 case DatabaseError::DatabaseSizeOverflowed: |
167 case DatabaseError::GenericSecurityError: | 167 case DatabaseError::GenericSecurityError: |
168 return SECURITY_ERR; | 168 return SecurityError; |
169 case DatabaseError::InvalidDatabaseState: | 169 case DatabaseError::InvalidDatabaseState: |
170 return INVALID_STATE_ERR; | 170 return InvalidStateError; |
171 } | 171 } |
172 ASSERT_NOT_REACHED(); | 172 ASSERT_NOT_REACHED(); |
173 return 0; // Make some older compilers happy. | 173 return 0; // Make some older compilers happy. |
174 } | 174 } |
175 | 175 |
176 static void logOpenDatabaseError(ScriptExecutionContext* context, const String&
name) | 176 static void logOpenDatabaseError(ScriptExecutionContext* context, const String&
name) |
177 { | 177 { |
178 UNUSED_PARAM(context); | 178 UNUSED_PARAM(context); |
179 UNUSED_PARAM(name); | 179 UNUSED_PARAM(name); |
180 LOG(StorageAPI, "Database %s for origin %s not allowed to be established", n
ame.ascii().data(), | 180 LOG(StorageAPI, "Database %s for origin %s not allowed to be established", n
ame.ascii().data(), |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 if (databaseContext) | 302 if (databaseContext) |
303 m_server->interruptAllDatabasesForContext(databaseContext->backend().get
()); | 303 m_server->interruptAllDatabasesForContext(databaseContext->backend().get
()); |
304 } | 304 } |
305 | 305 |
306 void DatabaseManager::logErrorMessage(ScriptExecutionContext* context, const Str
ing& message) | 306 void DatabaseManager::logErrorMessage(ScriptExecutionContext* context, const Str
ing& message) |
307 { | 307 { |
308 context->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message)
; | 308 context->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message)
; |
309 } | 309 } |
310 | 310 |
311 } // namespace WebCore | 311 } // namespace WebCore |
OLD | NEW |