OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ | 5 #ifndef CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ |
6 #define CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ | 6 #define CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/diagnostics/diagnostics_metrics.h" | 9 #include "chrome/browser/diagnostics/diagnostics_metrics.h" |
10 #include "chrome/browser/diagnostics/diagnostics_model.h" | 10 #include "chrome/browser/diagnostics/diagnostics_model.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 RecordOutcome(0, additional_info, DiagnosticsModel::TEST_OK); | 55 RecordOutcome(0, additional_info, DiagnosticsModel::TEST_OK); |
56 } | 56 } |
57 | 57 |
58 void RecordOutcome(int outcome_code, | 58 void RecordOutcome(int outcome_code, |
59 const std::string& additional_info, | 59 const std::string& additional_info, |
60 DiagnosticsModel::TestResult result); | 60 DiagnosticsModel::TestResult result); |
61 | 61 |
62 static base::FilePath GetUserDefaultProfileDir(); | 62 static base::FilePath GetUserDefaultProfileDir(); |
63 | 63 |
64 // DiagnosticsModel::TestInfo overrides | 64 // DiagnosticsModel::TestInfo overrides |
65 virtual int GetId() const OVERRIDE; | 65 virtual int GetId() const override; |
66 virtual std::string GetName() const OVERRIDE; | 66 virtual std::string GetName() const override; |
67 virtual std::string GetTitle() const OVERRIDE; | 67 virtual std::string GetTitle() const override; |
68 virtual DiagnosticsModel::TestResult GetResult() const OVERRIDE; | 68 virtual DiagnosticsModel::TestResult GetResult() const override; |
69 virtual std::string GetAdditionalInfo() const OVERRIDE; | 69 virtual std::string GetAdditionalInfo() const override; |
70 virtual int GetOutcomeCode() const OVERRIDE; | 70 virtual int GetOutcomeCode() const override; |
71 virtual base::Time GetStartTime() const OVERRIDE; | 71 virtual base::Time GetStartTime() const override; |
72 virtual base::Time GetEndTime() const OVERRIDE; | 72 virtual base::Time GetEndTime() const override; |
73 protected: | 73 protected: |
74 // Derived classes override this method do perform the actual test. | 74 // Derived classes override this method do perform the actual test. |
75 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0; | 75 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0; |
76 | 76 |
77 // Derived classes may override this method to perform a recovery, if recovery | 77 // Derived classes may override this method to perform a recovery, if recovery |
78 // makes sense for the diagnostics test. | 78 // makes sense for the diagnostics test. |
79 virtual bool RecoveryImpl(DiagnosticsModel::Observer* observer); | 79 virtual bool RecoveryImpl(DiagnosticsModel::Observer* observer); |
80 | 80 |
81 const DiagnosticsTestId id_; | 81 const DiagnosticsTestId id_; |
82 std::string additional_info_; | 82 std::string additional_info_; |
83 int outcome_code_; | 83 int outcome_code_; |
84 DiagnosticsModel::TestResult result_; | 84 DiagnosticsModel::TestResult result_; |
85 base::Time start_time_; | 85 base::Time start_time_; |
86 base::Time end_time_; | 86 base::Time end_time_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace diagnostics | 89 } // namespace diagnostics |
90 #endif // CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ | 90 #endif // CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ |
OLD | NEW |