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

Side by Side Diff: chrome/browser/diagnostics/recon_diagnostics.cc

Issue 6816024: Revert 80819 due to failed tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/importer/importer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 29 matching lines...) Expand all
40 InstallTypeTest* g_install_type = 0; 40 InstallTypeTest* g_install_type = 0;
41 41
42 // Check that the flavor of the operating system is supported. 42 // Check that the flavor of the operating system is supported.
43 class OperatingSystemTest : public DiagnosticTest { 43 class OperatingSystemTest : public DiagnosticTest {
44 public: 44 public:
45 OperatingSystemTest() : DiagnosticTest(ASCIIToUTF16("Operating System")) {} 45 OperatingSystemTest() : DiagnosticTest(ASCIIToUTF16("Operating System")) {}
46 46
47 virtual int GetId() { return 0; } 47 virtual int GetId() { return 0; }
48 48
49 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { 49 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) {
50 int version = 0;
51 int major = 0;
52 int minor = 0;
50 #if defined(OS_WIN) 53 #if defined(OS_WIN)
51 base::win::Version version = base::win::GetVersion(); 54 version = base::win::GetVersion();
52 if ((version < base::win::VERSION_XP) || 55 if (version < base::win::VERSION_XP) {
53 ((version == base::win::VERSION_XP) && 56 RecordFailure(ASCIIToUTF16("Windows 2000 or earlier"));
54 (base::win::OSInfo::GetInstance()->service_pack().major < 2))) { 57 return false;
55 RecordFailure(ASCIIToUTF16("Must have Windows XP SP2 or later")); 58 }
59 base::win::GetServicePackLevel(&major, &minor);
60 if ((version == base::win::VERSION_XP) && (major < 2)) {
61 RecordFailure(ASCIIToUTF16("XP Service Pack 1 or earlier"));
56 return false; 62 return false;
57 } 63 }
58 #else 64 #else
59 // TODO(port): define the OS criteria for Linux and Mac. 65 // TODO(port): define the OS criteria for Linux and Mac.
60 #endif // defined(OS_WIN) 66 #endif // defined(OS_WIN)
61 RecordSuccess(ASCIIToUTF16(StringPrintf("%s %s", 67 RecordSuccess(ASCIIToUTF16(StringPrintf("%s %s (%d [%d:%d])",
62 base::SysInfo::OperatingSystemName().c_str(), 68 base::SysInfo::OperatingSystemName().c_str(),
63 base::SysInfo::OperatingSystemVersion().c_str()))); 69 base::SysInfo::OperatingSystemVersion().c_str(),
70 version, major, minor)));
64 return true; 71 return true;
65 } 72 }
66 73
67 private: 74 private:
68 DISALLOW_COPY_AND_ASSIGN(OperatingSystemTest); 75 DISALLOW_COPY_AND_ASSIGN(OperatingSystemTest);
69 }; 76 };
70 77
71 // Check if any conflicting DLLs are loaded. 78 // Check if any conflicting DLLs are loaded.
72 class ConflictingDllsTest : public DiagnosticTest { 79 class ConflictingDllsTest : public DiagnosticTest {
73 public: 80 public:
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 path = path.Append(chrome::kBookmarksFileName); 421 path = path.Append(chrome::kBookmarksFileName);
415 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); 422 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg);
416 } 423 }
417 424
418 DiagnosticTest* MakeLocalStateTest() { 425 DiagnosticTest* MakeLocalStateTest() {
419 FilePath path; 426 FilePath path;
420 PathService::Get(chrome::DIR_USER_DATA, &path); 427 PathService::Get(chrome::DIR_USER_DATA, &path);
421 path = path.Append(chrome::kLocalStateFilename); 428 path = path.Append(chrome::kLocalStateFilename);
422 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); 429 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo);
423 } 430 }
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/importer/importer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698