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

Side by Side Diff: chrome/browser/profiles/profile_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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 create_session_service_timer_.Start(FROM_HERE, 397 create_session_service_timer_.Start(FROM_HERE,
398 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, 398 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
399 &ProfileImpl::EnsureSessionServiceCreated); 399 &ProfileImpl::EnsureSessionServiceCreated);
400 #endif 400 #endif
401 401
402 // Determine if prefetch is enabled for this profile. 402 // Determine if prefetch is enabled for this profile.
403 // If not profile_manager is present, it means we are in a unittest. 403 // If not profile_manager is present, it means we are in a unittest.
404 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 404 const CommandLine* command_line = CommandLine::ForCurrentProcess();
405 predictor_ = chrome_browser_net::Predictor::CreatePredictor( 405 predictor_ = chrome_browser_net::Predictor::CreatePredictor(
406 !command_line->HasSwitch(switches::kDisablePreconnect), 406 !command_line->HasSwitch(switches::kDisablePreconnect),
407 !command_line->HasSwitch(switches::kDnsPrefetchDisable),
407 g_browser_process->profile_manager() == NULL); 408 g_browser_process->profile_manager() == NULL);
408 409
409 // If we are creating the profile synchronously, then we should load the 410 // If we are creating the profile synchronously, then we should load the
410 // policy data immediately. 411 // policy data immediately.
411 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 412 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
412 #if defined(ENABLE_CONFIGURATION_POLICY) 413 #if defined(ENABLE_CONFIGURATION_POLICY)
413 policy::BrowserPolicyConnector* connector = 414 policy::BrowserPolicyConnector* connector =
414 g_browser_process->browser_policy_connector(); 415 g_browser_process->browser_policy_connector();
415 schema_registry_service_ = 416 schema_registry_service_ =
416 policy::SchemaRegistryServiceFactory::CreateForContext( 417 policy::SchemaRegistryServiceFactory::CreateForContext(
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 ProfileImpl::CreateDomainReliabilityMonitor() { 1327 ProfileImpl::CreateDomainReliabilityMonitor() {
1327 domain_reliability::DomainReliabilityService* service = 1328 domain_reliability::DomainReliabilityService* service =
1328 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1329 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1329 GetForBrowserContext(this); 1330 GetForBrowserContext(this);
1330 if (!service) 1331 if (!service)
1331 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1332 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1332 1333
1333 return service->CreateMonitor( 1334 return service->CreateMonitor(
1334 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1335 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1335 } 1336 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698