| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return 0; | 161 return 0; |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace | 164 } // namespace |
| 165 | 165 |
| 166 void SQLiteFileSystem::RegisterSQLiteVFS() { | 166 void SQLiteFileSystem::RegisterSQLiteVFS() { |
| 167 sqlite3_vfs* wrapped_vfs = sqlite3_vfs_find("win32"); | 167 sqlite3_vfs* wrapped_vfs = sqlite3_vfs_find("win32"); |
| 168 | 168 |
| 169 // These are implemented by delegating to |wrappedVfs|. | 169 // These are implemented by delegating to |wrappedVfs|. |
| 170 // TODO(shess): Implement local versions. | 170 // TODO(shess): Implement local versions. |
| 171 ASSERT(wrapped_vfs->xRandomness); | 171 DCHECK(wrapped_vfs->xRandomness); |
| 172 ASSERT(wrapped_vfs->xSleep); | 172 DCHECK(wrapped_vfs->xSleep); |
| 173 ASSERT(wrapped_vfs->xCurrentTime); | 173 DCHECK(wrapped_vfs->xCurrentTime); |
| 174 | 174 |
| 175 static sqlite3_vfs chromium_vfs = {1, | 175 static sqlite3_vfs chromium_vfs = {1, |
| 176 wrapped_vfs->szOsFile, | 176 wrapped_vfs->szOsFile, |
| 177 wrapped_vfs->mxPathname, | 177 wrapped_vfs->mxPathname, |
| 178 0, | 178 0, |
| 179 "chromium_vfs", | 179 "chromium_vfs", |
| 180 wrapped_vfs, | 180 wrapped_vfs, |
| 181 ChromiumOpen, | 181 ChromiumOpen, |
| 182 ChromiumDelete, | 182 ChromiumDelete, |
| 183 ChromiumAccess, | 183 ChromiumAccess, |
| 184 ChromiumFullPathname, | 184 ChromiumFullPathname, |
| 185 ChromiumDlOpen, | 185 ChromiumDlOpen, |
| 186 ChromiumDlError, | 186 ChromiumDlError, |
| 187 ChromiumDlSym, | 187 ChromiumDlSym, |
| 188 ChromiumDlClose, | 188 ChromiumDlClose, |
| 189 ChromiumRandomness, | 189 ChromiumRandomness, |
| 190 ChromiumSleep, | 190 ChromiumSleep, |
| 191 ChromiumCurrentTime, | 191 ChromiumCurrentTime, |
| 192 ChromiumGetLastError}; | 192 ChromiumGetLastError}; |
| 193 sqlite3_vfs_register(&chromium_vfs, 0); | 193 sqlite3_vfs_register(&chromium_vfs, 0); |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace blink | 196 } // namespace blink |
| OLD | NEW |