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

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

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
« no previous file with comments | « chrome/browser/diagnostics/diagnostics_test.h ('k') | chrome/browser/diagnostics/diagnostics_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/diagnostics/diagnostics_test.cc
diff --git a/chrome/browser/diagnostics/diagnostics_test.cc b/chrome/browser/diagnostics/diagnostics_test.cc
index fe08dd67a22e5f35300ca59a6698e655caae4551..4e6e02018bce647af5de11835d179c25a820d0f1 100644
--- a/chrome/browser/diagnostics/diagnostics_test.cc
+++ b/chrome/browser/diagnostics/diagnostics_test.cc
@@ -27,7 +27,19 @@ bool DiagnosticsTest::Execute(DiagnosticsModel::Observer* observer,
result_ = DiagnosticsModel::TEST_RUNNING;
bool keep_going = ExecuteImpl(observer);
if (observer)
- observer->OnFinished(index, model);
+ observer->OnTestFinished(index, model);
+ return keep_going;
+}
+
+bool DiagnosticsTest::Recover(DiagnosticsModel::Observer* observer,
+ DiagnosticsModel* model,
+ size_t index) {
+ result_ = DiagnosticsModel::RECOVERY_RUNNING;
+ bool keep_going = RecoveryImpl(observer);
+ result_ = keep_going ? DiagnosticsModel::RECOVERY_OK
+ : DiagnosticsModel::RECOVERY_FAIL_STOP;
+ if (observer)
+ observer->OnRecoveryFinished(index, model);
return keep_going;
}
@@ -66,4 +78,9 @@ base::Time DiagnosticsTest::GetStartTime() const { return start_time_; }
base::Time DiagnosticsTest::GetEndTime() const { return end_time_; }
+bool DiagnosticsTest::RecoveryImpl(DiagnosticsModel::Observer* observer) {
+ return true;
+};
+
+
} // namespace diagnostics
« no previous file with comments | « chrome/browser/diagnostics/diagnostics_test.h ('k') | chrome/browser/diagnostics/diagnostics_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698