| 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 "app/app_paths.h" | 7 #include "app/app_paths.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool is_optional; | 148 bool is_optional; |
| 149 bool test_writable; | 149 bool test_writable; |
| 150 int64 max_size; | 150 int64 max_size; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 const int64 kOneKilo = 1024; | 153 const int64 kOneKilo = 1024; |
| 154 const int64 kOneMeg = 1024 * kOneKilo; | 154 const int64 kOneMeg = 1024 * kOneKilo; |
| 155 | 155 |
| 156 const TestPathInfo kPathsToTest[] = { | 156 const TestPathInfo kPathsToTest[] = { |
| 157 {"User data Directory", chrome::DIR_USER_DATA, | 157 {"User data Directory", chrome::DIR_USER_DATA, |
| 158 true, false, true, 250 * kOneMeg}, | 158 true, false, true, 850 * kOneMeg}, |
| 159 {"Local state file", chrome::FILE_LOCAL_STATE, | 159 {"Local state file", chrome::FILE_LOCAL_STATE, |
| 160 false, false, true, 100 * kOneKilo}, | 160 false, false, true, 500 * kOneKilo}, |
| 161 {"Dictionaries Directory", chrome::DIR_APP_DICTIONARIES, | 161 {"Dictionaries Directory", chrome::DIR_APP_DICTIONARIES, |
| 162 true, true, false, 0}, | 162 true, true, false, 0}, |
| 163 {"Inspector Directory", chrome::DIR_INSPECTOR, | 163 {"Inspector Directory", chrome::DIR_INSPECTOR, |
| 164 true, false, false, 0} | 164 true, false, false, 0} |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 // Check that the user's data directory exists and the paths are writeable. | 167 // Check that the user's data directory exists and the paths are writeable. |
| 168 // If it is a systemwide install some paths are not expected to be writeable. | 168 // If it is a systemwide install some paths are not expected to be writeable. |
| 169 // This test depends on |InstallTypeTest| having run succesfuly. | 169 // This test depends on |InstallTypeTest| having run succesfuly. |
| 170 class PathTest : public DiagnosticTest { | 170 class PathTest : public DiagnosticTest { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 path = path.Append(chrome::kBookmarksFileName); | 355 path = path.Append(chrome::kBookmarksFileName); |
| 356 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); | 356 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); |
| 357 } | 357 } |
| 358 | 358 |
| 359 DiagnosticTest* MakeLocalStateTest() { | 359 DiagnosticTest* MakeLocalStateTest() { |
| 360 FilePath path; | 360 FilePath path; |
| 361 PathService::Get(chrome::DIR_USER_DATA, &path); | 361 PathService::Get(chrome::DIR_USER_DATA, &path); |
| 362 path = path.Append(chrome::kLocalStateFilename); | 362 path = path.Append(chrome::kLocalStateFilename); |
| 363 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); | 363 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); |
| 364 } | 364 } |
| OLD | NEW |