Chromium Code Reviews| Index: sql/connection.h |
| diff --git a/sql/connection.h b/sql/connection.h |
| index 19592d9f0e44ed68764b9d25a88d9a65424ba9b7..a79fe56bedc923dc5758bb9e49eb27a9e70263e0 100644 |
| --- a/sql/connection.h |
| +++ b/sql/connection.h |
| @@ -18,6 +18,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/threading/thread_restrictions.h" |
| #include "base/time/time.h" |
| +#include "base/trace_event/memory_dump_provider.h" |
| #include "sql/sql_export.h" |
| struct sqlite3; |
| @@ -102,7 +103,7 @@ class SQL_EXPORT TimeSource { |
| DISALLOW_COPY_AND_ASSIGN(TimeSource); |
| }; |
| -class SQL_EXPORT Connection { |
| +class SQL_EXPORT Connection : public base::trace_event::MemoryDumpProvider { |
| private: |
|
Primiano Tucci (use gerrit)
2015/09/30 10:26:56
Just to have a rough idea, how many connections ca
ssid
2015/10/02 17:06:10
It is usually less than 2 dozens.
|
| class StatementRef; // Forward declaration, see real one below. |
| @@ -110,7 +111,7 @@ class SQL_EXPORT Connection { |
| // The database is opened by calling Open[InMemory](). Any uncommitted |
| // transactions will be rolled back when this object is deleted. |
| Connection(); |
| - ~Connection(); |
| + ~Connection() override; |
| // Pre-init configuration ---------------------------------------------------- |
| @@ -461,6 +462,11 @@ class SQL_EXPORT Connection { |
| // tests. |
| static bool ShouldIgnoreSqliteError(int error); |
| + // base::trace_event::MemoryDumpProvider implementation. |
| + bool OnMemoryDump( |
| + const base::trace_event::MemoryDumpArgs& args, |
| + base::trace_event::ProcessMemoryDump* process_memory_dump) override; |
| + |
| private: |
| // For recovery module. |
| friend class Recovery; |