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

Side by Side Diff: sql/connection_memory_dump_provider.h

Issue 1434993002: [tracing] Add separate dump provider for sql connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: Fixes. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SQL_CONNECTION_MEMORY_DUMP_PROVIDER_H
6 #define SQL_CONNECTION_MEMORY_DUMP_PROVIDER_H
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/synchronization/lock.h"
12 #include "base/trace_event/memory_dump_provider.h"
13
14 struct sqlite3;
15
16 namespace sql {
17
18 class ConnectionMemoryDumpProvider
19 : public base::trace_event::MemoryDumpProvider {
20 public:
21 ConnectionMemoryDumpProvider(sqlite3* db, const std::string& name);
22 ~ConnectionMemoryDumpProvider() override;
23
24 void ResetDatabase();
25
26 // base::trace_event::MemoryDumpProvider implementation.
27 bool OnMemoryDump(
28 const base::trace_event::MemoryDumpArgs& args,
29 base::trace_event::ProcessMemoryDump* process_memory_dump) override;
30
31 private:
32 sqlite3* db_; // not owned.
33 base::Lock lock_;
34 std::string connection_name_;
35
36 DISALLOW_COPY_AND_ASSIGN(ConnectionMemoryDumpProvider);
37 };
38
39 } // namespace sql
40
41 #endif // SQL_CONNECTION_MEMORY_DUMP_PROVIDER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698