| 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/diagnostics_main.h" | 5 #include "chrome/browser/diagnostics/diagnostics_main.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 writer_->WriteInfoText(title.append(PrintableUSCurrentTime()) + L")\n"); | 273 writer_->WriteInfoText(title.append(PrintableUSCurrentTime()) + L")\n"); |
| 274 if (!model) { | 274 if (!model) { |
| 275 writer_->WriteResult(false, L"Diagnostics start", L"model is null"); | 275 writer_->WriteResult(false, L"Diagnostics start", L"model is null"); |
| 276 return; | 276 return; |
| 277 } | 277 } |
| 278 bool icu_result = icu_util::Initialize(); | 278 bool icu_result = icu_util::Initialize(); |
| 279 if (!icu_result) { | 279 if (!icu_result) { |
| 280 writer_->WriteResult(false, L"Diagnostics start", L"ICU failure"); | 280 writer_->WriteResult(false, L"Diagnostics start", L"ICU failure"); |
| 281 return; | 281 return; |
| 282 } | 282 } |
| 283 ResourceBundle::InitSharedInstanceWithLocale(""); | 283 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); |
| 284 int count = model->GetTestAvailableCount(); | 284 int count = model->GetTestAvailableCount(); |
| 285 writer_->WriteInfoText(base::StringPrintf( | 285 writer_->WriteInfoText(base::StringPrintf( |
| 286 L"%d available test(s)\n\n", count)); | 286 L"%d available test(s)\n\n", count)); |
| 287 model->RunAll(this); | 287 model->RunAll(this); |
| 288 } | 288 } |
| 289 | 289 |
| 290 // Next four are overridden from DiagnosticsModel::Observer. | 290 // Next four are overridden from DiagnosticsModel::Observer. |
| 291 virtual void OnProgress(int id, int percent, DiagnosticsModel* model) { | 291 virtual void OnProgress(int id, int percent, DiagnosticsModel* model) { |
| 292 } | 292 } |
| 293 | 293 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 TestController controller(&writer); | 352 TestController controller(&writer); |
| 353 | 353 |
| 354 // Run all the diagnostic tests. | 354 // Run all the diagnostic tests. |
| 355 controller.Run(model); | 355 controller.Run(model); |
| 356 delete model; | 356 delete model; |
| 357 | 357 |
| 358 console->OnQuit(); | 358 console->OnQuit(); |
| 359 delete console; | 359 delete console; |
| 360 return 0; | 360 return 0; |
| 361 } | 361 } |
| OLD | NEW |