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

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

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 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 "chrome/browser/browser_main.h" 5 #include "chrome/browser/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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1069
1070 ProcessSingleton process_singleton(user_data_dir); 1070 ProcessSingleton process_singleton(user_data_dir);
1071 1071
1072 bool is_first_run = FirstRun::IsChromeFirstRun() || 1072 bool is_first_run = FirstRun::IsChromeFirstRun() ||
1073 parsed_command_line.HasSwitch(switches::kFirstRun); 1073 parsed_command_line.HasSwitch(switches::kFirstRun);
1074 1074
1075 scoped_ptr<BrowserProcessImpl> browser_process; 1075 scoped_ptr<BrowserProcessImpl> browser_process;
1076 if (parsed_command_line.HasSwitch(switches::kImport) || 1076 if (parsed_command_line.HasSwitch(switches::kImport) ||
1077 parsed_command_line.HasSwitch(switches::kImportFromFile)) { 1077 parsed_command_line.HasSwitch(switches::kImportFromFile)) {
1078 // We use different BrowserProcess when importing so no GoogleURLTracker is 1078 // We use different BrowserProcess when importing so no GoogleURLTracker is
1079 // instantiated (as it makes a URLRequest and we don't have an IO thread, 1079 // instantiated (as it makes a net::URLRequest and we don't have an IO
1080 // see bug #1292702). 1080 // thread, see bug #1292702).
1081 browser_process.reset(new FirstRunBrowserProcess(parsed_command_line)); 1081 browser_process.reset(new FirstRunBrowserProcess(parsed_command_line));
1082 is_first_run = false; 1082 is_first_run = false;
1083 } else { 1083 } else {
1084 browser_process.reset(new BrowserProcessImpl(parsed_command_line)); 1084 browser_process.reset(new BrowserProcessImpl(parsed_command_line));
1085 } 1085 }
1086 1086
1087 // BrowserProcessImpl's constructor should set g_browser_process. 1087 // BrowserProcessImpl's constructor should set g_browser_process.
1088 DCHECK(g_browser_process); 1088 DCHECK(g_browser_process);
1089 1089
1090 // This forces the TabCloseableStateWatcher to be created and, on chromeos, 1090 // This forces the TabCloseableStateWatcher to be created and, on chromeos,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 // Initialize the screen locker now so that it can receive 1313 // Initialize the screen locker now so that it can receive
1314 // LOGIN_USER_CHANGED notification from UserManager. 1314 // LOGIN_USER_CHANGED notification from UserManager.
1315 chromeos::ScreenLocker::InitClass(); 1315 chromeos::ScreenLocker::InitClass();
1316 1316
1317 // This forces the ProfileManager to be created and register for the 1317 // This forces the ProfileManager to be created and register for the
1318 // notification it needs to track the logged in user. 1318 // notification it needs to track the logged in user.
1319 g_browser_process->profile_manager()->GetDefaultProfile(); 1319 g_browser_process->profile_manager()->GetDefaultProfile();
1320 1320
1321 // Allow access to file:// on ChromeOS for tests. 1321 // Allow access to file:// on ChromeOS for tests.
1322 if (parsed_command_line.HasSwitch(switches::kAllowFileAccess)) { 1322 if (parsed_command_line.HasSwitch(switches::kAllowFileAccess)) {
1323 URLRequest::AllowFileAccess(); 1323 net::URLRequest::AllowFileAccess();
1324 } 1324 }
1325 1325
1326 // There are two use cases for kLoginUser: 1326 // There are two use cases for kLoginUser:
1327 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" 1327 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin"
1328 // 2) if passed alone, to signal that the indicated user has already 1328 // 2) if passed alone, to signal that the indicated user has already
1329 // logged in and we should behave accordingly. 1329 // logged in and we should behave accordingly.
1330 // This handles case 2. 1330 // This handles case 2.
1331 if (parsed_command_line.HasSwitch(switches::kLoginUser) && 1331 if (parsed_command_line.HasSwitch(switches::kLoginUser) &&
1332 !parsed_command_line.HasSwitch(switches::kLoginPassword)) { 1332 !parsed_command_line.HasSwitch(switches::kLoginPassword)) {
1333 std::string username = 1333 std::string username =
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 #if defined(OS_CHROMEOS) 1695 #if defined(OS_CHROMEOS)
1696 // To be precise, logout (browser shutdown) is not yet done, but the 1696 // To be precise, logout (browser shutdown) is not yet done, but the
1697 // remaining work is negligible, hence we say LogoutDone here. 1697 // remaining work is negligible, hence we say LogoutDone here.
1698 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1698 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1699 false); 1699 false);
1700 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1700 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1701 #endif 1701 #endif
1702 TRACE_EVENT_END("BrowserMain", 0, 0); 1702 TRACE_EVENT_END("BrowserMain", 0, 0);
1703 return result_code; 1703 return result_code;
1704 } 1704 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698