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

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: Fixes. 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
« no previous file with comments | « sql/BUILD.gn ('k') | sql/connection.cc » ('j') | sql/connection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
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;
« no previous file with comments | « sql/BUILD.gn ('k') | sql/connection.cc » ('j') | sql/connection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698