| Index: chrome/browser/diagnostics/diagnostics_controller.cc
|
| diff --git a/chrome/browser/diagnostics/diagnostics_controller.cc b/chrome/browser/diagnostics/diagnostics_controller.cc
|
| index a578beb2fd2994177790f063671894fd26d97784..76bf7c97eb331311f229314fff14a3ddf62712ab 100644
|
| --- a/chrome/browser/diagnostics/diagnostics_controller.cc
|
| +++ b/chrome/browser/diagnostics/diagnostics_controller.cc
|
| @@ -34,8 +34,8 @@ bool DiagnosticsController::HasResults() {
|
|
|
| void DiagnosticsController::ClearResults() { model_.reset(); }
|
|
|
| -// This entry point is called from ChromeMain() when very few things
|
| -// have been initialized, so be careful what you use.
|
| +// This entry point is called from early in startup when very few things have
|
| +// been initialized, so be careful what you use.
|
| int DiagnosticsController::Run(const CommandLine& command_line,
|
| DiagnosticsWriter* writer) {
|
| writer_ = writer;
|
| @@ -46,4 +46,22 @@ int DiagnosticsController::Run(const CommandLine& command_line,
|
| return 0;
|
| }
|
|
|
| +// This entry point is called from early in startup when very few things have
|
| +// been initialized, so be careful what you use.
|
| +int DiagnosticsController::RunRecovery(const CommandLine& command_line,
|
| + DiagnosticsWriter* writer) {
|
| + if (!HasResults()) {
|
| + if (writer) {
|
| + writer->WriteInfoLine("No diagnostics have been run.");
|
| + writer->OnAllRecoveryDone(model_.get());
|
| + }
|
| + return -1;
|
| + }
|
| +
|
| + writer_ = writer;
|
| +
|
| + model_->RecoverAll(writer_);
|
| + return 0;
|
| +}
|
| +
|
| } // namespace diagnostics
|
|
|