| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 // running the following statement at a sqlite3 command-line: | 459 // running the following statement at a sqlite3 command-line: |
| 460 // SELECT type, name, tbl_name, sql FROM sqlite_master ORDER BY 1, 2, 3, 4; | 460 // SELECT type, name, tbl_name, sql FROM sqlite_master ORDER BY 1, 2, 3, 4; |
| 461 std::string GetSchema() const; | 461 std::string GetSchema() const; |
| 462 | 462 |
| 463 // Clients which provide an error_callback don't see the | 463 // Clients which provide an error_callback don't see the |
| 464 // error-handling at the end of OnSqliteError(). Expose to allow | 464 // error-handling at the end of OnSqliteError(). Expose to allow |
| 465 // those clients to work appropriately with ScopedErrorIgnorer in | 465 // those clients to work appropriately with ScopedErrorIgnorer in |
| 466 // tests. | 466 // tests. |
| 467 static bool ShouldIgnoreSqliteError(int error); | 467 static bool ShouldIgnoreSqliteError(int error); |
| 468 | 468 |
| 469 // Additionally ignores errors which are unlikely to be caused by problems |
| 470 // with the syntax of a SQL statement, or problems with the database schema. |
| 471 static bool ShouldIgnoreSqliteCompileError(int error); |
| 472 |
| 469 // base::trace_event::MemoryDumpProvider implementation. | 473 // base::trace_event::MemoryDumpProvider implementation. |
| 470 bool OnMemoryDump( | 474 bool OnMemoryDump( |
| 471 const base::trace_event::MemoryDumpArgs& args, | 475 const base::trace_event::MemoryDumpArgs& args, |
| 472 base::trace_event::ProcessMemoryDump* process_memory_dump) override; | 476 base::trace_event::ProcessMemoryDump* process_memory_dump) override; |
| 473 | 477 |
| 474 // Collect various diagnostic information and post a crash dump to aid | 478 // Collect various diagnostic information and post a crash dump to aid |
| 475 // debugging. Dump rate per database is limited to prevent overwhelming the | 479 // debugging. Dump rate per database is limited to prevent overwhelming the |
| 476 // crash server. | 480 // crash server. |
| 477 void ReportDiagnosticInfo(int extended_error, Statement* stmt); | 481 void ReportDiagnosticInfo(int extended_error, Statement* stmt); |
| 478 | 482 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 // Source for timing information, provided to allow tests to inject time | 769 // Source for timing information, provided to allow tests to inject time |
| 766 // changes. | 770 // changes. |
| 767 scoped_ptr<TimeSource> clock_; | 771 scoped_ptr<TimeSource> clock_; |
| 768 | 772 |
| 769 DISALLOW_COPY_AND_ASSIGN(Connection); | 773 DISALLOW_COPY_AND_ASSIGN(Connection); |
| 770 }; | 774 }; |
| 771 | 775 |
| 772 } // namespace sql | 776 } // namespace sql |
| 773 | 777 |
| 774 #endif // SQL_CONNECTION_H_ | 778 #endif // SQL_CONNECTION_H_ |
| OLD | NEW |