OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <fstream> | 5 #include <fstream> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_path); | 704 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_path); |
705 base::Time most_recent_file_time; | 705 base::Time most_recent_file_time; |
706 | 706 |
707 bool first_file = true; | 707 bool first_file = true; |
708 | 708 |
709 file_util::FileEnumerator enumerator(crash_dump_path, | 709 file_util::FileEnumerator enumerator(crash_dump_path, |
710 false, // not recursive | 710 false, // not recursive |
711 file_util::FileEnumerator::FILES); | 711 file_util::FileEnumerator::FILES); |
712 for (FilePath path = enumerator.Next(); !path.value().empty(); | 712 for (FilePath path = enumerator.Next(); !path.value().empty(); |
713 path = enumerator.Next()) { | 713 path = enumerator.Next()) { |
714 file_util::FileInfo file_info; | 714 base::PlatformFileInfo file_info; |
715 GetFileInfo(path, &file_info); | 715 GetFileInfo(path, &file_info); |
716 if (first_file) { | 716 if (first_file) { |
717 most_recent_file_time = file_info.last_modified; | 717 most_recent_file_time = file_info.last_modified; |
718 most_recent_file_name = path.BaseName(); | 718 most_recent_file_name = path.BaseName(); |
719 first_file = false; | 719 first_file = false; |
720 } else if (file_info.last_modified >= most_recent_file_time) { | 720 } else if (file_info.last_modified >= most_recent_file_time) { |
721 most_recent_file_time = file_info.last_modified; | 721 most_recent_file_time = file_info.last_modified; |
722 most_recent_file_name = path.BaseName(); | 722 most_recent_file_name = path.BaseName(); |
723 } | 723 } |
724 } | 724 } |
(...skipping 23 matching lines...) Expand all Loading... |
748 } | 748 } |
749 } | 749 } |
750 | 750 |
751 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { | 751 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { |
752 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 752 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
753 if (parsed_command_line.HasSwitch(kReproSwitch)) | 753 if (parsed_command_line.HasSwitch(kReproSwitch)) |
754 RunReproduction(); | 754 RunReproduction(); |
755 else | 755 else |
756 RunAutomatedUITest(); | 756 RunAutomatedUITest(); |
757 } | 757 } |
OLD | NEW |