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/ui/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/app_restore_service.h" | 10 #include "apps/app_restore_service.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 bool StartupBrowserCreatorImpl::Launch(Profile* profile, | 324 bool StartupBrowserCreatorImpl::Launch(Profile* profile, |
325 const std::vector<GURL>& urls_to_open, | 325 const std::vector<GURL>& urls_to_open, |
326 bool process_startup, | 326 bool process_startup, |
327 chrome::HostDesktopType desktop_type) { | 327 chrome::HostDesktopType desktop_type) { |
328 DCHECK(profile); | 328 DCHECK(profile); |
329 profile_ = profile; | 329 profile_ = profile; |
330 | 330 |
331 if (command_line_.HasSwitch(switches::kDnsLogDetails)) | 331 if (command_line_.HasSwitch(switches::kDnsLogDetails)) |
332 chrome_browser_net::EnablePredictorDetailedLog(true); | 332 chrome_browser_net::EnablePredictorDetailedLog(true); |
333 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable) && | |
334 profile->GetNetworkPredictor()) { | |
335 profile->GetNetworkPredictor()->EnablePredictor(false); | |
336 } | |
337 | 333 |
338 if (AppListService::HandleLaunchCommandLine(command_line_, profile)) | 334 if (AppListService::HandleLaunchCommandLine(command_line_, profile)) |
339 return true; | 335 return true; |
340 | 336 |
341 if (command_line_.HasSwitch(switches::kAppId)) { | 337 if (command_line_.HasSwitch(switches::kAppId)) { |
342 std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId); | 338 std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId); |
343 const Extension* extension = GetPlatformApp(profile, app_id); | 339 const Extension* extension = GetPlatformApp(profile, app_id); |
344 // If |app_id| is a disabled or terminated platform app we handle it | 340 // If |app_id| is a disabled or terminated platform app we handle it |
345 // specially here, otherwise it will be handled below. | 341 // specially here, otherwise it will be handled below. |
346 if (extension) { | 342 if (extension) { |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 // behavior is desired because completing or skipping the sync promo | 915 // behavior is desired because completing or skipping the sync promo |
920 // causes a redirect to the NTP. | 916 // causes a redirect to the NTP. |
921 if (!startup_urls->empty() && | 917 if (!startup_urls->empty() && |
922 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) | 918 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) |
923 startup_urls->at(0) = sync_promo_url; | 919 startup_urls->at(0) = sync_promo_url; |
924 else | 920 else |
925 startup_urls->insert(startup_urls->begin(), sync_promo_url); | 921 startup_urls->insert(startup_urls->begin(), sync_promo_url); |
926 } | 922 } |
927 } | 923 } |
928 } | 924 } |
OLD | NEW |