OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/recon_diagnostics.h" | 5 #include "chrome/browser/diagnostics/recon_diagnostics.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "chrome/app/chrome_version_info.h" |
13 #include "chrome/browser/diagnostics/diagnostics_test.h" | 14 #include "chrome/browser/diagnostics/diagnostics_test.h" |
14 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/platform_util.h" | 16 #include "chrome/common/platform_util.h" |
16 #include "app/app_paths.h" | 17 #include "app/app_paths.h" |
17 | 18 |
18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
19 #include "base/win_util.h" | 20 #include "base/win_util.h" |
20 #include "chrome/installer/util/install_util.h" | 21 #include "chrome/installer/util/install_util.h" |
21 #endif | 22 #endif |
22 | 23 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 // Check the version of Chrome. | 103 // Check the version of Chrome. |
103 class VersionTest : public DiagnosticTest { | 104 class VersionTest : public DiagnosticTest { |
104 public: | 105 public: |
105 VersionTest() : DiagnosticTest(ASCIIToUTF16("Browser Version")) {} | 106 VersionTest() : DiagnosticTest(ASCIIToUTF16("Browser Version")) {} |
106 | 107 |
107 virtual int GetId() { return 0; } | 108 virtual int GetId() { return 0; } |
108 | 109 |
109 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { | 110 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { |
110 scoped_ptr<FileVersionInfo> version_info( | 111 scoped_ptr<FileVersionInfo> version_info( |
111 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 112 chrome_app::GetChromeVersionInfo()); |
112 if (!version_info.get()) { | 113 if (!version_info.get()) { |
113 RecordFailure(ASCIIToUTF16("No Version")); | 114 RecordFailure(ASCIIToUTF16("No Version")); |
114 return true; | 115 return true; |
115 } | 116 } |
116 string16 current_version = WideToUTF16(version_info->file_version()); | 117 string16 current_version = WideToUTF16(version_info->file_version()); |
117 if (current_version.empty()) { | 118 if (current_version.empty()) { |
118 RecordFailure(ASCIIToUTF16("Empty Version")); | 119 RecordFailure(ASCIIToUTF16("Empty Version")); |
119 return true; | 120 return true; |
120 } | 121 } |
121 string16 version_modifier = platform_util::GetVersionStringModifier(); | 122 string16 version_modifier = platform_util::GetVersionStringModifier(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 } | 281 } |
281 | 282 |
282 DiagnosticTest* MakeOperatingSystemTest() { | 283 DiagnosticTest* MakeOperatingSystemTest() { |
283 return new OperatingSystemTest(); | 284 return new OperatingSystemTest(); |
284 } | 285 } |
285 | 286 |
286 DiagnosticTest* MakeInstallTypeTest() { | 287 DiagnosticTest* MakeInstallTypeTest() { |
287 return new InstallTypeTest(); | 288 return new InstallTypeTest(); |
288 } | 289 } |
289 | 290 |
OLD | NEW |