OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef SQL_CONNECTION_H_ | 5 #ifndef SQL_CONNECTION_H_ |
6 #define SQL_CONNECTION_H_ | 6 #define SQL_CONNECTION_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <map> | 10 #include <map> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 #include "sql/sql_export.h" | 23 #include "sql/sql_export.h" |
24 | 24 |
25 struct sqlite3; | 25 struct sqlite3; |
26 struct sqlite3_stmt; | 26 struct sqlite3_stmt; |
27 | 27 |
28 namespace base { | 28 namespace base { |
29 class FilePath; | 29 class FilePath; |
30 class HistogramBase; | 30 class HistogramBase; |
31 namespace trace_event { | 31 namespace trace_event { |
32 class MemoryAllocatorDump; | 32 class ProcessMemoryDump; |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 namespace sql { | 36 namespace sql { |
37 | 37 |
38 class ConnectionMemoryDumpProvider; | 38 class ConnectionMemoryDumpProvider; |
39 class Recovery; | 39 class Recovery; |
40 class Statement; | 40 class Statement; |
41 | 41 |
42 // To allow some test classes to be friended. | 42 // To allow some test classes to be friended. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 // Runs "PRAGMA quick_check" and, unlike the FullIntegrityCheck method, | 248 // Runs "PRAGMA quick_check" and, unlike the FullIntegrityCheck method, |
249 // interprets the results returning true if the the statement executes | 249 // interprets the results returning true if the the statement executes |
250 // without error and results in a single "ok" value. | 250 // without error and results in a single "ok" value. |
251 bool QuickIntegrityCheck() WARN_UNUSED_RESULT; | 251 bool QuickIntegrityCheck() WARN_UNUSED_RESULT; |
252 | 252 |
253 // Meant to be called from a client error callback so that it's able to | 253 // Meant to be called from a client error callback so that it's able to |
254 // get diagnostic information about the database. | 254 // get diagnostic information about the database. |
255 std::string GetDiagnosticInfo(int extended_error, Statement* statement); | 255 std::string GetDiagnosticInfo(int extended_error, Statement* statement); |
256 | 256 |
257 // Reports memory usage into provided memory dump. | 257 // Reports memory usage into provided memory dump with the given name. |
258 bool ReportMemoryUsage(base::trace_event::MemoryAllocatorDump* mad); | 258 bool ReportMemoryUsage(base::trace_event::ProcessMemoryDump* pmd, |
| 259 const std::string& dump_name); |
259 | 260 |
260 // Initialization ------------------------------------------------------------ | 261 // Initialization ------------------------------------------------------------ |
261 | 262 |
262 // Initializes the SQL connection for the given file, returning true if the | 263 // Initializes the SQL connection for the given file, returning true if the |
263 // file could be opened. You can call this or OpenInMemory. | 264 // file could be opened. You can call this or OpenInMemory. |
264 bool Open(const base::FilePath& path) WARN_UNUSED_RESULT; | 265 bool Open(const base::FilePath& path) WARN_UNUSED_RESULT; |
265 | 266 |
266 // Initializes the SQL connection for a temporary in-memory database. There | 267 // Initializes the SQL connection for a temporary in-memory database. There |
267 // will be no associated file on disk, and the initial database will be | 268 // will be no associated file on disk, and the initial database will be |
268 // empty. You can call this or Open. | 269 // empty. You can call this or Open. |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 | 825 |
825 // Stores the dump provider object when db is open. | 826 // Stores the dump provider object when db is open. |
826 std::unique_ptr<ConnectionMemoryDumpProvider> memory_dump_provider_; | 827 std::unique_ptr<ConnectionMemoryDumpProvider> memory_dump_provider_; |
827 | 828 |
828 DISALLOW_COPY_AND_ASSIGN(Connection); | 829 DISALLOW_COPY_AND_ASSIGN(Connection); |
829 }; | 830 }; |
830 | 831 |
831 } // namespace sql | 832 } // namespace sql |
832 | 833 |
833 #endif // SQL_CONNECTION_H_ | 834 #endif // SQL_CONNECTION_H_ |
OLD | NEW |