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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2847183002: predictors: Introduce GlowplugPredictor. (Closed)
Patch Set: GlowplugPredictor -> LoadingPredictor Created 3 years, 7 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_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 24 matching lines...) Expand all
35 #include "chrome/browser/devtools/devtools_network_controller.h" 35 #include "chrome/browser/devtools/devtools_network_controller.h"
36 #include "chrome/browser/devtools/devtools_network_transaction_factory.h" 36 #include "chrome/browser/devtools/devtools_network_transaction_factory.h"
37 #include "chrome/browser/io_thread.h" 37 #include "chrome/browser/io_thread.h"
38 #include "chrome/browser/net/chrome_http_user_agent_settings.h" 38 #include "chrome/browser/net/chrome_http_user_agent_settings.h"
39 #include "chrome/browser/net/chrome_network_delegate.h" 39 #include "chrome/browser/net/chrome_network_delegate.h"
40 #include "chrome/browser/net/chrome_url_request_context_getter.h" 40 #include "chrome/browser/net/chrome_url_request_context_getter.h"
41 #include "chrome/browser/net/proxy_service_factory.h" 41 #include "chrome/browser/net/proxy_service_factory.h"
42 #include "chrome/browser/net/resource_prefetch_predictor_observer.h" 42 #include "chrome/browser/net/resource_prefetch_predictor_observer.h"
43 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" 43 #include "chrome/browser/policy/cloud/policy_header_service_factory.h"
44 #include "chrome/browser/policy/policy_helpers.h" 44 #include "chrome/browser/policy/policy_helpers.h"
45 #include "chrome/browser/predictors/resource_prefetch_predictor.h" 45 #include "chrome/browser/predictors/loading_predictor.h"
46 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" 46 #include "chrome/browser/predictors/loading_predictor_factory.h"
47 #include "chrome/browser/profiles/net_http_session_params_observer.h" 47 #include "chrome/browser/profiles/net_http_session_params_observer.h"
48 #include "chrome/browser/profiles/profile.h" 48 #include "chrome/browser/profiles/profile.h"
49 #include "chrome/browser/profiles/profile_manager.h" 49 #include "chrome/browser/profiles/profile_manager.h"
50 #include "chrome/browser/ssl/chrome_expect_ct_reporter.h" 50 #include "chrome/browser/ssl/chrome_expect_ct_reporter.h"
51 #include "chrome/browser/ui/search/new_tab_page_interceptor_service.h" 51 #include "chrome/browser/ui/search/new_tab_page_interceptor_service.h"
52 #include "chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h" 52 #include "chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h"
53 #include "chrome/common/chrome_paths.h" 53 #include "chrome/common/chrome_paths.h"
54 #include "chrome/common/chrome_switches.h" 54 #include "chrome/common/chrome_switches.h"
55 #include "chrome/common/features.h" 55 #include "chrome/common/features.h"
56 #include "chrome/common/pref_names.h" 56 #include "chrome/common/pref_names.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 params->host_content_settings_map = 382 params->host_content_settings_map =
383 HostContentSettingsMapFactory::GetForProfile(profile); 383 HostContentSettingsMapFactory::GetForProfile(profile);
384 params->ssl_config_service = profile->GetSSLConfigService(); 384 params->ssl_config_service = profile->GetSSLConfigService();
385 385
386 #if BUILDFLAG(ENABLE_EXTENSIONS) 386 #if BUILDFLAG(ENABLE_EXTENSIONS)
387 params->extension_info_map = 387 params->extension_info_map =
388 extensions::ExtensionSystem::Get(profile)->info_map(); 388 extensions::ExtensionSystem::Get(profile)->info_map();
389 params->cookie_monster_delegate = new ExtensionCookieMonsterDelegate(profile); 389 params->cookie_monster_delegate = new ExtensionCookieMonsterDelegate(profile);
390 #endif 390 #endif
391 391
392 if (predictors::ResourcePrefetchPredictor* predictor = 392 if (auto* loading_predictor =
393 predictors::ResourcePrefetchPredictorFactory::GetForProfile( 393 predictors::LoadingPredictorFactory::GetForProfile(profile)) {
394 profile)) {
395 resource_prefetch_predictor_observer_.reset( 394 resource_prefetch_predictor_observer_.reset(
396 new chrome_browser_net::ResourcePrefetchPredictorObserver(predictor)); 395 new chrome_browser_net::ResourcePrefetchPredictorObserver(
396 loading_predictor->resource_prefetch_predictor()));
397 } 397 }
398 398
399 ProtocolHandlerRegistry* protocol_handler_registry = 399 ProtocolHandlerRegistry* protocol_handler_registry =
400 ProtocolHandlerRegistryFactory::GetForBrowserContext(profile); 400 ProtocolHandlerRegistryFactory::GetForBrowserContext(profile);
401 DCHECK(protocol_handler_registry); 401 DCHECK(protocol_handler_registry);
402 402
403 // The profile instance is only available here in the InitializeOnUIThread 403 // The profile instance is only available here in the InitializeOnUIThread
404 // method, so we create the url job factory here, then save it for 404 // method, so we create the url job factory here, then save it for
405 // later delivery to the job factory in Init(). 405 // later delivery to the job factory in Init().
406 params->protocol_handler_interceptor = 406 params->protocol_handler_interceptor =
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 void ProfileIOData::SetCookieSettingsForTesting( 1329 void ProfileIOData::SetCookieSettingsForTesting(
1330 content_settings::CookieSettings* cookie_settings) { 1330 content_settings::CookieSettings* cookie_settings) {
1331 DCHECK(!cookie_settings_.get()); 1331 DCHECK(!cookie_settings_.get());
1332 cookie_settings_ = cookie_settings; 1332 cookie_settings_ = cookie_settings;
1333 } 1333 }
1334 1334
1335 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1335 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1336 const GURL& url) const { 1336 const GURL& url) const {
1337 return url_blacklist_manager_->GetURLBlacklistState(url); 1337 return url_blacklist_manager_->GetURLBlacklistState(url);
1338 } 1338 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698