Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: sql/connection.h

Issue 1327063002: [tracing] Add sqlite memory statistics to tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index d456b6cd88c9627b488c970dcd46de4a72c7945a..7d2ab6a355bfc9d448f4f58fd18480b2e3d1d722 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:
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 ----------------------------------------------------
@@ -464,6 +465,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;

Powered by Google App Engine
This is Rietveld 408576698