| 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 "chrome/browser/diagnostics/sqlite_diagnostics.h" | 5 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
| 20 #include "chromeos/chromeos_constants.h" | 20 #include "chromeos/chromeos_constants.h" |
| 21 #include "components/webdata/common/webdata_constants.h" | 21 #include "components/webdata/common/webdata_constants.h" |
| 22 #include "content/public/common/content_constants.h" | 22 #include "content/public/common/content_constants.h" |
| 23 #include "sql/connection.h" | 23 #include "sql/connection.h" |
| 24 #include "sql/statement.h" | 24 #include "sql/statement.h" |
| 25 #include "third_party/sqlite/sqlite3.h" | 25 #include "third_party/sqlite/sqlite3.h" |
| 26 #include "webkit/browser/database/database_tracker.h" | 26 #include "storage/browser/database/database_tracker.h" |
| 27 | 27 |
| 28 namespace diagnostics { | 28 namespace diagnostics { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // Generic diagnostic test class for checking SQLite database integrity. | 32 // Generic diagnostic test class for checking SQLite database integrity. |
| 33 class SqliteIntegrityTest : public DiagnosticsTest { | 33 class SqliteIntegrityTest : public DiagnosticsTest { |
| 34 public: | 34 public: |
| 35 // These are bit flags, so each value should be a power of two. | 35 // These are bit flags, so each value should be a power of two. |
| 36 enum Flags { | 36 enum Flags { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 base::FilePath(chrome::kThumbnailsFilename)); | 246 base::FilePath(chrome::kThumbnailsFilename)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 DiagnosticsTest* MakeSqliteWebDataDbTest() { | 249 DiagnosticsTest* MakeSqliteWebDataDbTest() { |
| 250 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, | 250 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, |
| 251 DIAGNOSTICS_SQLITE_INTEGRITY_WEB_DATA_TEST, | 251 DIAGNOSTICS_SQLITE_INTEGRITY_WEB_DATA_TEST, |
| 252 base::FilePath(kWebDataFilename)); | 252 base::FilePath(kWebDataFilename)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace diagnostics | 255 } // namespace diagnostics |
| OLD | NEW |