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

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

Issue 2896713003: Create LoadingDataCollector class and have observers rely on it instead of ResourcePrefetchPredictor (Closed)
Patch Set: 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (auto* loading_predictor = 392 if (auto* loading_predictor =
393 predictors::LoadingPredictorFactory::GetForProfile(profile)) { 393 predictors::LoadingPredictorFactory::GetForProfile(profile)) {
394 resource_prefetch_predictor_observer_.reset( 394 resource_prefetch_predictor_observer_.reset(
Benoit L 2017/05/22 13:37:16 nit: as you're touching this code, can you convert
trevordixon 2017/05/23 13:05:15 Done.
395 new chrome_browser_net::ResourcePrefetchPredictorObserver( 395 new chrome_browser_net::ResourcePrefetchPredictorObserver(
396 loading_predictor->resource_prefetch_predictor())); 396 loading_predictor->glowplug_collector()));
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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 void ProfileIOData::SetCookieSettingsForTesting( 1326 void ProfileIOData::SetCookieSettingsForTesting(
1327 content_settings::CookieSettings* cookie_settings) { 1327 content_settings::CookieSettings* cookie_settings) {
1328 DCHECK(!cookie_settings_.get()); 1328 DCHECK(!cookie_settings_.get());
1329 cookie_settings_ = cookie_settings; 1329 cookie_settings_ = cookie_settings;
1330 } 1330 }
1331 1331
1332 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1332 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1333 const GURL& url) const { 1333 const GURL& url) const {
1334 return url_blacklist_manager_->GetURLBlacklistState(url); 1334 return url_blacklist_manager_->GetURLBlacklistState(url);
1335 } 1335 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698