| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_controller.h" | 5 #include "chrome/browser/diagnostics/diagnostics_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "chrome/browser/diagnostics/diagnostics_model.h" | 14 #include "chrome/browser/diagnostics/diagnostics_model.h" |
| 15 #include "chrome/browser/diagnostics/diagnostics_test.h" | 15 #include "chrome/browser/diagnostics/diagnostics_test.h" |
| 16 #include "chrome/browser/diagnostics/diagnostics_writer.h" | 16 #include "chrome/browser/diagnostics/diagnostics_writer.h" |
| 17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 18 | 18 |
| 19 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
| 20 #include "chromeos/chromeos_switches.h" | 20 #include "chromeos/chromeos_switches.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace diagnostics { | 23 namespace diagnostics { |
| 24 | 24 |
| 25 DiagnosticsController* DiagnosticsController::GetInstance() { | 25 DiagnosticsController* DiagnosticsController::GetInstance() { |
| 26 return Singleton<DiagnosticsController>::get(); | 26 return base::Singleton<DiagnosticsController>::get(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 DiagnosticsController::DiagnosticsController() : writer_(NULL) {} | 29 DiagnosticsController::DiagnosticsController() : writer_(NULL) {} |
| 30 | 30 |
| 31 DiagnosticsController::~DiagnosticsController() {} | 31 DiagnosticsController::~DiagnosticsController() {} |
| 32 | 32 |
| 33 const DiagnosticsModel& DiagnosticsController::GetResults() const { | 33 const DiagnosticsModel& DiagnosticsController::GetResults() const { |
| 34 return *model_; | 34 return *model_; |
| 35 } | 35 } |
| 36 | 36 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return -1; | 94 return -1; |
| 95 } | 95 } |
| 96 | 96 |
| 97 writer_ = writer; | 97 writer_ = writer; |
| 98 | 98 |
| 99 model_->RecoverAll(writer_); | 99 model_->RecoverAll(writer_); |
| 100 return 0; | 100 return 0; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace diagnostics | 103 } // namespace diagnostics |
| OLD | NEW |