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

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: 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
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 create_session_service_timer_.Start(FROM_HERE, 392 create_session_service_timer_.Start(FROM_HERE,
393 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, 393 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
394 &ProfileImpl::EnsureSessionServiceCreated); 394 &ProfileImpl::EnsureSessionServiceCreated);
395 #endif 395 #endif
396 396
397 // Determine if prefetch is enabled for this profile. 397 // Determine if prefetch is enabled for this profile.
398 // If not profile_manager is present, it means we are in a unittest. 398 // If not profile_manager is present, it means we are in a unittest.
399 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 399 const CommandLine* command_line = CommandLine::ForCurrentProcess();
400 predictor_ = chrome_browser_net::Predictor::CreatePredictor( 400 predictor_ = chrome_browser_net::Predictor::CreatePredictor(
401 !command_line->HasSwitch(switches::kDisablePreconnect), 401 !command_line->HasSwitch(switches::kDisablePreconnect),
402 !command_line->HasSwitch(switches::kDnsPrefetchDisable),
402 g_browser_process->profile_manager() == NULL); 403 g_browser_process->profile_manager() == NULL);
403 404
404 // If we are creating the profile synchronously, then we should load the 405 // If we are creating the profile synchronously, then we should load the
405 // policy data immediately. 406 // policy data immediately.
406 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 407 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
407 #if defined(ENABLE_CONFIGURATION_POLICY) 408 #if defined(ENABLE_CONFIGURATION_POLICY)
408 policy::BrowserPolicyConnector* connector = 409 policy::BrowserPolicyConnector* connector =
409 g_browser_process->browser_policy_connector(); 410 g_browser_process->browser_policy_connector();
410 schema_registry_service_ = 411 schema_registry_service_ =
411 policy::SchemaRegistryServiceFactory::CreateForContext( 412 policy::SchemaRegistryServiceFactory::CreateForContext(
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 ProfileImpl::CreateDomainReliabilityMonitor() { 1322 ProfileImpl::CreateDomainReliabilityMonitor() {
1322 domain_reliability::DomainReliabilityService* service = 1323 domain_reliability::DomainReliabilityService* service =
1323 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1324 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1324 GetForBrowserContext(this); 1325 GetForBrowserContext(this);
1325 if (!service) 1326 if (!service)
1326 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1327 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1327 1328
1328 return service->CreateMonitor( 1329 return service->CreateMonitor(
1329 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1330 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1330 } 1331 }
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor_unittest.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698