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

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: Nits. 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
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 AppListService::InitAll(profile); 334 AppListService::InitAll(profile);
339 if (command_line_.HasSwitch(switches::kAppId)) { 335 if (command_line_.HasSwitch(switches::kAppId)) {
340 std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId); 336 std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId);
341 const Extension* extension = GetPlatformApp(profile, app_id); 337 const Extension* extension = GetPlatformApp(profile, app_id);
342 // If |app_id| is a disabled or terminated platform app we handle it 338 // If |app_id| is a disabled or terminated platform app we handle it
343 // specially here, otherwise it will be handled below. 339 // specially here, otherwise it will be handled below.
344 if (extension) { 340 if (extension) {
345 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP); 341 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP);
346 AppLaunchParams params(profile, extension, 342 AppLaunchParams params(profile, extension,
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 // behavior is desired because completing or skipping the sync promo 919 // behavior is desired because completing or skipping the sync promo
924 // causes a redirect to the NTP. 920 // causes a redirect to the NTP.
925 if (!startup_urls->empty() && 921 if (!startup_urls->empty() &&
926 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 922 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
927 startup_urls->at(0) = sync_promo_url; 923 startup_urls->at(0) = sync_promo_url;
928 else 924 else
929 startup_urls->insert(startup_urls->begin(), sync_promo_url); 925 startup_urls->insert(startup_urls->begin(), sync_promo_url);
930 } 926 }
931 } 927 }
932 } 928 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698