| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file provides reliablity test which runs under UI test framework. The | 5 // This file provides reliablity test which runs under UI test framework. The |
| 6 // test is intended to run within QEMU environment. | 6 // test is intended to run within QEMU environment. |
| 7 // | 7 // |
| 8 // Usage 1: reliability_test | 8 // Usage 1: reliability_test |
| 9 // Upon invocation, it visits a hard coded list of URLs. This is mainly used | 9 // Upon invocation, it visits a hard coded list of URLs. This is mainly used |
| 10 // by buildbot, to verify reliability_test itself runs ok. | 10 // by buildbot, to verify reliability_test itself runs ok. |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 } | 472 } |
| 473 | 473 |
| 474 if (metrics) | 474 if (metrics) |
| 475 metrics->crash_dump_count = num_dumps; | 475 metrics->crash_dump_count = num_dumps; |
| 476 } | 476 } |
| 477 | 477 |
| 478 // Get a PrefService whose contents correspond to the Local State file | 478 // Get a PrefService whose contents correspond to the Local State file |
| 479 // that was saved by the app as it closed. The caller takes ownership of the | 479 // that was saved by the app as it closed. The caller takes ownership of the |
| 480 // returned PrefService object. | 480 // returned PrefService object. |
| 481 PrefService* GetLocalState() { | 481 PrefService* GetLocalState() { |
| 482 std::wstring local_state_path = user_data_dir(); | 482 FilePath local_state_path = FilePath::FromWStringHack(user_data_dir()) |
| 483 file_util::AppendToPath(&local_state_path, chrome::kLocalStateFilename); | 483 .Append(chrome::kLocalStateFilename); |
| 484 | 484 |
| 485 PrefService* local_state(new PrefService(local_state_path)); | 485 PrefService* local_state(new PrefService(local_state_path)); |
| 486 return local_state; | 486 return local_state; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void GetStabilityMetrics(NavigationMetrics* metrics) { | 489 void GetStabilityMetrics(NavigationMetrics* metrics) { |
| 490 if (!metrics) | 490 if (!metrics) |
| 491 return; | 491 return; |
| 492 scoped_ptr<PrefService> local_state(GetLocalState()); | 492 scoped_ptr<PrefService> local_state(GetLocalState()); |
| 493 if (!local_state.get()) | 493 if (!local_state.get()) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 634 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
| 635 v8_log_path = v8_command_line.GetSwitchValue(kV8LogFileSwitch); | 635 v8_log_path = v8_command_line.GetSwitchValue(kV8LogFileSwitch); |
| 636 if (!file_util::AbsolutePath(&v8_log_path)) { | 636 if (!file_util::AbsolutePath(&v8_log_path)) { |
| 637 v8_log_path.clear(); | 637 v8_log_path.clear(); |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 } | 641 } |
| 642 } | 642 } |
| 643 } | 643 } |
| OLD | NEW |