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

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

Issue 10855183: Give access to browsers by Profile/HostDesktopType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now Ash and Native desktop types are the same on ChromeOS Created 8 years, 4 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
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698