| 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" |
| 12 #include "base/string_number_conversions.h" |
| 11 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 12 #include "base/string_number_conversions.h" | |
| 13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 14 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 15 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 16 #include "chrome/browser/diagnostics/diagnostics_test.h" | 17 #include "chrome/browser/diagnostics/diagnostics_test.h" |
| 17 #include "chrome/browser/platform_util.h" | 18 #include "chrome/browser/platform_util.h" |
| 18 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
| 20 #include "chrome/common/chrome_version_info.h" | 21 #include "chrome/common/chrome_version_info.h" |
| 21 #include "content/common/json_value_serializer.h" | 22 #include "content/common/json_value_serializer.h" |
| 22 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 base::win::Version version = base::win::GetVersion(); | 52 base::win::Version version = base::win::GetVersion(); |
| 52 if ((version < base::win::VERSION_XP) || | 53 if ((version < base::win::VERSION_XP) || |
| 53 ((version == base::win::VERSION_XP) && | 54 ((version == base::win::VERSION_XP) && |
| 54 (base::win::OSInfo::GetInstance()->service_pack().major < 2))) { | 55 (base::win::OSInfo::GetInstance()->service_pack().major < 2))) { |
| 55 RecordFailure(ASCIIToUTF16("Must have Windows XP SP2 or later")); | 56 RecordFailure(ASCIIToUTF16("Must have Windows XP SP2 or later")); |
| 56 return false; | 57 return false; |
| 57 } | 58 } |
| 58 #else | 59 #else |
| 59 // TODO(port): define the OS criteria for Linux and Mac. | 60 // TODO(port): define the OS criteria for Linux and Mac. |
| 60 #endif // defined(OS_WIN) | 61 #endif // defined(OS_WIN) |
| 61 RecordSuccess(ASCIIToUTF16(StringPrintf("%s %s", | 62 RecordSuccess(ASCIIToUTF16(base::StringPrintf( |
| 63 "%s %s", |
| 62 base::SysInfo::OperatingSystemName().c_str(), | 64 base::SysInfo::OperatingSystemName().c_str(), |
| 63 base::SysInfo::OperatingSystemVersion().c_str()))); | 65 base::SysInfo::OperatingSystemVersion().c_str()))); |
| 64 return true; | 66 return true; |
| 65 } | 67 } |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 DISALLOW_COPY_AND_ASSIGN(OperatingSystemTest); | 70 DISALLOW_COPY_AND_ASSIGN(OperatingSystemTest); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 // Check if any conflicting DLLs are loaded. | 73 // Check if any conflicting DLLs are loaded. |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 path = path.Append(chrome::kBookmarksFileName); | 416 path = path.Append(chrome::kBookmarksFileName); |
| 415 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); | 417 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); |
| 416 } | 418 } |
| 417 | 419 |
| 418 DiagnosticTest* MakeLocalStateTest() { | 420 DiagnosticTest* MakeLocalStateTest() { |
| 419 FilePath path; | 421 FilePath path; |
| 420 PathService::Get(chrome::DIR_USER_DATA, &path); | 422 PathService::Get(chrome::DIR_USER_DATA, &path); |
| 421 path = path.Append(chrome::kLocalStateFilename); | 423 path = path.Append(chrome::kLocalStateFilename); |
| 422 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); | 424 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); |
| 423 } | 425 } |
| OLD | NEW |