Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/recovery.h" | 5 #include "sql/recovery.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "sql/connection.h" | 16 #include "sql/connection.h" |
| 17 #include "sql/statement.h" | 17 #include "sql/statement.h" |
| 18 #include "third_party/sqlite/sqlite3.h" | 18 #include "third_party/sqlite/sqlite3.h" |
| 19 #include "third_party/sqlite/src/src/recover.h" | |
|
Scott Hess - ex-Googler
2016/03/02 01:17:37
I originally had third_party/sqlite/sqlite3.h incl
Scott Hess - ex-Googler
2016/03/09 06:33:16
Looks like I get to figure it out now, since other
| |
| 19 | 20 |
| 20 namespace sql { | 21 namespace sql { |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 enum RecoveryEventType { | 25 enum RecoveryEventType { |
| 25 // Init() completed successfully. | 26 // Init() completed successfully. |
| 26 RECOVERY_SUCCESS_INIT = 0, | 27 RECOVERY_SUCCESS_INIT = 0, |
| 27 | 28 |
| 28 // Failed to open temporary database to recover into. | 29 // Failed to open temporary database to recover into. |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 } | 520 } |
| 520 return false; | 521 return false; |
| 521 } | 522 } |
| 522 | 523 |
| 523 RecordRecoveryEvent(RECOVERY_SUCCESS_META_VERSION); | 524 RecordRecoveryEvent(RECOVERY_SUCCESS_META_VERSION); |
| 524 *version = recovery_version.ColumnInt(0); | 525 *version = recovery_version.ColumnInt(0); |
| 525 return true; | 526 return true; |
| 526 } | 527 } |
| 527 | 528 |
| 528 } // namespace sql | 529 } // namespace sql |
| OLD | NEW |