OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 return auth->dropVTable(parameter1, parameter2); | 356 return auth->dropVTable(parameter1, parameter2); |
357 case SQLITE_FUNCTION: | 357 case SQLITE_FUNCTION: |
358 return auth->allowFunction(parameter2); | 358 return auth->allowFunction(parameter2); |
359 #endif | 359 #endif |
360 default: | 360 default: |
361 ASSERT_NOT_REACHED(); | 361 ASSERT_NOT_REACHED(); |
362 return SQLAuthDeny; | 362 return SQLAuthDeny; |
363 } | 363 } |
364 } | 364 } |
365 | 365 |
366 void SQLiteDatabase::setAuthorizer(PassRefPtr<DatabaseAuthorizer> auth) | 366 void SQLiteDatabase::setAuthorizer(DatabaseAuthorizer* auth) |
367 { | 367 { |
368 if (!m_db) { | 368 if (!m_db) { |
369 WTF_LOG_ERROR("Attempt to set an authorizer on a non-open SQL database")
; | 369 WTF_LOG_ERROR("Attempt to set an authorizer on a non-open SQL database")
; |
370 ASSERT_NOT_REACHED(); | 370 ASSERT_NOT_REACHED(); |
371 return; | 371 return; |
372 } | 372 } |
373 | 373 |
374 MutexLocker locker(m_authorizerLock); | 374 MutexLocker locker(m_authorizerLock); |
375 | 375 |
376 m_authorizer = auth; | 376 m_authorizer = auth; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 default: | 415 default: |
416 if (!executeCommand("PRAGMA auto_vacuum = 2")) | 416 if (!executeCommand("PRAGMA auto_vacuum = 2")) |
417 return false; | 417 return false; |
418 runVacuumCommand(); | 418 runVacuumCommand(); |
419 error = lastError(); | 419 error = lastError(); |
420 return (error == SQLITE_OK); | 420 return (error == SQLITE_OK); |
421 } | 421 } |
422 } | 422 } |
423 | 423 |
424 } // namespace WebCore | 424 } // namespace WebCore |
OLD | NEW |