| 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 #include "chrome/browser/diagnostics/recon_diagnostics.h" | 5 #include "chrome/browser/diagnostics/recon_diagnostics.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "chrome/browser/diagnostics/diagnostics_test.h" | 17 #include "chrome/browser/diagnostics/diagnostics_test.h" |
| 18 #include "chrome/browser/platform_util.h" | |
| 19 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 20 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
| 22 #include "content/common/json_value_serializer.h" | 21 #include "content/common/json_value_serializer.h" |
| 23 | 22 |
| 24 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 25 #include "base/win/windows_version.h" | 24 #include "base/win/windows_version.h" |
| 26 #include "chrome/browser/enumerate_modules_model_win.h" | 25 #include "chrome/browser/enumerate_modules_model_win.h" |
| 27 #include "chrome/installer/util/install_util.h" | 26 #include "chrome/installer/util/install_util.h" |
| 28 #endif | 27 #endif |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 chrome::VersionInfo version_info; | 168 chrome::VersionInfo version_info; |
| 170 if (!version_info.is_valid()) { | 169 if (!version_info.is_valid()) { |
| 171 RecordFailure(ASCIIToUTF16("No Version")); | 170 RecordFailure(ASCIIToUTF16("No Version")); |
| 172 return true; | 171 return true; |
| 173 } | 172 } |
| 174 std::string current_version = version_info.Version(); | 173 std::string current_version = version_info.Version(); |
| 175 if (current_version.empty()) { | 174 if (current_version.empty()) { |
| 176 RecordFailure(ASCIIToUTF16("Empty Version")); | 175 RecordFailure(ASCIIToUTF16("Empty Version")); |
| 177 return true; | 176 return true; |
| 178 } | 177 } |
| 179 std::string version_modifier = platform_util::GetVersionStringModifier(); | 178 std::string version_modifier = |
| 179 chrome::VersionInfo::GetVersionStringModifier(); |
| 180 if (!version_modifier.empty()) | 180 if (!version_modifier.empty()) |
| 181 current_version += " " + version_modifier; | 181 current_version += " " + version_modifier; |
| 182 #if defined(GOOGLE_CHROME_BUILD) | 182 #if defined(GOOGLE_CHROME_BUILD) |
| 183 current_version += " GCB"; | 183 current_version += " GCB"; |
| 184 #endif // defined(GOOGLE_CHROME_BUILD) | 184 #endif // defined(GOOGLE_CHROME_BUILD) |
| 185 RecordSuccess(ASCIIToUTF16(current_version)); | 185 RecordSuccess(ASCIIToUTF16(current_version)); |
| 186 return true; | 186 return true; |
| 187 } | 187 } |
| 188 | 188 |
| 189 private: | 189 private: |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 path = path.Append(chrome::kBookmarksFileName); | 416 path = path.Append(chrome::kBookmarksFileName); |
| 417 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); | 417 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); |
| 418 } | 418 } |
| 419 | 419 |
| 420 DiagnosticTest* MakeLocalStateTest() { | 420 DiagnosticTest* MakeLocalStateTest() { |
| 421 FilePath path; | 421 FilePath path; |
| 422 PathService::Get(chrome::DIR_USER_DATA, &path); | 422 PathService::Get(chrome::DIR_USER_DATA, &path); |
| 423 path = path.Append(chrome::kLocalStateFilename); | 423 path = path.Append(chrome::kLocalStateFilename); |
| 424 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); | 424 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); |
| 425 } | 425 } |
| OLD | NEW |