| 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 "base/utf_string_conversions.h" | 
|   17 #include "chrome/common/chrome_constants.h" |   17 #include "chrome/common/chrome_constants.h" | 
|   18 #include "chrome/common/chrome_paths.h" |   18 #include "chrome/common/chrome_paths.h" | 
|   19 #include "third_party/sqlite/preprocessed/sqlite3.h" |   19 #include "third_party/sqlite/sqlite3.h" | 
|   20 #include "webkit/appcache/appcache_interfaces.h" |   20 #include "webkit/appcache/appcache_interfaces.h" | 
|   21 #include "webkit/database/database_tracker.h" |   21 #include "webkit/database/database_tracker.h" | 
|   22  |   22  | 
|   23 namespace { |   23 namespace { | 
|   24  |   24  | 
|   25 // Generic diagnostic test class for checking sqlite db integrity. |   25 // Generic diagnostic test class for checking sqlite db integrity. | 
|   26 class SqliteIntegrityTest : public DiagnosticTest { |   26 class SqliteIntegrityTest : public DiagnosticTest { | 
|   27  public: |   27  public: | 
|   28   SqliteIntegrityTest(bool critical, const string16& title, |   28   SqliteIntegrityTest(bool critical, const string16& title, | 
|   29                       const FilePath& profile_relative_db_path) |   29                       const FilePath& profile_relative_db_path) | 
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  158                                  appcache_db); |  158                                  appcache_db); | 
|  159 } |  159 } | 
|  160  |  160  | 
|  161 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() { |  161 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() { | 
|  162   FilePath databases_dir(webkit_database::kDatabaseDirectoryName); |  162   FilePath databases_dir(webkit_database::kDatabaseDirectoryName); | 
|  163   FilePath tracker_db = |  163   FilePath tracker_db = | 
|  164       databases_dir.Append(webkit_database::kTrackerDatabaseFileName); |  164       databases_dir.Append(webkit_database::kTrackerDatabaseFileName); | 
|  165   return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"), |  165   return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"), | 
|  166                                  tracker_db); |  166                                  tracker_db); | 
|  167 } |  167 } | 
| OLD | NEW |