Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/diagnostics/sqlite_diagnostics.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 14 matching lines...) Expand all
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)
30 : DiagnosticTest(title), 30 : DiagnosticTest(title),
31 critical_(critical), 31 critical_(critical),
32 db_path_(profile_relative_db_path) { 32 db_path_(profile_relative_db_path) {
33 } 33 }
34 34
35 virtual int GetId() { return 0; } 35 virtual int GetId() OVERRIDE { return 0; }
36 36
37 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { 37 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE {
38 FilePath path = GetUserDefaultProfileDir(); 38 FilePath path = GetUserDefaultProfileDir();
39 path = path.Append(db_path_); 39 path = path.Append(db_path_);
40 if (!file_util::PathExists(path)) { 40 if (!file_util::PathExists(path)) {
41 RecordOutcome(ASCIIToUTF16("File not found"), 41 RecordOutcome(ASCIIToUTF16("File not found"),
42 critical_ ? DiagnosticsModel::TEST_FAIL_CONTINUE : 42 critical_ ? DiagnosticsModel::TEST_FAIL_CONTINUE :
43 DiagnosticsModel::TEST_OK); 43 DiagnosticsModel::TEST_OK);
44 return true; 44 return true;
45 } 45 }
46 46
47 int errors = 0; 47 int errors = 0;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 appcache_db); 121 appcache_db);
122 } 122 }
123 123
124 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() { 124 DiagnosticTest* MakeSqliteWebDatabaseTrackerDbTest() {
125 FilePath databases_dir(webkit_database::kDatabaseDirectoryName); 125 FilePath databases_dir(webkit_database::kDatabaseDirectoryName);
126 FilePath tracker_db = 126 FilePath tracker_db =
127 databases_dir.Append(webkit_database::kTrackerDatabaseFileName); 127 databases_dir.Append(webkit_database::kTrackerDatabaseFileName);
128 return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"), 128 return new SqliteIntegrityTest(false, ASCIIToUTF16("DatabaseTracker DB"),
129 tracker_db); 129 tracker_db);
130 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698