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

Unified Diff: chrome/browser/diagnostics/diagnostics_test.h

Issue 16948012: This adds a recovery mode to the diagnostics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload after merge Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/diagnostics/diagnostics_test.h
diff --git a/chrome/browser/diagnostics/diagnostics_test.h b/chrome/browser/diagnostics/diagnostics_test.h
index 20e44d9a8f1699d04c7cb61a95850daad87c602a..8d45a10e07c1e664753d6c1b7b9adadccb1f5a63 100644
--- a/chrome/browser/diagnostics/diagnostics_test.h
+++ b/chrome/browser/diagnostics/diagnostics_test.h
@@ -39,6 +39,11 @@ class DiagnosticsTest : public DiagnosticsModel::TestInfo {
bool Execute(DiagnosticsModel::Observer* observer, DiagnosticsModel* model,
size_t index);
+ // Runs any recovery steps for the test. Returning false signals that no more
+ // recovery should be attempted.
+ bool Recover(DiagnosticsModel::Observer* observer, DiagnosticsModel* model,
+ size_t index);
+
void RecordStopFailure(int outcome_code, const std::string& additional_info) {
RecordOutcome(
outcome_code, additional_info, DiagnosticsModel::TEST_FAIL_STOP);
@@ -71,6 +76,10 @@ class DiagnosticsTest : public DiagnosticsModel::TestInfo {
// Derived classes override this method do perform the actual test.
virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0;
+ // Derived classes may override this method to perform a recovery, if recovery
+ // makes sense for the diagnostics test.
+ virtual bool RecoveryImpl(DiagnosticsModel::Observer* observer);
+
const std::string id_;
const std::string title_;
std::string additional_info_;
« no previous file with comments | « chrome/browser/diagnostics/diagnostics_model_unittest.cc ('k') | chrome/browser/diagnostics/diagnostics_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698