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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 360733005: Poll CanPredictNetworkActions in Predictor class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LoginUtilsTest. Created 6 years, 5 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
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | no next file » | 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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698