OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/diagnostics/sqlite_diagnostics.h" | 5 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
6 | 6 |
7 #include "app/sql/connection.h" | 7 #include "app/sql/connection.h" |
8 #include "app/sql/diagnostic_error_delegate.h" | 8 #include "app/sql/diagnostic_error_delegate.h" |
9 #include "app/sql/statement.h" | 9 #include "app/sql/statement.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/histogram.h" | 11 #include "base/histogram.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/singleton.h" | 14 #include "base/singleton.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
| 16 #include "base/utf_string_conversions.h" |
16 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
18 #include "third_party/sqlite/preprocessed/sqlite3.h" | 19 #include "third_party/sqlite/preprocessed/sqlite3.h" |
19 #include "webkit/appcache/appcache_interfaces.h" | 20 #include "webkit/appcache/appcache_interfaces.h" |
20 #include "webkit/database/database_tracker.h" | 21 #include "webkit/database/database_tracker.h" |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 // Generic diagnostic test class for checking sqlite db integrity. | 25 // Generic diagnostic test class for checking sqlite db integrity. |
25 class SqliteIntegrityTest : public DiagnosticTest { | 26 class SqliteIntegrityTest : public DiagnosticTest { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 appcache_db); | 158 appcache_db); |
158 } | 159 } |
159 | 160 |
160 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() { | 161 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() { |
161 FilePath databases_dir(webkit_database::kDatabaseDirectoryName); | 162 FilePath databases_dir(webkit_database::kDatabaseDirectoryName); |
162 FilePath tracker_db = | 163 FilePath tracker_db = |
163 databases_dir.Append(webkit_database::kTrackerDatabaseFileName); | 164 databases_dir.Append(webkit_database::kTrackerDatabaseFileName); |
164 return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"), | 165 return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"), |
165 tracker_db); | 166 tracker_db); |
166 } | 167 } |
OLD | NEW |