OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 return 0; | 334 return 0; |
335 } | 335 } |
336 | 336 |
337 } // namespace | 337 } // namespace |
338 | 338 |
339 void SQLiteFileSystem::RegisterSQLiteVFS() { | 339 void SQLiteFileSystem::RegisterSQLiteVFS() { |
340 sqlite3_vfs* wrapped_vfs = sqlite3_vfs_find("unix"); | 340 sqlite3_vfs* wrapped_vfs = sqlite3_vfs_find("unix"); |
341 | 341 |
342 // These are implemented by delegating to |wrappedVfs|. | 342 // These are implemented by delegating to |wrappedVfs|. |
343 // TODO(shess): Implement local versions. | 343 // TODO(shess): Implement local versions. |
344 ASSERT(wrapped_vfs->xRandomness); | 344 DCHECK(wrapped_vfs->xRandomness); |
345 ASSERT(wrapped_vfs->xSleep); | 345 DCHECK(wrapped_vfs->xSleep); |
346 ASSERT(wrapped_vfs->xCurrentTime); | 346 DCHECK(wrapped_vfs->xCurrentTime); |
347 | 347 |
348 static sqlite3_vfs chromium_vfs = {1, | 348 static sqlite3_vfs chromium_vfs = {1, |
349 sizeof(chromiumVfsFile), | 349 sizeof(chromiumVfsFile), |
350 wrapped_vfs->mxPathname, | 350 wrapped_vfs->mxPathname, |
351 0, | 351 0, |
352 "chromium_vfs", | 352 "chromium_vfs", |
353 wrapped_vfs, | 353 wrapped_vfs, |
354 ChromiumOpen, | 354 ChromiumOpen, |
355 ChromiumDelete, | 355 ChromiumDelete, |
356 ChromiumAccess, | 356 ChromiumAccess, |
357 ChromiumFullPathname, | 357 ChromiumFullPathname, |
358 ChromiumDlOpen, | 358 ChromiumDlOpen, |
359 ChromiumDlError, | 359 ChromiumDlError, |
360 ChromiumDlSym, | 360 ChromiumDlSym, |
361 ChromiumDlClose, | 361 ChromiumDlClose, |
362 ChromiumRandomness, | 362 ChromiumRandomness, |
363 ChromiumSleep, | 363 ChromiumSleep, |
364 ChromiumCurrentTime, | 364 ChromiumCurrentTime, |
365 ChromiumGetLastError}; | 365 ChromiumGetLastError}; |
366 sqlite3_vfs_register(&chromium_vfs, 0); | 366 sqlite3_vfs_register(&chromium_vfs, 0); |
367 } | 367 } |
368 | 368 |
369 } // namespace blink | 369 } // namespace blink |
OLD | NEW |