OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 // This file provides reliablity tests which run for ChromeFrame. | 5 // This file provides reliablity tests which run for ChromeFrame. |
6 // | 6 // |
7 // Usage: | 7 // Usage: |
8 // <reliability test exe> --list=file --startline=start --endline=end [...] | 8 // <reliability test exe> --list=file --startline=start --endline=end [...] |
9 // Upon invocation, it visits each of the URLs on line numbers between start | 9 // Upon invocation, it visits each of the URLs on line numbers between start |
10 // and end, inclusive, stored in the input file. The line number starts from 1. | 10 // and end, inclusive, stored in the input file. The line number starts from 1. |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 metrics->crash_dump_count = num_dumps; | 463 metrics->crash_dump_count = num_dumps; |
464 } | 464 } |
465 | 465 |
466 // Get a PrefService whose contents correspond to the Local State file | 466 // Get a PrefService whose contents correspond to the Local State file |
467 // that was saved by the app as it closed. The caller takes ownership of the | 467 // that was saved by the app as it closed. The caller takes ownership of the |
468 // returned PrefService object. | 468 // returned PrefService object. |
469 PrefService* GetLocalState() { | 469 PrefService* GetLocalState() { |
470 FilePath local_state_path; | 470 FilePath local_state_path; |
471 chrome::GetChromeFrameUserDataDirectory(&local_state_path); | 471 chrome::GetChromeFrameUserDataDirectory(&local_state_path); |
472 | 472 |
473 PrefService* local_state = new PrefService(new PrefValueStore( | 473 PrefService* local_state = PrefService::CreateUserPrefService( |
474 NULL, /* no managed preference values */ | 474 local_state_path); |
475 new JsonPrefStore(/* user defined preference values */ | |
476 local_state_path, | |
477 ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE)), | |
478 NULL /* no sugessted preference values */)); | |
479 return local_state; | 475 return local_state; |
480 } | 476 } |
481 | 477 |
482 void GetStabilityMetrics(NavigationMetrics* metrics) { | 478 void GetStabilityMetrics(NavigationMetrics* metrics) { |
483 if (!metrics) | 479 if (!metrics) |
484 return; | 480 return; |
485 scoped_ptr<PrefService> local_state(GetLocalState()); | 481 scoped_ptr<PrefService> local_state(GetLocalState()); |
486 if (!local_state.get()) | 482 if (!local_state.get()) |
487 return; | 483 return; |
488 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 484 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 621 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
626 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 622 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
627 if (!file_util::AbsolutePath(&g_v8_log_path)) | 623 if (!file_util::AbsolutePath(&g_v8_log_path)) |
628 g_v8_log_path = FilePath(); | 624 g_v8_log_path = FilePath(); |
629 } | 625 } |
630 } | 626 } |
631 } | 627 } |
632 } | 628 } |
633 } | 629 } |
634 | 630 |
OLD | NEW |