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

Side by Side Diff: chrome/browser/diagnostics/diagnostics_test.h

Issue 6098004: Integrate about:conflicts with --diagnostics... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/diagnostics/diagnostics_model.h" 10 #include "chrome/browser/diagnostics/diagnostics_model.h"
11 11
12 class FilePath; 12 class FilePath;
13 13
14 // Represents a single diagnostic test and encapsulates the common 14 // Represents a single diagnostic test and encapsulates the common
15 // functionality across platforms as well. 15 // functionality across platforms as well.
16 // It also Implements the TestInfo interface providing the storage 16 // It also Implements the TestInfo interface providing the storage
17 // for the outcome of the test. 17 // for the outcome of the test.
18 // Specific tests need (minimally) only to: 18 // Specific tests need (minimally) only to:
19 // 1- override ExecuteImpl() to imnplement the test. 19 // 1- override ExecuteImpl() to implement the test.
20 // 2- call RecordStopFailure() or RecordFailure() or RecordSuccess() 20 // 2- call RecordStopFailure() or RecordFailure() or RecordSuccess()
21 // at the end of the test. 21 // at the end of the test.
22 // 3- Optionally call observer->OnProgress() if the test is long. 22 // 3- Optionally call observer->OnProgress() if the test is long.
23 // 4- Optionally call observer->OnSkipped() if the test cannot be run. 23 // 4- Optionally call observer->OnSkipped() if the test cannot be run.
24 class DiagnosticTest : public DiagnosticsModel::TestInfo { 24 class DiagnosticTest : public DiagnosticsModel::TestInfo {
25 public: 25 public:
26 // |title| is the human readable, localized string that says that 26 // |title| is the human readable, localized string that says that
27 // the objective of the test is. 27 // the objective of the test is.
28 explicit DiagnosticTest(const string16& title); 28 explicit DiagnosticTest(const string16& title);
29 29
(...skipping 21 matching lines...) Expand all
51 void RecordSuccess(const string16& additional_info) { 51 void RecordSuccess(const string16& additional_info) {
52 RecordOutcome(additional_info, DiagnosticsModel::TEST_OK); 52 RecordOutcome(additional_info, DiagnosticsModel::TEST_OK);
53 } 53 }
54 54
55 void RecordOutcome(const string16& additional_info, 55 void RecordOutcome(const string16& additional_info,
56 DiagnosticsModel::TestResult result); 56 DiagnosticsModel::TestResult result);
57 57
58 static FilePath GetUserDefaultProfileDir(); 58 static FilePath GetUserDefaultProfileDir();
59 59
60 protected: 60 protected:
61 // The id needs to be overriden by derived classes and must uniquely 61 // The id needs to be overridden by derived classes and must uniquely
62 // identify this test so other test can refer to it. 62 // identify this test so other test can refer to it.
63 virtual int GetId() = 0; 63 virtual int GetId() = 0;
64 // Derived classes override this method do perform the actual test. 64 // Derived classes override this method do perform the actual test.
65 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0; 65 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) = 0;
66 66
67 string16 title_; 67 string16 title_;
68 string16 additional_info_; 68 string16 additional_info_;
69 DiagnosticsModel::TestResult result_; 69 DiagnosticsModel::TestResult result_;
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ 72 #endif // CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/diagnostics/diagnostics_model_unittest.cc ('k') | chrome/browser/diagnostics/recon_diagnostics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698