| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); | 147 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); |
| 148 return wrappedVfs->xSleep(wrappedVfs, microseconds); | 148 return wrappedVfs->xSleep(wrappedVfs, microseconds); |
| 149 } | 149 } |
| 150 | 150 |
| 151 int chromiumCurrentTime(sqlite3_vfs* vfs, double* prNow) { | 151 int chromiumCurrentTime(sqlite3_vfs* vfs, double* prNow) { |
| 152 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); | 152 sqlite3_vfs* wrappedVfs = static_cast<sqlite3_vfs*>(vfs->pAppData); |
| 153 return wrappedVfs->xCurrentTime(wrappedVfs, prNow); | 153 return wrappedVfs->xCurrentTime(wrappedVfs, prNow); |
| 154 } | 154 } |
| 155 | 155 |
| 156 int chromiumGetLastError(sqlite3_vfs* vfs, int e, char* s) { | 156 int chromiumGetLastError(sqlite3_vfs* vfs, int e, char* s) { |
| 157 // xGetLastError() has never been used by SQLite. The implementation in os_wi
n.c indicates this is a reasonable implementation. | 157 // xGetLastError() has never been used by SQLite. The implementation in |
| 158 // os_win.c indicates this is a reasonable implementation. |
| 158 *s = '\0'; | 159 *s = '\0'; |
| 159 return 0; | 160 return 0; |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace | 163 } // namespace |
| 163 | 164 |
| 164 void SQLiteFileSystem::registerSQLiteVFS() { | 165 void SQLiteFileSystem::registerSQLiteVFS() { |
| 165 sqlite3_vfs* wrappedVfs = sqlite3_vfs_find("win32"); | 166 sqlite3_vfs* wrappedVfs = sqlite3_vfs_find("win32"); |
| 166 | 167 |
| 167 // These are implemented by delegating to |wrappedVfs|. | 168 // These are implemented by delegating to |wrappedVfs|. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 185 chromiumDlSym, | 186 chromiumDlSym, |
| 186 chromiumDlClose, | 187 chromiumDlClose, |
| 187 chromiumRandomness, | 188 chromiumRandomness, |
| 188 chromiumSleep, | 189 chromiumSleep, |
| 189 chromiumCurrentTime, | 190 chromiumCurrentTime, |
| 190 chromiumGetLastError}; | 191 chromiumGetLastError}; |
| 191 sqlite3_vfs_register(&chromium_vfs, 0); | 192 sqlite3_vfs_register(&chromium_vfs, 0); |
| 192 } | 193 } |
| 193 | 194 |
| 194 } // namespace blink | 195 } // namespace blink |
| OLD | NEW |