| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 RunPageCycler(); | 921 RunPageCycler(); |
| 922 | 922 |
| 923 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 923 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 924 chrome_extra_parts_[i]->PostBrowserStart(); | 924 chrome_extra_parts_[i]->PostBrowserStart(); |
| 925 // Allow ProcessSingleton to process messages. | 925 // Allow ProcessSingleton to process messages. |
| 926 process_singleton_->Unlock(); | 926 process_singleton_->Unlock(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void ChromeBrowserMainParts::RunPageCycler() { | 929 void ChromeBrowserMainParts::RunPageCycler() { |
| 930 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 930 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 931 Browser* browser = browser::FindBrowserWithProfile(profile_); | 931 // We assume a native desktop for tests, but we will need to find a way to |
| 932 // get the proper host desktop type once we start running these tests in ASH. |
| 933 Browser* browser = browser::FindBrowserWithProfile( |
| 934 profile_, chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 932 DCHECK(browser); | 935 DCHECK(browser); |
| 933 PageCycler* page_cycler = NULL; | 936 PageCycler* page_cycler = NULL; |
| 934 FilePath input_file = | 937 FilePath input_file = |
| 935 command_line->GetSwitchValuePath(switches::kVisitURLs); | 938 command_line->GetSwitchValuePath(switches::kVisitURLs); |
| 936 page_cycler = new PageCycler(browser, input_file); | 939 page_cycler = new PageCycler(browser, input_file); |
| 937 page_cycler->set_errors_file( | 940 page_cycler->set_errors_file( |
| 938 input_file.AddExtension(FILE_PATH_LITERAL(".errors"))); | 941 input_file.AddExtension(FILE_PATH_LITERAL(".errors"))); |
| 939 if (command_line->HasSwitch(switches::kRecordStats)) { | 942 if (command_line->HasSwitch(switches::kRecordStats)) { |
| 940 page_cycler->set_stats_file( | 943 page_cycler->set_stats_file( |
| 941 command_line->GetSwitchValuePath(switches::kRecordStats)); | 944 command_line->GetSwitchValuePath(switches::kRecordStats)); |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1563 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1561 uma_name += "_XP"; | 1564 uma_name += "_XP"; |
| 1562 | 1565 |
| 1563 uma_name += "_PreRead_"; | 1566 uma_name += "_PreRead_"; |
| 1564 uma_name += pre_read_percentage; | 1567 uma_name += pre_read_percentage; |
| 1565 AddPreReadHistogramTime(uma_name.c_str(), time); | 1568 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1566 } | 1569 } |
| 1567 #endif | 1570 #endif |
| 1568 #endif | 1571 #endif |
| 1569 } | 1572 } |
| OLD | NEW |