OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/utility/importer/edge_database_reader_win.h" | 5 #include "chrome/utility/importer/edge_database_reader_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
8 | 10 |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 namespace { | 13 namespace { |
12 | 14 |
13 // This is an arbitary size chosen for the database error message buffer. | 15 // This is an arbitary size chosen for the database error message buffer. |
14 const size_t kErrorMessageSize = 1024; | 16 const size_t kErrorMessageSize = 1024; |
15 // This is the page size of the Edge data. It's unlikely to change. | 17 // This is the page size of the Edge data. It's unlikely to change. |
16 const JET_API_PTR kEdgeDatabasePageSize = 8192; | 18 const JET_API_PTR kEdgeDatabasePageSize = 8192; |
17 // This is the code page value for a Unicode (UCS-2) column. | 19 // This is the code page value for a Unicode (UCS-2) column. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 return nullptr; | 250 return nullptr; |
249 } | 251 } |
250 | 252 |
251 if (!SetLastError(JetOpenTable(session_id_, db_id_, table_name.c_str(), | 253 if (!SetLastError(JetOpenTable(session_id_, db_id_, table_name.c_str(), |
252 nullptr, 0, JET_bitTableReadOnly, &table_id))) | 254 nullptr, 0, JET_bitTableReadOnly, &table_id))) |
253 return nullptr; | 255 return nullptr; |
254 | 256 |
255 return make_scoped_ptr( | 257 return make_scoped_ptr( |
256 new EdgeDatabaseTableEnumerator(table_name, session_id_, table_id)); | 258 new EdgeDatabaseTableEnumerator(table_name, session_id_, table_id)); |
257 } | 259 } |
OLD | NEW |