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/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 233 } |
234 | 234 |
235 DiagnosticsTest* MakeSqliteHistoryDbTest() { | 235 DiagnosticsTest* MakeSqliteHistoryDbTest() { |
236 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, | 236 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, |
237 DIAGNOSTICS_SQLITE_INTEGRITY_HISTORY_TEST, | 237 DIAGNOSTICS_SQLITE_INTEGRITY_HISTORY_TEST, |
238 base::FilePath(chrome::kHistoryFilename)); | 238 base::FilePath(chrome::kHistoryFilename)); |
239 } | 239 } |
240 | 240 |
241 #if defined(OS_CHROMEOS) | 241 #if defined(OS_CHROMEOS) |
242 DiagnosticsTest* MakeSqliteNssCertDbTest() { | 242 DiagnosticsTest* MakeSqliteNssCertDbTest() { |
243 base::FilePath home_dir = file_util::GetHomeDir(); | 243 base::FilePath home_dir = base::GetHomeDir(); |
244 return new SqliteIntegrityTest(SqliteIntegrityTest::REMOVE_IF_CORRUPT, | 244 return new SqliteIntegrityTest(SqliteIntegrityTest::REMOVE_IF_CORRUPT, |
245 DIAGNOSTICS_SQLITE_INTEGRITY_NSS_CERT_TEST, | 245 DIAGNOSTICS_SQLITE_INTEGRITY_NSS_CERT_TEST, |
246 home_dir.Append(chromeos::kNssCertDbPath)); | 246 home_dir.Append(chromeos::kNssCertDbPath)); |
247 } | 247 } |
248 | 248 |
249 DiagnosticsTest* MakeSqliteNssKeyDbTest() { | 249 DiagnosticsTest* MakeSqliteNssKeyDbTest() { |
250 base::FilePath home_dir = file_util::GetHomeDir(); | 250 base::FilePath home_dir = base::GetHomeDir(); |
251 return new SqliteIntegrityTest(SqliteIntegrityTest::REMOVE_IF_CORRUPT, | 251 return new SqliteIntegrityTest(SqliteIntegrityTest::REMOVE_IF_CORRUPT, |
252 DIAGNOSTICS_SQLITE_INTEGRITY_NSS_KEY_TEST, | 252 DIAGNOSTICS_SQLITE_INTEGRITY_NSS_KEY_TEST, |
253 home_dir.Append(chromeos::kNssKeyDbPath)); | 253 home_dir.Append(chromeos::kNssKeyDbPath)); |
254 } | 254 } |
255 #endif // defined(OS_CHROMEOS) | 255 #endif // defined(OS_CHROMEOS) |
256 | 256 |
257 DiagnosticsTest* MakeSqliteThumbnailsDbTest() { | 257 DiagnosticsTest* MakeSqliteThumbnailsDbTest() { |
258 return new SqliteIntegrityTest(SqliteIntegrityTest::NO_FLAGS_SET, | 258 return new SqliteIntegrityTest(SqliteIntegrityTest::NO_FLAGS_SET, |
259 DIAGNOSTICS_SQLITE_INTEGRITY_THUMBNAILS_TEST, | 259 DIAGNOSTICS_SQLITE_INTEGRITY_THUMBNAILS_TEST, |
260 base::FilePath(chrome::kThumbnailsFilename)); | 260 base::FilePath(chrome::kThumbnailsFilename)); |
261 } | 261 } |
262 | 262 |
263 DiagnosticsTest* MakeSqliteWebDataDbTest() { | 263 DiagnosticsTest* MakeSqliteWebDataDbTest() { |
264 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, | 264 return new SqliteIntegrityTest(SqliteIntegrityTest::CRITICAL, |
265 DIAGNOSTICS_SQLITE_INTEGRITY_WEB_DATA_TEST, | 265 DIAGNOSTICS_SQLITE_INTEGRITY_WEB_DATA_TEST, |
266 base::FilePath(kWebDataFilename)); | 266 base::FilePath(kWebDataFilename)); |
267 } | 267 } |
268 | 268 |
269 } // namespace diagnostics | 269 } // namespace diagnostics |
OLD | NEW |