Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 16174003: Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 chrome_extra_parts_[i]->PostBrowserStart(); 1062 chrome_extra_parts_[i]->PostBrowserStart();
1063 #if !defined(OS_ANDROID) 1063 #if !defined(OS_ANDROID)
1064 // Allow ProcessSingleton to process messages. 1064 // Allow ProcessSingleton to process messages.
1065 process_singleton_->Unlock(); 1065 process_singleton_->Unlock();
1066 #endif 1066 #endif
1067 } 1067 }
1068 1068
1069 #if !defined(OS_ANDROID) 1069 #if !defined(OS_ANDROID)
1070 void ChromeBrowserMainParts::RunPageCycler() { 1070 void ChromeBrowserMainParts::RunPageCycler() {
1071 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1071 CommandLine* command_line = CommandLine::ForCurrentProcess();
1072 // We assume a native desktop for tests, but we will need to find a way to 1072 Browser* browser = chrome::FindBrowserWithProfile(profile_,
1073 // get the proper host desktop type once we start running these tests in ASH. 1073 chrome::GetActiveDesktop());
1074 Browser* browser = chrome::FindBrowserWithProfile(
1075 profile_, chrome::HOST_DESKTOP_TYPE_NATIVE);
1076 DCHECK(browser); 1074 DCHECK(browser);
1077 PageCycler* page_cycler = NULL; 1075 PageCycler* page_cycler = NULL;
1078 base::FilePath input_file = 1076 base::FilePath input_file =
1079 command_line->GetSwitchValuePath(switches::kVisitURLs); 1077 command_line->GetSwitchValuePath(switches::kVisitURLs);
1080 page_cycler = new PageCycler(browser, input_file); 1078 page_cycler = new PageCycler(browser, input_file);
1081 page_cycler->set_errors_file( 1079 page_cycler->set_errors_file(
1082 input_file.AddExtension(FILE_PATH_LITERAL(".errors"))); 1080 input_file.AddExtension(FILE_PATH_LITERAL(".errors")));
1083 if (command_line->HasSwitch(switches::kRecordStats)) { 1081 if (command_line->HasSwitch(switches::kRecordStats)) {
1084 page_cycler->set_stats_file( 1082 page_cycler->set_stats_file(
1085 command_line->GetSwitchValuePath(switches::kRecordStats)); 1083 command_line->GetSwitchValuePath(switches::kRecordStats));
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 if (base::win::GetVersion() <= base::win::VERSION_XP) 1771 if (base::win::GetVersion() <= base::win::VERSION_XP)
1774 uma_name += "_XP"; 1772 uma_name += "_XP";
1775 1773
1776 uma_name += "_PreRead_"; 1774 uma_name += "_PreRead_";
1777 uma_name += pre_read_percentage; 1775 uma_name += pre_read_percentage;
1778 AddPreReadHistogramTime(uma_name.c_str(), time); 1776 AddPreReadHistogramTime(uma_name.c_str(), time);
1779 } 1777 }
1780 #endif 1778 #endif
1781 #endif 1779 #endif
1782 } 1780 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/extensions/api/test/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698