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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 // Allow ProcessSingleton to process messages. | 936 // Allow ProcessSingleton to process messages. |
937 process_singleton_->Unlock(); | 937 process_singleton_->Unlock(); |
938 #endif | 938 #endif |
939 } | 939 } |
940 | 940 |
941 #if !defined(OS_ANDROID) | 941 #if !defined(OS_ANDROID) |
942 void ChromeBrowserMainParts::RunPageCycler() { | 942 void ChromeBrowserMainParts::RunPageCycler() { |
943 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 943 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
944 // We assume a native desktop for tests, but we will need to find a way to | 944 // We assume a native desktop for tests, but we will need to find a way to |
945 // get the proper host desktop type once we start running these tests in ASH. | 945 // get the proper host desktop type once we start running these tests in ASH. |
946 Browser* browser = browser::FindBrowserWithProfile( | 946 Browser* browser = chrome::FindBrowserWithProfile( |
947 profile_, chrome::HOST_DESKTOP_TYPE_NATIVE); | 947 profile_, chrome::HOST_DESKTOP_TYPE_NATIVE); |
948 DCHECK(browser); | 948 DCHECK(browser); |
949 PageCycler* page_cycler = NULL; | 949 PageCycler* page_cycler = NULL; |
950 FilePath input_file = | 950 FilePath input_file = |
951 command_line->GetSwitchValuePath(switches::kVisitURLs); | 951 command_line->GetSwitchValuePath(switches::kVisitURLs); |
952 page_cycler = new PageCycler(browser, input_file); | 952 page_cycler = new PageCycler(browser, input_file); |
953 page_cycler->set_errors_file( | 953 page_cycler->set_errors_file( |
954 input_file.AddExtension(FILE_PATH_LITERAL(".errors"))); | 954 input_file.AddExtension(FILE_PATH_LITERAL(".errors"))); |
955 if (command_line->HasSwitch(switches::kRecordStats)) { | 955 if (command_line->HasSwitch(switches::kRecordStats)) { |
956 page_cycler->set_stats_file( | 956 page_cycler->set_stats_file( |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1665 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1666 uma_name += "_XP"; | 1666 uma_name += "_XP"; |
1667 | 1667 |
1668 uma_name += "_PreRead_"; | 1668 uma_name += "_PreRead_"; |
1669 uma_name += pre_read_percentage; | 1669 uma_name += pre_read_percentage; |
1670 AddPreReadHistogramTime(uma_name.c_str(), time); | 1670 AddPreReadHistogramTime(uma_name.c_str(), time); |
1671 } | 1671 } |
1672 #endif | 1672 #endif |
1673 #endif | 1673 #endif |
1674 } | 1674 } |
OLD | NEW |