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 #include "sql/connection.h" | 5 #include "sql/connection.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 mmap_disabled_(false), | 348 mmap_disabled_(false), |
349 mmap_enabled_(false), | 349 mmap_enabled_(false), |
350 total_changes_at_last_release_(0), | 350 total_changes_at_last_release_(0), |
351 stats_histogram_(NULL), | 351 stats_histogram_(NULL), |
352 commit_time_histogram_(NULL), | 352 commit_time_histogram_(NULL), |
353 autocommit_time_histogram_(NULL), | 353 autocommit_time_histogram_(NULL), |
354 update_time_histogram_(NULL), | 354 update_time_histogram_(NULL), |
355 query_time_histogram_(NULL), | 355 query_time_histogram_(NULL), |
356 clock_(new TimeSource()) { | 356 clock_(new TimeSource()) { |
357 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 357 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
358 this); | 358 this, "sql::Connection", nullptr); |
359 } | 359 } |
360 | 360 |
361 Connection::~Connection() { | 361 Connection::~Connection() { |
362 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( | 362 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
363 this); | 363 this); |
364 Close(); | 364 Close(); |
365 } | 365 } |
366 | 366 |
367 void Connection::RecordEvent(Events event, size_t count) { | 367 void Connection::RecordEvent(Events event, size_t count) { |
368 for (size_t i = 0; i < count; ++i) { | 368 for (size_t i = 0; i < count; ++i) { |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 ignore_result(Execute(kNoWritableSchema)); | 1800 ignore_result(Execute(kNoWritableSchema)); |
1801 | 1801 |
1802 return ret; | 1802 return ret; |
1803 } | 1803 } |
1804 | 1804 |
1805 base::TimeTicks TimeSource::Now() { | 1805 base::TimeTicks TimeSource::Now() { |
1806 return base::TimeTicks::Now(); | 1806 return base::TimeTicks::Now(); |
1807 } | 1807 } |
1808 | 1808 |
1809 } // namespace sql | 1809 } // namespace sql |
OLD | NEW |